/* ============================================================
   Jobmadic — application stylesheet
   The single source of truth for the whole product UI: every
   page links this file and adds no <style> block of its own.
   If a pattern is missing, extend this file rather than
   special-casing a page.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root{
  --bg:#f8fafc; --surface:#ffffff; --surface-hover:#f1f5f9; --surface-alt:#f8fafc;
  --surface-dark:#0f172a; --surface-dark-hover:#1e293b;
  --border:#e2e8f0; --border-strong:#cbd5e1;
  --text-primary:#0f172a; --text-secondary:#475569; --text-muted:#94a3b8;
  --text-on-dark:#ffffff; --text-on-dark-muted:#94a3b8; --border-on-dark:#334155; --surface-on-dark-hover:#1e293b;
  --accent:#2563eb; --accent-hover:#1d4ed8; --accent-light:#eff6ff; --accent-border:#bfdbfe;
  --success:#16a34a; --success-bg:#f0fdf4; --success-border:#bbf7d0;
  --warning:#d97706; --warning-bg:#fffbeb; --warning-border:#fde68a;
  --destructive:#dc2626; --destructive-bg:#fef2f2; --destructive-border:#fecaca;
  --info:#2563eb; --info-bg:#eff6ff; --info-border:#bfdbfe;
  --success-text:#14532d; --destructive-text:#7f1d1d; --warning-text:#78350f; --info-text:#1e3a8a;
  --skeleton-shine:#e9eef5; --switch-knob:#ffffff;
  --radius-sm:6px; --radius-md:8px; --radius-lg:12px; --radius-full:999px;
  --shadow-xs:0 1px 2px rgba(15,23,42,.04);
  --shadow-sm:0 4px 16px rgba(15,23,42,.06);
  --shadow-md:0 8px 24px rgba(15,23,42,.10);
  --shadow-lg:0 20px 48px rgba(15,23,42,.18);
  --font:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --mono:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;
  --serif:Georgia,"Iowan Old Style","Times New Roman",Times,serif;
  --sidebar-w:260px; --topbar-h:60px;
}

/* ---------- 1b. Dark theme ----------
   Only tokens are redefined, so every component inherits the theme. The
   "dark surface" role inverts to a light surface: .btn-dark, .cta-band and
   the logo mark are the highest-contrast elements on the page, which on a
   dark background means light. The CV document surface (§28) is deliberately
   excluded — it is a printed page, not app chrome, and stays white.

   Three states: an explicit choice sets data-theme on <html>; with no choice
   the OS preference decides. */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#0b1120; --surface:#151d2f; --surface-hover:#1e293b; --surface-alt:#0b1120;
    --surface-dark:#e2e8f0; --surface-dark-hover:#cbd5e1;
    --border:#1f2a3d; --border-strong:#334155;
    --text-primary:#e2e8f0; --text-secondary:#94a3b8; --text-muted:#64748b;
    --text-on-dark:#0f172a; --text-on-dark-muted:#475569; --border-on-dark:#cbd5e1; --surface-on-dark-hover:#cbd5e1;
    --accent:#3b82f6; --accent-hover:#60a5fa; --accent-light:#132444; --accent-border:#1e3a5f;
    --success:#4ade80; --success-bg:#0e2019; --success-border:#166534; --success-text:#bbf7d0;
    --warning:#fbbf24; --warning-bg:#241a08; --warning-border:#854d0e; --warning-text:#fde68a;
    --destructive:#f87171; --destructive-bg:#2a1315; --destructive-border:#991b1b; --destructive-text:#fecaca;
    --info:#3b82f6; --info-bg:#132444; --info-border:#1e3a5f; --info-text:#bfdbfe;
    --skeleton-shine:#243049; --switch-knob:#e2e8f0;
    --shadow-xs:0 1px 2px rgba(0,0,0,.35);
    --shadow-sm:0 4px 16px rgba(0,0,0,.40);
    --shadow-md:0 8px 24px rgba(0,0,0,.48);
    --shadow-lg:0 20px 48px rgba(0,0,0,.60);
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#0b1120; --surface:#151d2f; --surface-hover:#1e293b; --surface-alt:#0b1120;
  --surface-dark:#e2e8f0; --surface-dark-hover:#cbd5e1;
  --border:#1f2a3d; --border-strong:#334155;
  --text-primary:#e2e8f0; --text-secondary:#94a3b8; --text-muted:#64748b;
  --text-on-dark:#0f172a; --text-on-dark-muted:#475569; --border-on-dark:#cbd5e1; --surface-on-dark-hover:#cbd5e1;
  --accent:#3b82f6; --accent-hover:#60a5fa; --accent-light:#132444; --accent-border:#1e3a5f;
  --success:#4ade80; --success-bg:#0e2019; --success-border:#166534; --success-text:#bbf7d0;
  --warning:#fbbf24; --warning-bg:#241a08; --warning-border:#854d0e; --warning-text:#fde68a;
  --destructive:#f87171; --destructive-bg:#2a1315; --destructive-border:#991b1b; --destructive-text:#fecaca;
  --info:#3b82f6; --info-bg:#132444; --info-border:#1e3a5f; --info-text:#bfdbfe;
  --skeleton-shine:#243049; --switch-knob:#e2e8f0;
  --shadow-xs:0 1px 2px rgba(0,0,0,.35);
  --shadow-sm:0 4px 16px rgba(0,0,0,.40);
  --shadow-md:0 8px 24px rgba(0,0,0,.48);
  --shadow-lg:0 20px 48px rgba(0,0,0,.60);
  color-scheme:dark;
}
:root[data-theme="light"]{color-scheme:light}

/* ---------- 2. Base ---------- */
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
/* The flex column is the sticky footer: layouts/public.ejs is a plain
   nav + main + footer, so on a short page the footer used to float 84px+ above
   the viewport bottom. layouts/app.ejs never had this — `.shell` carries its
   own min-height:100vh — and this is inert there. */
/* ── Self-hosted CV fonts (also measured server-side for page breaks) ── */
/* Inter: latin plus latin-ext, Cyrillic, Greek and Vietnamese subsets (unicode-range), Poppins, and Noto Sans Arabic/Hebrew mapped into both families so the browser draws the same glyphs the renderer measures (src/renderer/font-metrics.js). */
@font-face{font-family:"Inter";font-style:normal;font-weight:300;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-ext-300-normal.woff2") format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:"Inter";font-style:normal;font-weight:300;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-300-normal.woff2") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Inter";font-style:normal;font-weight:300;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-ext-300-normal.woff2") format("woff2");unicode-range:U+1F00-1FFF}
@font-face{font-family:"Inter";font-style:normal;font-weight:300;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-300-normal.woff2") format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}
@font-face{font-family:"Inter";font-style:normal;font-weight:300;font-display:swap;src:url("/assets/fonts/Inter/inter-vietnamese-300-normal.woff2") format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:"Inter";font-style:normal;font-weight:300;font-display:swap;src:url("/assets/fonts/Inter/inter-latin-ext-300-normal.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Inter";font-style:normal;font-weight:300;font-display:swap;src:url("/assets/fonts/Inter/inter-latin-300-normal.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-ext-400-normal.woff2") format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-400-normal.woff2") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-ext-400-normal.woff2") format("woff2");unicode-range:U+1F00-1FFF}
@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-400-normal.woff2") format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}
@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Inter/inter-vietnamese-400-normal.woff2") format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Inter/inter-latin-ext-400-normal.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Inter/inter-latin-400-normal.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-ext-500-normal.woff2") format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-500-normal.woff2") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-ext-500-normal.woff2") format("woff2");unicode-range:U+1F00-1FFF}
@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-500-normal.woff2") format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}
@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("/assets/fonts/Inter/inter-vietnamese-500-normal.woff2") format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("/assets/fonts/Inter/inter-latin-ext-500-normal.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("/assets/fonts/Inter/inter-latin-500-normal.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-ext-600-normal.woff2") format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-600-normal.woff2") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-ext-600-normal.woff2") format("woff2");unicode-range:U+1F00-1FFF}
@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-600-normal.woff2") format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}
@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("/assets/fonts/Inter/inter-vietnamese-600-normal.woff2") format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("/assets/fonts/Inter/inter-latin-ext-600-normal.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("/assets/fonts/Inter/inter-latin-600-normal.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-ext-700-normal.woff2") format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:"Inter";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-700-normal.woff2") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Inter";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-ext-700-normal.woff2") format("woff2");unicode-range:U+1F00-1FFF}
@font-face{font-family:"Inter";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-700-normal.woff2") format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}
@font-face{font-family:"Inter";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Inter/inter-vietnamese-700-normal.woff2") format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:"Inter";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Inter/inter-latin-ext-700-normal.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Inter";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Inter/inter-latin-700-normal.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Poppins";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Poppins/Poppins-Regular.ttf") format("truetype")}
@font-face{font-family:"Poppins";font-style:normal;font-weight:600;font-display:swap;src:url("/assets/fonts/Poppins/Poppins-SemiBold.ttf") format("truetype")}
@font-face{font-family:"Poppins";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Poppins/Poppins-Bold.ttf") format("truetype")}
@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Noto/NotoSansArabic-Regular.ttf") format("truetype");unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Noto/NotoSansHebrew-Regular.ttf") format("truetype");unicode-range:U+0590-05FF,U+FB1D-FB4F}
@font-face{font-family:"Inter";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Noto/NotoSansArabic-Bold.ttf") format("truetype");unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:"Inter";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Noto/NotoSansHebrew-Bold.ttf") format("truetype");unicode-range:U+0590-05FF,U+FB1D-FB4F}
@font-face{font-family:"Poppins";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Noto/NotoSansArabic-Regular.ttf") format("truetype");unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:"Poppins";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Noto/NotoSansHebrew-Regular.ttf") format("truetype");unicode-range:U+0590-05FF,U+FB1D-FB4F}
@font-face{font-family:"Poppins";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Noto/NotoSansArabic-Bold.ttf") format("truetype");unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:"Poppins";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Noto/NotoSansHebrew-Bold.ttf") format("truetype");unicode-range:U+0590-05FF,U+FB1D-FB4F}
@font-face{font-family:"Poppins";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-ext-400-normal.woff2") format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:"Poppins";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-400-normal.woff2") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Poppins";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-ext-400-normal.woff2") format("woff2");unicode-range:U+1F00-1FFF}
@font-face{font-family:"Poppins";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-400-normal.woff2") format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}
@font-face{font-family:"Poppins";font-style:normal;font-weight:600;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-ext-600-normal.woff2") format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:"Poppins";font-style:normal;font-weight:600;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-600-normal.woff2") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Poppins";font-style:normal;font-weight:600;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-ext-600-normal.woff2") format("woff2");unicode-range:U+1F00-1FFF}
@font-face{font-family:"Poppins";font-style:normal;font-weight:600;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-600-normal.woff2") format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}
@font-face{font-family:"Poppins";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-ext-700-normal.woff2") format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:"Poppins";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Inter/inter-cyrillic-700-normal.woff2") format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Poppins";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-ext-700-normal.woff2") format("woff2");unicode-range:U+1F00-1FFF}
@font-face{font-family:"Poppins";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Inter/inter-greek-700-normal.woff2") format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}
/* Faces the CV engine measures with (src/renderer/font-metrics.js): Georgia/Times stacks are measured
   with Gelasio (metric-compatible), RTL text with Noto. The editor's live re-wrap (cv-editor/text-wrap.js)
   measures in these, so its line breaks match the server's. */
@font-face{font-family:"Gelasio";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Gelasio/Gelasio-Regular.ttf") format("truetype")}
@font-face{font-family:"Gelasio";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Gelasio/Gelasio-Bold.ttf") format("truetype")}
@font-face{font-family:"Gelasio";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Noto/NotoSansArabic-Regular.ttf") format("truetype");unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:"Gelasio";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Noto/NotoSansArabic-Bold.ttf") format("truetype");unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:"Gelasio";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Noto/NotoSansHebrew-Regular.ttf") format("truetype");unicode-range:U+0590-05FF,U+FB1D-FB4F}
@font-face{font-family:"Gelasio";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Noto/NotoSansHebrew-Bold.ttf") format("truetype");unicode-range:U+0590-05FF,U+FB1D-FB4F}
@font-face{font-family:"Noto Sans Arabic";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Noto/NotoSansArabic-Regular.ttf") format("truetype")}
@font-face{font-family:"Noto Sans Arabic";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Noto/NotoSansArabic-Bold.ttf") format("truetype")}
@font-face{font-family:"Noto Sans Hebrew";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/Noto/NotoSansHebrew-Regular.ttf") format("truetype")}
@font-face{font-family:"Noto Sans Hebrew";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/Noto/NotoSansHebrew-Bold.ttf") format("truetype")}
body{font-family:var(--font);color:var(--text-primary);background:var(--bg);line-height:1.5;font-size:14px;-webkit-font-smoothing:antialiased;
  min-height:100vh;display:flex;flex-direction:column}
/* `<main>` exists in exactly one template (layouts/public.ejs), so this is
   scoped to the layout that needs it without naming the layout. */
main{flex:1}
/* Reserve the admin bar's footprint (58px) so it stops sitting on top of the
   footer at the bottom of a scrolled page. `:has()` is verified in Chromium,
   WebKit and Firefox; for everyone but admins the selector never matches. */
body:has(.admin-bar){padding-bottom:72px}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font-family:inherit;font-size:inherit}
button{cursor:pointer}
img,svg{display:block;max-width:100%}
/* The `hidden` attribute is the app's one hide mechanism (menus, dialogs, tab
   panels, filtered rows), so it has to beat any component that sets `display`
   — `.card{display:flex}` would otherwise keep a hidden card on screen. This
   is the only !important in the file, and it earns it. */
[hidden]{display:none!important}
/* Safety net: an inline icon that declares no size must never expand to fill its
   parent. :where() holds this at zero specificity so every component rule below
   (.icon, .btn svg, .stat-top svg, .empty-state svg, …) still wins. SVGs that are
   meant to be large — charts and the CV document — set width/height attributes
   and are excluded by the :not() guards. */
:where(svg:not([width]):not([height])){width:18px;height:18px;flex-shrink:0}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.icon{width:18px;height:18px;flex-shrink:0}
.icon-sm{width:15px;height:15px;flex-shrink:0}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---------- 3. Typography helpers ---------- */
h1{font-size:24px;font-weight:700;letter-spacing:-.01em}
h2{font-size:18px;font-weight:600}
h3{font-size:15px;font-weight:600}
.muted{color:var(--text-secondary)}
.text-xs{font-size:12px}
.text-sm{font-size:13px}
.mono{font-family:var(--mono)}
/* Code is code wherever it appears. `.prose code` used to be the only rule, so
   inline <code> in admin documentation rendered as plain body text. */
code{font-family:var(--mono);font-size:.9em;background:var(--surface-hover);
  border:1px solid var(--border);border-radius:var(--radius-sm);padding:1px 5px}
pre{background:var(--surface-dark);color:var(--text-on-dark);border-radius:var(--radius-md);
  padding:14px 16px;overflow-x:auto;font-size:12.5px;line-height:1.6;max-width:100%}
pre code{background:transparent;border:0;color:inherit;padding:0;font-size:inherit}
/* A quoted block that lives on the page surface instead of the dark code
   surface: prompt bodies, extracted document text, AI output. It is prose, not
   code, so it WRAPS rather than scrolling sideways. Three call sites used to
   hand-roll this as an inline `background:var(--surface-hover)` on a bare
   <pre>, which overrode the background but not the light-on-dark colour above —
   near-white text on a near-white panel. */
pre.quote{background:var(--surface-hover);color:var(--text-primary);
  border:1px solid var(--border);white-space:pre-wrap;overflow-wrap:anywhere;
  overflow-x:hidden;overflow-y:auto;padding:12px 14px}
.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* .truncate does nothing on an inline span (overflow needs a block box); this
   is the one-line-per-row version for stacked text inside a flex item. */
.truncate-line{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---------- 4. App shell ---------- */
.shell{display:flex;min-height:100vh}
.sidebar{width:var(--sidebar-w);flex-shrink:0;background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;z-index:50;transition:transform .2s ease}
.main{flex:1;margin-left:var(--sidebar-w);min-width:0;display:flex;flex-direction:column}
.topbar{height:var(--topbar-h);background:var(--surface);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 24px;position:sticky;top:0;z-index:30}
.content{padding:28px 24px 72px;flex:1}
.content-narrow{max-width:820px}
.backdrop{display:none;position:fixed;inset:0;background:rgba(15,23,42,.4);z-index:40}
.backdrop.show{display:block}
/* In-place navigation (public/js/nav-swap.js): a thin bar and dimmed content after 150ms of loading. */
.nav-progress{position:fixed;top:0;left:0;height:2px;width:100%;z-index:120;pointer-events:none;opacity:0;transform-origin:0 50%;transform:scaleX(0);background:var(--accent)}
body.is-navigating .nav-progress{opacity:1;animation:navProgress 8s cubic-bezier(.1,.7,.2,1) forwards}
body.is-navigating #jmContent{opacity:.6;transition:opacity .15s}
#jmContent:focus,#jmContent h1[tabindex="-1"]:focus{outline:none}
@keyframes navProgress{from{transform:scaleX(.05)}to{transform:scaleX(.9)}}
@media (prefers-reduced-motion:reduce){body.is-navigating .nav-progress{animation:none;transform:scaleX(.6)}body.is-navigating #jmContent{transition:none}}

/* ---------- 5. Sidebar ---------- */
.sb-logo{height:var(--topbar-h);display:flex;align-items:center;gap:9px;padding:0 18px;border-bottom:1px solid var(--border);font-size:15.5px;font-weight:700;flex-shrink:0}
.sb-logo .mark{width:28px;height:28px;border-radius:7px;background:var(--accent);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.sb-logo .mark .brand-logo{height:19px;width:auto}
/* The pin in white on a brand-blue square; the briefcase cut-out shows the blue. */
.brand-logo-on-accent .brand-logo-pin{fill:#fff}
.sb-logo .eyebrow{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--accent);font-weight:700;line-height:1}
.sb-search-wrap{padding:14px 14px 10px}
.sb-search{display:flex;align-items:center;gap:8px;height:38px;padding:0 10px;border:1px solid var(--border-strong);border-radius:var(--radius-md);background:var(--surface)}
.sb-search svg{width:16px;height:16px;color:var(--text-muted);flex-shrink:0}
.kbd{font-size:10.5px;font-weight:600;color:var(--text-muted);border:1px solid var(--border);border-radius:4px;padding:1px 5px;background:var(--surface-hover);flex-shrink:0}

.mode-switch{display:flex;gap:2px;margin:0 14px 10px;background:var(--surface-hover);border:1px solid var(--border);border-radius:var(--radius-md);padding:3px}
.mode-btn{flex:1;height:30px;border:0;background:transparent;color:var(--text-secondary);font-size:12.5px;font-weight:600;border-radius:6px;transition:background .15s ease,color .15s ease}
.mode-btn.is-active{background:var(--surface);color:var(--text-primary);box-shadow:var(--shadow-xs)}
.mode-btn:not(.is-active):hover{color:var(--text-primary)}

.sb-nav{flex:1;overflow-y:auto;padding:2px 10px 14px}
/* One panel per console; the inactive ones carry the `hidden` attribute. */
.mode-panel{display:block}
.sb-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);padding:14px 10px 6px}
.sb-item{display:flex;align-items:center;gap:10px;height:36px;padding:0 10px;border-radius:var(--radius-md);font-size:13.5px;font-weight:500;color:var(--text-secondary)}
.sb-item svg{width:17px;height:17px;flex-shrink:0;color:var(--text-muted)}
.sb-item:hover{background:var(--surface-hover);color:var(--text-primary)}
.sb-item.active{background:var(--accent-light);color:var(--accent)}
.sb-item.active svg{color:var(--accent)}
.sb-parent{display:flex;align-items:center;gap:10px;height:36px;padding:0 10px;border-radius:var(--radius-md);font-size:13.5px;font-weight:500;color:var(--text-secondary);width:100%;border:0;background:transparent;text-align:left}
.sb-parent svg.leading{width:17px;height:17px;flex-shrink:0;color:var(--text-muted)}
.sb-parent:hover{background:var(--surface-hover);color:var(--text-primary)}
.sb-parent .chev{width:14px;height:14px;margin-left:auto;color:var(--text-muted);transition:transform .15s ease}
.sb-parent[aria-expanded="true"] .chev{transform:rotate(90deg)}
.sb-count{font-size:11px;color:var(--text-muted);background:var(--surface-hover);border:1px solid var(--border);border-radius:var(--radius-full);padding:1px 7px;margin-left:auto}
.sb-parent[aria-expanded="true"] .sb-count{display:none}
.sb-children{display:none;padding-left:27px;border-left:1px solid var(--border);margin-left:20px}
.sb-children.open{display:block}
.sb-children .sb-item{height:32px;font-size:13px}
.sb-item[data-hidden],.sb-parent[data-hidden],.sb-children[data-hidden],.sb-label[data-hidden]{display:none}
/* Plan-withheld nav entry: still reachable, so the page can explain the upgrade. */
.sb-lock{margin-left:auto;font-size:10px;padding:1px 6px}

.sb-foot{padding:14px;border-top:1px solid var(--border);flex-shrink:0}
.dark-card{background:var(--surface-dark);color:var(--text-on-dark);border-radius:var(--radius-md);padding:14px}
.dark-card .lbl{font-size:12.5px;font-weight:600}
.dark-card .sub{font-size:12px;color:var(--text-on-dark-muted);margin-top:2px}
.dark-card code{font-family:var(--mono);font-size:13px;letter-spacing:.05em}
.dark-card .row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}
.dark-card a.cta{display:block;margin-top:10px;font-size:12.5px;font-weight:600;color:var(--text-on-dark);border:1px solid var(--border-on-dark);border-radius:var(--radius-sm);text-align:center;padding:7px 0}
.dark-card a.cta:hover{background:var(--surface-on-dark-hover)}
.copy-btn{background:var(--surface-on-dark-hover);border:0;color:var(--text-on-dark-muted);width:26px;height:26px;border-radius:6px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.copy-btn:hover{background:var(--border-on-dark)}
.copy-btn svg{width:13px;height:13px}
/* A copy button pinned inside a code sample, so long snippets (API examples)
   can be copied without selecting across the scrollable block. */
.code-block{position:relative}
.code-block pre{padding-right:48px;margin:0}
.code-block .copy-btn{position:absolute;top:10px;right:10px}
.plan-card{background:var(--accent-light);border:1px solid var(--accent-border);border-radius:var(--radius-md);padding:14px}
.plan-card .name{font-size:12.5px;font-weight:700;color:var(--accent)}
.plan-card .sub{font-size:12px;color:var(--text-secondary);margin-top:2px}

/* ---------- 6. Topbar ---------- */
.hamburger{display:none;width:36px;height:36px;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);flex-shrink:0}
.topbar-search{flex:1;max-width:420px;display:flex;align-items:center;gap:8px;height:36px;padding:0 10px;border:1px solid var(--border-strong);border-radius:var(--radius-md)}
.topbar-search svg{width:15px;height:15px;color:var(--text-muted)}
.topbar-right{display:flex;align-items:center;gap:6px;margin-left:auto}
.icon-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;border:0;background:transparent;border-radius:var(--radius-md);color:var(--text-secondary);position:relative}
/* Theme toggle: show the icon for the theme you would switch *to*. */
.theme-toggle .theme-icon-dark{display:none}
.theme-toggle .theme-icon-light{display:block}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .theme-toggle .theme-icon-light{display:none}
  :root:not([data-theme="light"]) .theme-toggle .theme-icon-dark{display:block}
}
:root[data-theme="dark"] .theme-toggle .theme-icon-light{display:none}
:root[data-theme="dark"] .theme-toggle .theme-icon-dark{display:block}
:root[data-theme="light"] .theme-toggle .theme-icon-light{display:block}
:root[data-theme="light"] .theme-toggle .theme-icon-dark{display:none}
.icon-btn:hover{background:var(--surface-hover)}
.dot{position:absolute;top:7px;right:7px;width:7px;height:7px;border-radius:50%;background:var(--destructive);border:2px solid var(--surface)}
/* Service status indicator — inline, unlike the .dot notification bubble. */
.dot-status{width:8px;height:8px;border-radius:50%;background:var(--destructive);flex-shrink:0}
.dot-status.is-ok{background:var(--success)}
.dot-status.is-off{background:var(--text-muted)}
.user-chip{display:flex;align-items:center;gap:8px;height:36px;padding:0 8px 0 4px;border-radius:var(--radius-md);border:0;background:transparent}
.user-chip:hover{background:var(--surface-hover)}
.user-chip .name{font-size:13.5px;font-weight:600}
.avatar{width:28px;height:28px;border-radius:var(--radius-full);background:var(--accent-light);color:var(--accent);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:12px;flex-shrink:0}
.avatar-lg{width:56px;height:56px;font-size:20px}
.avatar-sm{width:24px;height:24px;font-size:10px}

/* ---------- 7. Buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border-radius:var(--radius-md);font-size:14px;font-weight:600;border:1px solid transparent;transition:background .15s ease,border-color .15s ease;white-space:nowrap}
.btn svg{width:16px;height:16px;flex-shrink:0}
.btn-dark{background:var(--surface-dark);color:var(--text-on-dark)}
.btn-dark:hover{background:var(--surface-dark-hover)}
.btn-accent{background:var(--accent);color:#fff}
.btn-accent:hover{background:var(--accent-hover)}
.btn-outline{background:var(--surface);color:var(--text-primary);border-color:var(--border-strong)}
.btn-outline:hover{background:var(--surface-hover)}
.btn-ghost{background:transparent;color:var(--text-secondary)}
.btn-ghost:hover{background:var(--surface-hover);color:var(--text-primary)}
.btn-destructive{background:var(--destructive);color:#fff}
.btn-destructive:hover{filter:brightness(.93)}
.btn-danger-outline{background:var(--surface);color:var(--destructive);border-color:var(--destructive-border)}
.btn-danger-outline:hover{background:var(--destructive-bg)}
.btn-sm{height:34px;padding:0 12px;font-size:13px}
.btn-xs{height:28px;padding:0 9px;font-size:12px;border-radius:var(--radius-sm)}
.btn-lg{height:46px;padding:0 22px;font-size:15px}
.btn-block{width:100%}
.btn:disabled,.btn[aria-disabled="true"]{opacity:.5;pointer-events:none}
.btn-group{display:flex;gap:8px;flex-wrap:wrap}

/* ---------- 8. Forms ---------- */
.field{margin-bottom:16px}
.field-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
label,.label{display:block;font-size:13px;font-weight:600;margin-bottom:6px}
/* Text-entry fields are styled by EXCLUSION, not by listing `input[type=…]`.
   An allowlist silently misses two things: `<input>` with no type attribute —
   valid HTML that defaults to text — and any type nobody thought to add
   (time, datetime-local, week). Both fall through to the 20px native box with
   no padding, which is how text ends up clipped.
   The exclusions sit in :where() so the whole selector keeps the specificity of
   a bare `input` (0,0,1). That is deliberate: every component override below
   (.check input, .switch input, .search-field input …) is (0,1,1) and must win
   on specificity rather than on source order. */
.input,
input:not(:where([type=checkbox],[type=radio],[type=range],[type=file],[type=submit],[type=button],[type=reset],[type=image],[type=color],[type=hidden])),
select,textarea{
  width:100%;height:40px;padding:9px 12px;border:1px solid var(--border-strong);border-radius:var(--radius-md);
  font-size:13.5px;line-height:1.4;color:var(--text-primary);background:var(--surface)}
textarea{height:auto;min-height:96px;padding:10px 12px;resize:vertical;line-height:1.55}
/* Date and time fields. iOS Safari gives them a built-in minimum width and
   centres the value, so in a narrow column they spill past their container.
   Hold them to the column everywhere; on iOS (-webkit-touch-callout is
   iOS-only) also drop the native look so the width sticks, and left-align the
   value like every other field. Tapping still opens the native picker. */
input:where([type=date],[type=datetime-local],[type=time],[type=month],[type=week]){min-width:0;max-width:100%;display:block}
@supports (-webkit-touch-callout:none){
  input:where([type=date],[type=datetime-local],[type=time],[type=month],[type=week]){-webkit-appearance:none;appearance:none;text-align:left}
  input:where([type=date],[type=datetime-local],[type=time],[type=month],[type=week])::-webkit-date-and-time-value{text-align:left;margin:0}
}
.form-grid > *{min-width:0}
/* Phones (iOS Safari and Chrome) zoom the whole page into a field whose text
   is under 16px when it gets focus, and leave it zoomed. Touch screens get
   16px text in fields; nothing else changes. !important because component
   rules (.input-sm, compact toolbars) set smaller sizes. Not maximum-scale=1
   in the viewport: that would also stop people pinch-zooming. */
@media (hover:none) and (pointer:coarse){
  input:not(:where([type=checkbox],[type=radio],[type=range],[type=file],[type=submit],[type=button],[type=reset],[type=image],[type=color],[type=hidden])),
  select,textarea,[contenteditable="true"]{font-size:16px!important}
}

/* File inputs keep their native control but sit on the same rail as every other
   field, with the picker restyled as a small secondary button. */
input:where([type=file]){width:100%;min-height:40px;padding:8px 12px;border:1px solid var(--border-strong);
  border-radius:var(--radius-md);font-size:13px;color:var(--text-secondary);background:var(--surface);cursor:pointer}
input:where([type=file])::file-selector-button{margin-right:10px;padding:5px 11px;border:1px solid var(--border-strong);
  border-radius:var(--radius-sm);background:var(--surface-hover);color:var(--text-primary);
  font-family:inherit;font-size:12.5px;font-weight:600;cursor:pointer}
input:where([type=file])::file-selector-button:hover{background:var(--border)}
input:where([type=file]):focus-visible{outline:0;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}
.input:focus,input:focus,select:focus,textarea:focus{outline:0;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}
input:disabled,select:disabled,textarea:disabled{background:var(--surface-hover);color:var(--text-muted);cursor:not-allowed}
select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:16px;padding-right:34px}
.input-icon{position:relative}
.input-icon>svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--text-muted);pointer-events:none}
.input-icon input{padding-left:36px}
.help{font-size:12px;color:var(--text-muted);margin-top:5px}
/* Verification-code boxes (public/js/app.js, initCodeBoxes): the real input
   lies invisibly over a row of boxes that mirror its digits. */
.code-boxes{position:relative;width:100%;max-width:304px;margin:2px 0}
.code-boxes.is-center{margin-left:auto;margin-right:auto}
.code-boxes-cells{display:flex;gap:8px}
.code-box{flex:1 1 0;min-width:0;height:56px;display:flex;align-items:center;justify-content:center;
  background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius-md);
  font-family:var(--font);font-size:22px;font-weight:600;line-height:1;color:var(--text-primary);
  font-variant-numeric:tabular-nums;box-shadow:var(--shadow-xs);transition:border-color .12s ease,box-shadow .12s ease}
.code-box.is-active{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}
.code-box.is-active:empty::after{content:"";width:1.5px;height:24px;border-radius:1px;background:var(--text-primary);animation:code-caret 1.1s steps(1) infinite}
@keyframes code-caret{50%{opacity:0}}
@media (prefers-reduced-motion:reduce){.code-box{transition:none}.code-box.is-active:empty::after{animation:none}}
.code-boxes>input.code-boxes-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;
  opacity:0;font-size:16px;cursor:text;caret-color:transparent}
.code-boxes.is-plain{max-width:none}
.code-boxes.is-plain .code-boxes-cells{display:none}
.code-boxes-alt{display:block;margin:10px 0 0;padding:0;border:0;background:none;font-size:12.5px;font-weight:600;color:var(--accent);cursor:pointer}
.code-boxes-alt.is-center{margin-left:auto;margin-right:auto}
.code-boxes-alt:hover{color:var(--accent-hover)}
@media (max-width:360px){.code-boxes-cells{gap:6px}.code-box{height:50px;font-size:20px}}
.error-text{font-size:12px;color:var(--destructive);margin-top:5px}
/* Paired with .error-text for JS-set status lines. Without it, a connection
   test's success and failure read identically. */
.ok-text{font-size:12px;color:var(--success);margin-top:5px}
.check{display:flex;align-items:flex-start;gap:9px;font-size:13.5px;font-weight:400;margin-bottom:0}
.check input{width:16px;height:16px;height:16px;margin-top:2px;flex-shrink:0;accent-color:var(--accent)}
/* Pairs up when there is room and drops to one column when there is not —
   keyed to the CONTAINER, not the viewport. A hard 2-column grid squeezed a
   wide-screen sidebar panel down to ~125px fields and clipped their contents. */
.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:16px}

/* Reorderable list entries (profile experience/education). The order of these
   cards is the order they are saved in and the order a generated CV prints, so
   they need a way to be moved that is not only drag. */
.entry-actions{display:flex;align-items:center;gap:2px;margin-left:auto}
.entry-move{width:28px;height:28px;display:flex;align-items:center;justify-content:center;
  border:0;background:transparent;border-radius:var(--radius-sm);color:var(--text-muted);cursor:pointer}
.entry-move:hover:not(:disabled){background:var(--surface-hover);color:var(--text-primary)}
.entry-move:disabled{opacity:.3;cursor:default}
.entry-move svg{width:15px;height:15px}
/* `touch-action:none` so a drag from the handle is not stolen by the page's
   own scrolling. The drag is pointer-event based, so it works with a finger
   too and the handle stays visible on touch. */
.entry-grip{display:flex;align-items:center;color:var(--text-muted);cursor:grab;padding:2px;
  border:0;background:transparent;border-radius:var(--radius-sm);touch-action:none}
.entry-grip:active{cursor:grabbing}
.entry-grip svg{width:15px;height:15px}
[data-entry].is-dragging{opacity:.5;outline:2px solid var(--accent);outline-offset:-2px}
.switch{position:relative;width:38px;height:22px;flex-shrink:0;display:inline-block}
.switch input{opacity:0;width:0;height:0;position:absolute}
.switch .slider{position:absolute;inset:0;background:var(--border-strong);border-radius:var(--radius-full);transition:.15s;cursor:pointer}
.switch .slider::before{content:"";position:absolute;width:16px;height:16px;left:3px;top:3px;background:var(--switch-knob);border-radius:50%;transition:.15s}
.switch input:checked + .slider{background:var(--accent)}
.switch input:checked + .slider::before{transform:translateX(16px)}
.switch input:focus-visible + .slider{box-shadow:0 0 0 3px var(--accent-light)}

/* Range input. The global input rule targets specific `type=` values, so a range
   is otherwise left as the unstyled platform widget. */
input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:6px;padding:0;border:0;
  border-radius:var(--radius-full);background:var(--surface-hover);cursor:pointer}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;
  border-radius:50%;background:var(--accent);border:2px solid var(--surface);box-shadow:var(--shadow-xs);cursor:pointer}
input[type=range]::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:var(--accent);
  border:2px solid var(--surface);cursor:pointer}
input[type=range]:focus-visible{outline:0;box-shadow:0 0 0 3px var(--accent-light)}
/* position:relative gives the visually-hidden radio a containing block —
   without it the absolutely positioned input escapes to whatever ancestor
   happens to be positioned. */
.radio-card{display:block;cursor:pointer;position:relative}
.radio-card input{position:absolute;opacity:0}
/* `.body` is a <span>. It carries a border, padding and a background, so it
   MUST be a block — as an inline box the border painted as wrapped fragments
   and the text spilled outside the card. Two call sites used to patch this
   with an inline `display:block`, which is why only the template pickers
   looked right. `.chip-group .body` sets its display for the same reason. */
.radio-card .body{display:block;border:1px solid var(--border);border-radius:var(--radius-lg);padding:14px;transition:border-color .15s ease,background .15s ease}
.radio-card input:checked + .body{border-color:var(--accent);background:var(--accent-light)}
/* Withheld data source — dimmed and unselectable, but still shown so the
   capability is discoverable rather than silently missing. */
/* Positions list in the job editor. One row per role so a multi-role post can
   be read at a glance; the detail lives in a dialog. */
.position-row{display:flex;align-items:center;gap:8px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);padding:4px 8px 4px 4px}
.position-row + .position-row{margin-top:8px}
.position-open{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;text-align:left;padding:10px 12px;border:0;border-radius:var(--radius-sm);background:none;cursor:pointer}
.position-open:hover{background:var(--surface-hover)}
.position-open .help{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.position-remove{flex-shrink:0}
@media (max-width:600px){
  .position-row{align-items:stretch;flex-direction:column;padding:4px}
  .position-remove{align-self:flex-end}
}

/* Step navigation for the quick-apply card. Sits above the step body so Back
   and Try again are in one predictable place rather than repeated per step. */
.qa-stepnav{display:flex;align-items:center;gap:4px;margin-bottom:12px;min-height:28px}
.qa-stepnav .btn svg{width:15px;height:15px}
/* Back stays left; everything else sits at the far right. Grouped rather than
   pushing one button, so the alignment holds whichever of them is shown. */
.qa-stepnav-right{margin-left:auto;display:flex;align-items:center;gap:4px}

/* Mobile Money checkout fields. Label-above-value boxes; the design system has
   no static-value pattern, and a disabled <input> would read as broken rather
   than as "this is the amount you are paying". */
.mm-field{display:flex;flex-direction:column;gap:2px;border:1px solid var(--border);border-radius:var(--radius-lg);padding:10px 14px;margin-bottom:12px;background:var(--surface)}
.mm-field-label{font-size:12px;color:var(--text-muted)}
.mm-field-value{font-size:17px;color:var(--text-primary)}
.mm-field-note{font-size:11.5px;color:var(--text-muted)}
.mm-field-input:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}
.mm-phone-row{display:flex;align-items:center;gap:8px}
.mm-phone-field{position:relative;margin-bottom:12px}
.mm-phone-label{display:block;margin:0 0 6px;font-size:13px;font-weight:500;color:var(--text-primary)}
.mm-phone-row .mm-phone-input{flex:1 1 auto;min-width:0;height:40px;padding:0 12px;border:1px solid var(--border-strong);border-radius:var(--radius-md);background:var(--surface);font-size:16px;letter-spacing:.02em;font-variant-numeric:tabular-nums;color:var(--text-primary)}
.mm-phone-row .mm-phone-input:focus{outline:0;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}
.mm-network-options{display:flex;flex-wrap:wrap;gap:8px}
.mm-network-option{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 14px;border:1px solid var(--border-strong);border-radius:var(--radius-md);background:var(--surface);font:inherit;font-size:14px;color:var(--text-primary);cursor:pointer;flex:1 1 auto;justify-content:center;white-space:nowrap}
.mm-network-option:hover{border-color:var(--accent)}
.mm-network-option:focus-visible{outline:0;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}
.mm-network-option.is-selected{border-color:var(--accent);background:var(--accent-light);font-weight:600}
.mm-network-dot{width:14px;height:14px;border-radius:50%;border:1.5px solid var(--border-strong);background:var(--surface);flex-shrink:0;box-sizing:border-box}
.mm-network-option.is-selected .mm-network-dot{border:4px solid var(--accent)}
#mobpay-network-field{margin-top:12px}
/* Above the cookie banner (z-index 2900), which otherwise sits on the Pay button on a phone. */
#mobpay-modal{z-index:3000}
.mm-phone-row .pb-cc-btn[disabled]{cursor:default;opacity:1}
.mm-phone-row .pb-cc-btn[disabled]:hover{background:var(--surface)}
.mm-phone-hint{margin:6px 0 0;font-size:12px;color:var(--text-muted)}
.mm-operator{display:inline-block;margin-top:8px}
.mm-prefix{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;padding:3px 7px 3px 4px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface-alt);color:var(--text-primary);font-size:14px}
.mm-prefix[disabled]{cursor:default}
.mm-prefix:not([disabled]):hover{background:var(--surface-hover)}
.mm-flag{display:inline-flex;width:18px;height:12px;border-radius:2px;overflow:hidden;flex-shrink:0}
.mm-flag svg{width:100%;height:100%;display:block}
.mm-caret{width:13px;height:13px;color:var(--text-muted)}
.mm-chip{flex-shrink:0;font-size:11.5px;padding:2px 8px;border-radius:var(--radius-full);background:var(--surface-alt);border:1px solid var(--border);color:var(--text-secondary)}
/* Only rendered once a second country exists. */
.mm-phone-row{position:relative}
.mm-country-menu{position:absolute;top:calc(100% + 4px);left:0;z-index:5;width:max-content;min-width:230px;max-width:100%;max-height:220px;overflow-y:auto;list-style:none;margin:0;padding:4px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);box-shadow:var(--shadow-lg)}
.mm-country-option.is-selected{background:var(--accent-light);font-weight:600}
.mm-country-option{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:var(--radius-sm);cursor:pointer;font-size:14px}
.mm-country-option:hover{background:var(--surface-hover)}
.mm-country-name{flex:1;min-width:0}
.mm-dial{color:var(--text-secondary)}
@media (max-width:600px){
  .mm-field-value,.mm-phone-row input{font-size:16px}
}

/* Transactions: the reference opens a details drawer, so it needs to look
   clickable without becoming a second button style. */
.tx-row .link-button{cursor:pointer}
.link-button{border:0;background:none;padding:0;font:inherit;color:inherit;text-align:left}
.link-button:hover{color:var(--accent);border-color:var(--accent)}

/* Rendered CV pages in the confirmation step. The SVG is page-sized, so it is
   scaled to the card rather than overflowing it. */
/* Full-page CV viewer. Level with dialogs (80) so it covers the drawer (70).
   Panning is native scrolling on .cv-viewer-stage — reimplementing momentum
   would feel wrong on iOS, and the browser already does it properly. */
.cv-viewer{position:fixed;inset:0;z-index:80;background:var(--bg);display:flex;flex-direction:column}
.cv-viewer-bar{display:flex;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid var(--border);background:var(--surface);flex-shrink:0}
.cv-viewer-zoom{display:flex;align-items:center;gap:2px}
.cv-viewer-level{min-width:48px;text-align:center;font-size:12.5px;color:var(--text-secondary);font-variant-numeric:tabular-nums}
.cv-viewer-bar .close{margin-left:auto}
/* touch-action is the whole fix for gestures leaking to the page: pan-x pan-y
   leaves scrolling (and its momentum) to the browser while taking pinch-zoom
   away from it, so the handler below owns zoom and the page never scales. It
   also disables double-tap zoom here. `none` would have meant reimplementing
   panning. */
.cv-viewer-stage{flex:1;overflow:auto;padding:12px;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-x pan-y}
/* Deliberately NOT .cv-preview-page: that rule pins svg width to 100% with
   !important so it fits its card, which would pin the zoom at one level here. */
.cv-viewer-page{margin:0 auto;width:100%}
.cv-viewer-page svg{display:block;width:100%;height:auto;background:#fff;box-shadow:var(--shadow-sm);border-radius:var(--radius-sm)}
.cv-viewer-foot{display:flex;align-items:center;justify-content:center;gap:12px;padding:8px;border-top:1px solid var(--border);background:var(--surface);flex-shrink:0}
/* The inline pages are the way in, so they have to look like it. */
.cv-preview-page{cursor:zoom-in}

/* Template picker drawer: wider than the nav drawer because it shows page
   previews, and a two-up grid so shapes can be compared at a glance. */
.side-drawer-head{display:flex;align-items:center;gap:10px;padding:14px 16px;flex-shrink:0;border-bottom:1px solid var(--border)}
.side-drawer-head .close{margin-left:auto}
.side-drawer-body{flex:1;overflow-y:auto;padding:12px}
.tpl-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.tpl-option{display:flex;flex-direction:column;gap:6px;padding:8px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);cursor:pointer;text-align:left}
.tpl-option:hover{border-color:var(--accent);background:var(--accent-light)}
.tpl-option.is-current{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-light)}
.tpl-shot{aspect-ratio:1/1.414;background:#fff;border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden;display:block}
.tpl-shot img,.tpl-shot svg{width:100%;height:100%;object-fit:cover;object-position:top center;display:block}
.tpl-name{font-size:12px;color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Locked previews stay legible — the point is to show what upgrading buys. */
.tpl-shot{position:relative}
.tpl-option.is-locked{cursor:default}
.tpl-option.is-locked:hover{border-color:var(--border);background:var(--surface)}
.tpl-option.is-locked .tpl-name{display:flex;align-items:center;gap:6px}
/* There was a `@media (max-width:600px){.tpl-grid{grid-template-columns:1fr 1fr}}`
   here. It restated the same two columns but dropped the `minmax(0,·)`, and a
   bare `1fr` floors the column at the item's min-content width — which for
   these cards is the preview PNG's intrinsic width, and differs per template.
   One column won, the other was squeezed, and since .tpl-shot takes its height
   from aspect-ratio the squeezed thumbnail was shorter too. Mobile only,
   because that is the only place the override applied. */

/* Rendered CV pages. Shown in full: a CV is what the employer receives, and
   confirming it inside a 60vh scroller meant approving something you had not
   actually read. */
.cv-preview{border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface-alt);padding:12px}
.cv-preview-page + .cv-preview-page{margin-top:12px}
/* The renderer emits page-sized SVG with its own width/height attributes; those
   win over CSS width unless overridden, which is what made it overflow on a
   phone. */
.cv-preview-page svg{width:100% !important;height:auto !important;max-width:100%;display:block;background:#fff;border-radius:var(--radius-sm);box-shadow:var(--shadow-sm)}
@media (max-width:600px){
  .cv-preview{padding:8px}
}

/* Quick-apply choice cards. Full-width stacked buttons so the options read as
   a decision list rather than a form; the locked one still shows, because the
   upgrade path is the point. */
.qa-option{display:flex;flex-direction:column;gap:3px;width:100%;text-align:left;padding:14px 16px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);cursor:pointer}
.qa-option + .qa-option{margin-top:10px}
.qa-option:hover{border-color:var(--accent);background:var(--accent-light)}
.qa-option.is-locked{background:var(--surface-alt)}
.qa-option.is-locked .td-strong{color:var(--text-secondary)}

/* ---------- 8c. Quick-apply profile confirm ----------
   Read-only summary of the stored profile before it feeds the match: identity
   header, then full-width sections (summary, roles, skills, education). A
   two-column field grid put the headline — often a whole paragraph off the
   CV — in half the card; every value here gets the full width. */
.qa-profile{display:flex;flex-direction:column;gap:18px}
.qa-profile-head{display:flex;gap:14px;align-items:flex-start}
.qa-profile-id{min-width:0;flex:1}
.qa-profile-name{font-size:17px;font-weight:600;margin:0}
.qa-profile-headline{margin:2px 0 0;color:var(--text-secondary)}
.qa-profile-meta{margin:4px 0 0;overflow-wrap:anywhere}
.qa-profile-section{border-top:1px solid var(--border);padding-top:14px}
.qa-profile-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:8px}
.qa-profile-section-head h3{margin:0;font-size:13.5px}
.qa-profile-edit-link{font-size:12.5px;color:var(--accent);white-space:nowrap;background:none;border:0;padding:0;cursor:pointer;font-family:inherit;flex-shrink:0}
.qa-profile-edit-link:hover{text-decoration:underline}
.qa-profile-head .qa-profile-edit-link{margin-left:auto}
.qa-profile-section-first{border-top:0;padding-top:0}
/* In-place edit forms. Fields sit inside .form-grid so they pair up when
   there is room; entries (roles, qualifications) are bordered so the Remove
   button reads as belonging to one entry. */
.qa-profile-form{display:flex;flex-direction:column;gap:12px;align-items:flex-start}
.qa-profile-form .form-grid,.qa-profile-form .field,.qa-profile-form .qa-profile-entries,.qa-profile-form .qa-profile-add-row,.qa-profile-form .qa-profile-chips,.qa-profile-form .qa-profile-form-foot{width:100%}
.qa-profile-form .field{margin-bottom:0}
.qa-profile-entries{display:flex;flex-direction:column;gap:10px}
.qa-profile-entry{display:flex;flex-direction:column;gap:12px;padding:12px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface-alt)}
.qa-profile-entry-foot{display:flex;justify-content:flex-end}
.qa-profile-add-row{display:flex;gap:8px}
.qa-profile-add-row input{flex:1;min-width:0}
.qa-profile-form-foot{display:flex;flex-direction:column;gap:8px;padding-top:4px}
.qa-profile-actions{display:flex;gap:8px;flex-wrap:wrap}
.qa-chip-remove{margin-left:6px;border:0;background:none;padding:0;color:var(--text-muted);font-size:15px;line-height:1;cursor:pointer}
.qa-chip-remove:hover{color:var(--destructive)}
.doc-viewer{display:flex;flex-direction:column}
.doc-viewer-bar{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 12px;border-bottom:1px solid var(--border)}
.doc-viewer-stage{display:flex;flex-direction:column;align-items:center;gap:10px;padding:16px;background:var(--surface-alt);overflow:auto;max-height:78vh;min-height:320px}
.doc-viewer-stage canvas{background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.18);border-radius:2px;max-width:none}
.doc-viewer-status{margin:0}
/* Loading (or could not load): no toolbar, no tall empty stage. */
.doc-viewer:has([data-doc-status]:not([hidden])) .doc-viewer-bar{display:none}
#qa-cv-preview:has(.doc-viewer [data-doc-status]:not([hidden])){border-color:transparent;background:transparent;box-shadow:none}
.doc-viewer:has([data-doc-status]:not([hidden])) .doc-viewer-stage{min-height:0;padding:28px 16px;background:transparent}
.doc-viewer-note{margin:12px 12px 0}
.doc-frame{overflow:hidden;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.18);border-radius:2px;flex-shrink:0}
.doc-frame-inner{transform-origin:0 0}
.doc-frame-inner>*{transform-origin:0 0}
.doc-sheet{margin:0!important;box-shadow:none!important;background:#fff;color:#111}
.doc-sheet-text{width:794px;height:1123px;padding:72px;box-sizing:border-box;font:12.5px/1.6 Georgia,'Times New Roman',serif;white-space:pre-wrap;overflow:hidden}

.doc-viewer-image{max-width:100%;height:auto;border-radius:var(--radius-sm)}
.doc-text{max-height:70vh;white-space:pre-wrap;overflow-wrap:anywhere}
/* Quick apply: the social sign-in buttons sit apart from the "log me in / create one" choice. */
.qa-auth-sep{margin-top:16px;padding-top:16px;border-top:1px solid var(--border)}
/* Quick apply code step: "Not getting a code?" as a short list of tips (icon, what to do, an action). */
.qa-code-tips{border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);overflow:hidden}
.qa-code-tips-title{margin:0;padding:11px 16px;font-size:13px;font-weight:600;color:var(--text-primary);background:var(--surface-alt);border-bottom:1px solid var(--border)}
.qa-code-tips-list{list-style:none;margin:0;padding:0}
.qa-code-tips-list>li{display:flex;gap:12px;align-items:flex-start;padding:13px 16px}
.qa-code-tips-list>li[hidden]{display:none}
.qa-code-tips-list>li+li{border-top:1px solid var(--border)}
.qa-code-tips-list p{margin:0}
.qa-code-tips-list p.mt-1{margin-top:3px}
.qa-code-tips-icon{flex:none;width:32px;height:32px;border-radius:var(--radius-full);display:grid;place-items:center;background:var(--accent-light);color:var(--accent)}
.qa-code-tips-icon svg{width:16px;height:16px}
.auth-switch button{border:0;background:none;cursor:pointer;text-align:center;font:inherit;font-size:13px;font-weight:600;padding:7px 8px;border-radius:var(--radius-sm);color:var(--text-secondary)}
.auth-switch button.is-active{background:var(--surface);color:var(--text-primary);box-shadow:0 1px 2px rgba(15,23,42,.08)}
/* A page shown inside another page's dialog (?embed=1, e.g. the CV editor in quick apply): no app chrome. */
body[data-embed="1"] .sidebar,body[data-embed="1"] .topbar,body[data-embed="1"] .backdrop,body[data-embed="1"] #jmAdminBar{display:none!important}
body[data-embed="1"] .main{margin-left:0}
/* Quick apply: the CV editor over the card. */
.qa-editor{position:fixed;inset:0;z-index:300;background:var(--bg);display:flex;flex-direction:column}
.qa-editor[hidden]{display:none}
.qa-editor iframe{flex:1;width:100%;border:0}
/* Quick apply review: the letter's tools as two equal tiles (icon, action, status line). */
.qa-tools{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}
.qa-tool{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);color:var(--text-primary);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,background .15s ease}
.qa-tool[hidden]{display:none}
.qa-tool:hover:not(:disabled){border-color:var(--accent);background:var(--accent-light)}
.qa-tool:disabled{opacity:.65;cursor:progress}
.qa-tool svg{width:20px;height:20px;flex-shrink:0;padding:8px;box-sizing:content-box;border-radius:var(--radius-md);background:var(--accent-light);color:var(--accent)}
.qa-tool-title{display:block;font-size:14px;font-weight:600}
.qa-tool-sub{display:block;font-size:12px;color:var(--text-muted);margin-top:1px}
.qa-downloads{padding:10px 14px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface)}
.qa-download-list{list-style:none;margin:0;padding:0}
.qa-download-list li{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;padding:6px 0}
.qa-download-list li + li{border-top:1px solid var(--border)}
.qa-download-link{color:var(--accent);font-weight:600}
.qa-download-link:hover{text-decoration:underline}
/* The provider found from the account email, with its one-click connect. */
.mbc-detected{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;border:1px solid var(--accent-border);border-radius:var(--radius-lg);background:var(--accent-light)}
.mbc-detected[hidden]{display:none}
.mbc-detected-icon svg{width:20px;height:20px;display:block;color:var(--accent)}
.mbc-detected-text{display:flex;flex-direction:column;min-width:0;flex:1 1 160px;overflow-wrap:anywhere}
.mbc-detected-action{flex-shrink:0}
.mbc-link-btn{border:0;background:none;padding:0;font:inherit;cursor:pointer}
.mbc-detected.is-connected .mbc-detected-icon svg{color:var(--success)}
/* An application's email: a readable centred column, not the card's full width. */
/* About four fifths of the card on wide screens (the letter reads as one block), all of it on narrow ones. */
.app-email{width:100%;max-width:max(760px,80%);margin-inline:auto}
.app-email-to{display:flex;gap:10px;align-items:baseline;margin:0 0 12px;overflow-wrap:anywhere}
.app-email-to .label{margin:0}
.mail-preview{border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface-alt);overflow:hidden}
.mail-preview-head{margin:0;padding:6px 20px;border-bottom:1px solid var(--border);background:var(--surface)}
.mail-preview-head > div{display:grid;grid-template-columns:72px 1fr;gap:12px;padding:8px 0;font-size:13.5px}
.mail-preview-head > div + div{border-top:1px solid var(--border)}
.mail-preview-head dt{color:var(--text-muted);font-weight:500}
.mail-preview-head dd{margin:0;min-width:0;overflow-wrap:anywhere;color:var(--text-primary)}
.prose.mail-preview-body{max-width:none;padding:20px 24px 24px;font-size:14.5px;line-height:1.7;color:var(--text-primary)}
.mail-preview-body.is-plain{white-space:pre-wrap}
.mail-preview-body > *{margin-bottom:0}
.mail-preview-body > * + *{margin-top:14px}
/* Email settings: who you send as, then each account as a row with its own actions. */
.es-hero.is-ready{border-color:var(--accent-border)}
.es-hero-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.es-hero-text{flex:1 1 220px;min-width:0}
.es-hero-text .stat-label{margin:0}
.es-hero-address{font-size:18px;font-weight:600;color:var(--text-primary);overflow-wrap:anywhere;margin:2px 0}
.es-icon{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:var(--radius-md);background:var(--accent-light);color:var(--accent)}
.es-icon svg{width:20px;height:20px}
.es-icon.is-success{background:var(--success-bg);color:var(--success)}
.es-icon.is-warning{background:var(--warning-bg);color:var(--warning)}
.es-list > .es-row + .es-row{border-top:1px solid var(--border)}
.es-row{padding:16px 18px}
.es-row-main{display:flex;align-items:flex-start;gap:12px}
.es-row-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;overflow-wrap:anywhere}
.es-row-text .pill{margin-left:6px;vertical-align:1px}
.es-row-side{flex-shrink:0}
.es-row-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0 50px}
.es-row-actions:empty{display:none}
.es-row-note{margin:8px 0 0 50px}
.es-row-form{margin:14px 0 0 50px}
.es-details > summary{cursor:pointer;font-size:12.5px;color:var(--text-muted);width:max-content;max-width:100%}
.es-details > summary:hover{color:var(--text-primary)}
.es-servers{margin:8px 0 0;display:grid;gap:4px;font-size:12.5px}
.es-servers > div{display:grid;grid-template-columns:130px 1fr;gap:10px}
.es-servers dt{color:var(--text-muted)}
.es-servers dd{margin:0;overflow-wrap:anywhere;font-family:var(--font-mono,ui-monospace,monospace)}
/* Quick apply confirm step: fill the profile from a document. */
.qa-docfill{padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface-alt)}
.qa-docfill.is-lead{border-color:var(--accent-border);background:var(--accent-light);padding:16px}
.qa-docfill-head{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none}
.qa-docfill-head::-webkit-details-marker{display:none}
.qa-docfill-head::after{content:"";width:7px;height:7px;margin-left:auto;flex-shrink:0;border-right:2px solid var(--text-muted);border-bottom:2px solid var(--text-muted);transform:rotate(45deg);transition:transform .15s ease}
.qa-docfill[open] > .qa-docfill-head::after{transform:rotate(-135deg)}
.qa-docfill-label{display:flex;flex-direction:column;min-width:0}
.qa-docfill:not(.is-lead){padding:8px 12px}
.qa-docfill-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:var(--radius-md);background:var(--surface);color:var(--accent);border:1px solid var(--border)}
.qa-docfill-icon svg{width:18px;height:18px}
.qa-docfill-upload{cursor:pointer;margin:0}
.qa-docfill-list{list-style:none;margin:10px 0 0;padding:0;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);max-height:240px;overflow-y:auto}
.qa-docfill-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px}
.qa-docfill-item + .qa-docfill-item{border-top:1px solid var(--border)}
.qa-docfill-name{display:flex;flex-direction:column;min-width:0}
.qa-docfill-status{margin:8px 0 0}
.qa-cv-files{margin:10px 0;padding:12px 14px;border:1px solid var(--accent-border);border-radius:var(--radius-lg);background:var(--accent-light)}
.qa-cv-files[hidden]{display:none}
.qa-option-premium{position:relative;border-color:var(--accent);background:linear-gradient(135deg,var(--accent-light),var(--surface));box-shadow:0 1px 0 var(--accent-border) inset,0 4px 14px rgba(37,99,235,.10)}
.qa-option-premium:hover{background:var(--accent-light)}
.qa-option-premium .help{color:var(--text-secondary)}
.qa-score{display:flex;gap:16px;align-items:flex-start;padding:14px 16px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.qa-score-num{display:flex;flex-direction:column;align-items:center;min-width:64px}
.qa-score-num strong{font-size:1.9rem;line-height:1;font-weight:700}
.qa-score.is-high .qa-score-num strong{color:var(--success)}
.qa-score.is-mid .qa-score-num strong{color:var(--accent)}
.qa-score.is-low .qa-score-num strong{color:var(--warning)}
.qa-score-text{flex:1;min-width:0}
.qa-gaps{display:flex;flex-wrap:wrap;gap:6px}
.qa-premium-offer{padding:16px;border:1px solid var(--accent);border-radius:12px;background:linear-gradient(135deg,var(--accent-light),var(--surface))}
.qa-premium-offer.is-ready{border-color:var(--success-border);background:var(--success-bg)}
.qa-offer{display:grid;gap:6px}
.qa-cv-score{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.qa-cv-score.is-low{border-color:var(--warning);background:linear-gradient(135deg,rgba(245,158,11,.10),var(--surface))}
.qa-cv-score.is-mid{border-color:var(--accent)}
.qa-cv-score.is-high{border-color:var(--success-border,var(--success))}
.qa-cv-score-num{display:flex;flex-direction:column;align-items:center;min-width:58px}
.qa-cv-score-num strong{font-size:1.45rem;line-height:1;font-weight:700}
.qa-cv-score-num span{font-size:.62rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-secondary);margin-top:3px;white-space:nowrap}
.qa-cv-score.is-low .qa-cv-score-num strong{color:var(--warning)}
.qa-cv-score.is-mid .qa-cv-score-num strong{color:var(--accent)}
.qa-cv-score.is-high .qa-cv-score-num strong{color:var(--success)}
.qa-cv-score-text{flex:1;min-width:160px}
.qa-cv-score-text p{margin:0}
.qa-cv-score-text .td-strong{font-size:.86rem}
.qa-cv-score-cta{flex:1 1 100%}
.qa-cv-preview-wrap{position:relative}
.qa-cv-edit-fab{position:absolute;top:10px;right:10px;z-index:2;width:38px;height:38px;border-radius:50%;border:0;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 14px rgba(0,0,0,.25);cursor:pointer}
.qa-cv-edit-fab:hover,.qa-cv-edit-fab:focus-visible{filter:brightness(1.1);outline:2px solid var(--accent-light);outline-offset:2px}
.qa-cv-edit-fab[hidden]{display:none}
.qa-cv-actions{display:grid;gap:8px}
.qa-cv-actions-row{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;align-items:center}
.qa-cv-actions-row:not(:has(> :not([hidden]))){display:none}
@media (min-width:640px){.qa-cv-score-cta{flex:0 0 auto}}
.qa-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.qa-match-step .qa-offer.mt-3{margin-top:8px}
.qa-match-actions{gap:8px;align-items:center;justify-content:center}
.qa-match-actions .btn{padding-top:6px;padding-bottom:6px;line-height:1.3}
.qa-score-promo{margin:3px 0 0;font-size:.76rem;color:var(--text-secondary);line-height:1.4}
.qa-offer-pitch{margin:4px 0 0;font-size:.8rem;line-height:1.4;color:var(--text-secondary)}
.qa-offer-row .qa-offer-pitch{margin:0}
.qa-offer-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:6px}
.qa-offer-row .qa-offer-sub{margin:0}
.qa-offer-row .btn{flex-shrink:0}
.qa-offer-plan{padding:10px 14px;border:1px solid var(--accent);border-radius:14px;background:linear-gradient(135deg,var(--accent-light),var(--surface));box-shadow:0 6px 24px rgba(0,0,0,.12)}
.qa-offer-once{padding:9px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.qa-offer-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.qa-offer-title{display:grid;gap:2px;min-width:0}
.qa-offer-tag{font-size:.65rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--accent);padding:2px 6px;border:1px solid var(--accent);border-radius:999px;white-space:nowrap}
.qa-offer-name-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.qa-offer-cta{margin-top:8px}
.qa-offer-name{font-size:1.05rem;line-height:1.25}
.qa-offer-sub{margin:4px 0 0;font-size:.82rem;color:var(--text-secondary)}
.qa-offer-title .qa-offer-sub{margin:0}
.qa-offer-value{color:var(--success);font-weight:600}
.qa-offer-perks{margin:6px 0 0;padding:0;list-style:none;display:grid;grid-template-columns:1fr 1fr;gap:2px 10px;font-size:.76rem}
.qa-offer-perks li{display:flex;gap:6px;align-items:baseline}
.qa-offer-perks li::before{content:"\2713";color:var(--success);font-weight:700}
.qa-offer-fine{margin:4px 0 0;font-size:.75rem;color:var(--text-secondary);text-align:center}
.qa-offer-price{text-align:right;flex-shrink:0}
.qa-offer-price-main{display:flex;align-items:baseline;justify-content:flex-end;gap:3px;white-space:nowrap}
.qa-offer-price-main strong{font-size:1.3rem;font-weight:700;color:var(--accent);line-height:1.1}
.qa-offer-once .qa-offer-price-main strong{font-size:1.05rem;color:var(--text-primary)}
.qa-offer-price-per{font-size:.78rem;color:var(--text-secondary)}
.qa-offer-price-zmw{font-size:.72rem;color:var(--text-secondary);margin-top:2px;white-space:nowrap}
.qa-score{padding:10px 14px;align-items:center}
.qa-score-num strong{font-size:1.6rem}
.qa-gap-btn{margin-top:4px;padding:0;border:0;background:none;color:var(--warning);font-size:.82rem;font-weight:600;text-align:left;cursor:pointer}
.qa-gap-btn:hover{text-decoration:underline}
.qa-pay-methods{display:grid;gap:10px}
.qa-pay-method{display:grid;gap:3px;width:100%;padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text-primary);text-align:left;cursor:pointer}
.qa-pay-method:hover,.qa-pay-method:focus-visible{border-color:var(--accent);background:var(--accent-light)}
.qa-pay-method-top{display:flex;justify-content:space-between;gap:10px;align-items:baseline}
.qa-pay-method-amount{font-weight:700;color:var(--accent);white-space:nowrap}
.qa-pay-method-note{font-size:.78rem;color:var(--text-secondary)}
.qa-premium-offer-head{display:flex;justify-content:space-between;gap:12px;align-items:baseline}
.qa-premium-offer-price{font-size:1.35rem;font-weight:700;color:var(--accent);white-space:nowrap}
.qa-premium-list{margin:0;padding:0;list-style:none;display:grid;gap:4px;font-size:.9rem}
.qa-premium-list li::before{content:"\2713";color:var(--success);font-weight:700;margin-right:8px}
.qa-rescore strong{color:var(--success)}
.qa-premium-badge{margin-left:2px}
.qa-premium-cta{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:8px;width:100%}
.qa-boost{position:relative;padding:18px 18px 16px;border:1px solid var(--accent);border-radius:var(--radius-lg);background:linear-gradient(135deg,var(--accent-light),var(--surface));box-shadow:0 4px 14px rgba(37,99,235,.10)}
.qa-boost-badge{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:var(--radius-full);background:var(--accent);color:#fff;font-size:11.5px;font-weight:700;letter-spacing:.02em}
.qa-boost-title{margin:10px 0 0;font-size:16px;font-weight:700;line-height:1.35;color:var(--text-primary)}
/* The price on a line of its own: the amount, then what it covers, then the saving. */
.qa-boost-pricing{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:8px;row-gap:4px;margin-top:6px}
.qa-boost-pricing[hidden]{display:none}
.qa-boost-amount{font-size:28px;font-weight:800;line-height:1.1;letter-spacing:-.01em;color:var(--text-primary)}
.qa-boost-per{font-size:13px;color:var(--text-secondary)}
.qa-boost-was{font-size:13px;color:var(--text-secondary)}
.qa-boost-save{align-self:center}
.qa-boost-list{list-style:none;margin:14px 0 0;padding:12px 0 0;border-top:1px solid var(--border);display:grid;gap:8px;font-size:13.5px;line-height:1.45;color:var(--text-secondary)}
.qa-boost-list li{position:relative;padding-left:24px}
.qa-boost-list li::before{content:"";position:absolute;left:0;top:2px;width:16px;height:16px;border-radius:50%;background:var(--success-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='%2316a34a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat}
/* Two equal buttons side by side; stacked full width on a phone. */
.qa-boost-pay{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-top:16px}
.qa-boost-pay .btn{width:100%;justify-content:center}
.qa-boost-note{margin:10px 0 0;font-size:12px;line-height:1.5;color:var(--text-secondary)}
.qa-premium-price{display:flex;flex-direction:column;gap:1px}
.qa-premium-once{font-size:15px;font-weight:700;color:var(--text-primary)}
.qa-cv-row{gap:10px}
.qa-cv-thumb{display:flex;align-items:center;justify-content:center;width:40px;height:54px;flex-shrink:0;overflow:hidden;padding:0;border:1px solid var(--border);border-radius:4px;background:#fff;cursor:zoom-in}
.qa-cv-thumb svg,.qa-cv-thumb img{width:100%;height:100%;object-fit:cover;object-position:top;display:block}
.qa-cv-thumb-type{font-size:10px;font-weight:700;color:#475569;letter-spacing:.04em}
.qa-docfill-item .qa-docfill-name{flex:1}
.qa-cv-row-actions{display:flex;gap:4px;flex-shrink:0}
.qa-cvprev{max-width:820px}
.qa-cvprev-body{padding-top:12px}
.qa-cvprev-body .doc-viewer-stage{max-height:68vh}
.qa-cvprev-pages{display:flex;flex-direction:column;gap:12px;max-height:68vh;overflow:auto;padding:12px;background:var(--surface-alt);border-radius:var(--radius-md)}
.qa-cvprev-pages .cv-preview-page svg{width:100%;height:auto;display:block;background:#fff}
.qa-cv-group{margin-top:10px}
.qa-cv-group[hidden]{display:none}
.qa-cv-group .stat-label{margin:0 0 6px}
.qa-cv-group .qa-docfill-list{margin-top:0}
.qa-cv-files-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
/* A group of related settings inside a form, with its own heading. */
.form-fieldset{border:1px solid var(--border);border-radius:var(--radius-lg);padding:12px 16px 14px;margin:0 0 16px;min-width:0}
.form-fieldset > legend{padding:0 6px;margin-left:-6px;font-size:13px;font-weight:600;color:var(--text-primary)}
/* Email lists: tabs and search over compact rows that open each list's page. */
.el-index-head{padding-bottom:0}
.el-index-head .tabs{margin-bottom:14px}
.el-search{display:flex;gap:8px;margin-bottom:14px}
.el-search input{flex:1;min-width:0}
.el-rows{list-style:none;margin:0;padding:0;border-top:1px solid var(--border)}
.el-rows li + li{border-top:1px solid var(--border)}
.el-row{display:grid;grid-template-columns:30px minmax(0,1fr) auto 14px;align-items:center;gap:12px;padding:8px 18px;color:var(--text-primary)}
.el-row:hover{background:var(--surface-hover)}
.el-row-icon{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:var(--radius-md);background:var(--surface-alt);border:1px solid var(--border);font-weight:700;font-size:14px;color:var(--text-secondary)}
.el-row-icon.is-platform{background:var(--accent-light);border-color:var(--accent-border);color:var(--accent)}
.el-row-icon.is-locked{background:var(--warning-bg);border-color:var(--warning-border);font-size:13px}
.el-row-main{display:flex;flex-direction:column;gap:1px;min-width:0}
.el-row-title{display:flex;align-items:center;gap:6px;min-width:0}
.el-row-title .pill{flex-shrink:0}
.el-row-meta{display:flex;flex-direction:column;align-items:flex-end;gap:0;font-size:12.5px;color:var(--text-secondary);white-space:nowrap}
.el-row-count strong{color:var(--text-primary)}
.el-row-chevron{color:var(--text-muted);font-size:20px;line-height:1}
@media (max-width:640px){.el-row{grid-template-columns:32px minmax(0,1fr) auto 12px;gap:10px;padding:12px 14px}.el-row-meta .text-xs{display:none}.el-search .btn-outline{display:none}}

.el-empty{text-align:center;padding:28px 20px}
.el-empty-lg{padding:56px 24px}
.el-empty .text-sm{max-width:420px;margin:6px auto 0}
.el-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.el-head-main{min-width:0;flex:1 1 320px}
.el-title{font-size:18px;margin:0}
.el-facts{display:flex;flex-wrap:wrap;gap:6px 22px;margin:12px 0 0}
.el-facts > div{display:flex;flex-direction:column}
.el-facts dt{font-size:11.5px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em}
.el-facts dd{margin:0;font-size:14px;font-weight:600;color:var(--text-primary)}
.el-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.el-note{border-top:1px solid var(--border);padding-top:12px;padding-bottom:12px}
.el-note-line{display:block;margin-top:2px;max-width:320px}
.el-contact-filter{max-width:240px}
.el-more{position:relative}
.el-more > summary{list-style:none}
.el-more > summary::-webkit-details-marker{display:none}
.el-more-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:20;min-width:180px;padding:6px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);box-shadow:var(--shadow-md);display:flex;flex-direction:column}
.el-more-item{display:block;width:100%;padding:8px 10px;border:0;border-radius:var(--radius-sm);background:none;color:var(--text-primary);font:inherit;font-size:13.5px;text-align:left;cursor:pointer}
.el-more-item:hover{background:var(--surface-hover)}
.el-more-item.is-danger{color:var(--destructive)}
@media (max-width:640px){.el-contact-filter{max-width:none;width:100%}}
/* Bulk apply: a three-step flow, list tiles, a live recipient count. */
.flow-steps{list-style:none;margin:0 0 16px;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.flow-step{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);color:var(--text-secondary);font:inherit;text-align:left;cursor:pointer}
.flow-step:disabled{cursor:default;opacity:.7}
.flow-step.is-current{border-color:var(--accent);background:var(--accent-light);color:var(--text-primary)}
.flow-step-num{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;flex-shrink:0;border-radius:var(--radius-full);background:var(--surface-hover);color:var(--text-secondary);font-size:13px;font-weight:700}
.flow-step.is-current .flow-step-num{background:var(--accent);color:#fff}
.flow-step.is-done .flow-step-num{background:var(--success-bg);color:var(--success)}
.flow-step-text{display:flex;flex-direction:column;min-width:0}
.flow-step-title{font-size:13.5px;font-weight:600;color:var(--text-primary)}
.flow-step-sub{font-size:12px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:640px){.flow-step-sub{display:none}.flow-step{justify-content:center;padding:8px}.flow-step-text{display:none}.flow-step.is-current .flow-step-text{display:flex}}
.bulk-list-tools{display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:10px}
@media (max-width:640px){.bulk-list-tools{grid-template-columns:1fr}}
.bulk-lists{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px}
.bulk-list{display:flex;flex-direction:column;gap:8px;padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);transition:border-color .15s ease,background .15s ease}
.bulk-list:hover{border-color:var(--accent)}
.bulk-list.is-chosen{border-color:var(--accent);background:var(--accent-light)}
.bulk-list.is-locked{background:var(--surface-alt)}
.bulk-list-pick{display:flex;align-items:flex-start;gap:10px;margin:0;font-weight:400;cursor:pointer}
.bulk-list.is-locked .bulk-list-pick{cursor:default}
.bulk-list-pick input{margin-top:3px}
.bulk-lock{font-size:13px;line-height:1.4}
.bulk-list-body{display:flex;flex-direction:column;gap:2px;min-width:0}
.bulk-list-tags{margin-top:6px;gap:6px}
.bulk-list-actions{display:flex;gap:6px;justify-content:flex-end;margin-top:auto}
.bulk-ai{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;border:1px dashed var(--accent-border);border-radius:var(--radius-lg);background:var(--accent-light)}
.bulk-ai-text{flex:1 1 220px;min-width:0}
.bulk-ai-row{display:flex;gap:8px;flex:1 1 320px}
.bulk-ai-row input{flex:1;min-width:0}
.bulk-preview{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.bulk-preview li{display:flex;flex-direction:column;padding:8px 10px;border:1px solid var(--border);border-radius:var(--radius-md)}
.bulk-foot{justify-content:space-between}
.bulk-personalise{display:flex;align-items:flex-start;gap:10px;margin:14px 0 0;padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius-lg);font-weight:400;cursor:pointer}
.bulk-personalise:has(input:checked){border-color:var(--accent);background:var(--accent-light)}
.bulk-personalise.is-locked{cursor:default;background:var(--surface-alt)}
.bulk-tailoring{margin:12px 0 0;padding:0;border:0;display:grid;gap:8px}
.bulk-tailoring legend{margin-bottom:6px}
.bulk-tailoring-option{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius-lg);font-weight:400;cursor:pointer}
.bulk-tailoring-option input{margin-top:3px}
.bulk-tailoring-option:has(input:checked){border-color:var(--accent);background:var(--accent-light)}
.bulk-tailoring-option.is-locked{cursor:default;opacity:.6}
.bulk-personalise input{margin-top:3px}
.bulk-personalise-text{display:flex;flex-direction:column;gap:3px}
.bulk-review-personal{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.bulk-resume{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.bulk-progress-list{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:0;border:1px solid var(--border);border-radius:var(--radius-lg);max-height:420px;overflow-y:auto}
.bulk-progress-list li{display:grid;grid-template-columns:12px minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 14px;font-size:13.5px}
.bulk-progress-list li + li{border-top:1px solid var(--border)}
.bulk-progress-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bulk-progress-dot{width:8px;height:8px;border-radius:var(--radius-full);background:var(--border)}
.bulk-progress-list li.is-working .bulk-progress-dot{background:var(--accent);animation:bulkPulse 1s ease-in-out infinite}
.bulk-progress-list li.is-sent .bulk-progress-dot{background:var(--success)}
.bulk-progress-list li.is-failed .bulk-progress-dot{background:var(--destructive)}
.bulk-progress-list li.is-failed .bulk-progress-state{color:var(--destructive)}
.bulk-progress-state{text-align:right;max-width:280px;overflow-wrap:anywhere}
@keyframes bulkPulse{50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.bulk-progress-list li.is-working .bulk-progress-dot{animation:none}}
.bulk-count{margin:0;font-size:13.5px}
.bulk-count #bulk-count-text{font-weight:600;color:var(--text-primary)}
.bulk-send-row{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}
.bulk-failed{margin:6px 0 0;padding-left:18px;list-style:disc;font-size:13px}
.bulk-tips{margin:0;padding-left:18px;list-style:disc;display:grid;gap:8px}
@media (max-width:640px){.es-row-actions,.es-row-note,.es-row-form{margin-left:0}}
@media (max-width:640px){.mail-preview-head{padding:4px 14px}.mail-preview-head > div{grid-template-columns:60px 1fr}.mail-preview-body{padding:16px}}
/* Sending by hand: address, subject and letter, each copyable. */
.qa-manual-summary{display:flex;flex-direction:column;gap:2px;padding:14px 18px;cursor:pointer;list-style:none;position:relative;padding-right:40px}
.qa-manual-summary::-webkit-details-marker{display:none}
.qa-manual-summary::after{content:"";position:absolute;right:18px;top:50%;width:7px;height:7px;margin-top:-6px;border-right:2px solid var(--text-muted);border-bottom:2px solid var(--text-muted);transform:rotate(45deg);transition:transform .15s ease}
.qa-manual[open] > .qa-manual-summary::after{transform:rotate(-135deg);margin-top:-2px}
.qa-manual[hidden]{display:none}
.qa-manual-body{border-top:1px solid var(--border)}
.qa-manual-steps{margin:0 0 12px;padding-left:20px;display:grid;gap:4px}
.qa-copy-row{display:grid;grid-template-columns:64px 1fr auto;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--border)}
.qa-copy-row .label{margin:0}
.qa-copy-value{font-size:14px;min-width:0;overflow-wrap:anywhere}
.auth-switch{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface-alt)}
.auth-switch a{text-align:center;font-size:13px;font-weight:600;padding:7px 8px;border-radius:var(--radius-sm);color:var(--text-secondary)}
.auth-switch a.is-active{background:var(--surface);color:var(--text-primary);box-shadow:0 1px 2px rgba(15,23,42,.08)}
.mbc{display:grid;gap:12px}
.mbc-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.mbc-grid3{display:grid;grid-template-columns:2fr 1fr 1fr;gap:10px}
.mbc-found{border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface-alt);padding:10px 12px;display:grid;gap:6px}
.mbc-found p{margin:0}
.mbc-guide{border-top:1px solid var(--border);padding-top:8px;display:grid;gap:4px}
.mbc-steps{margin:0;padding-left:20px;display:grid;gap:3px;line-height:1.45}
.mbc-warning{color:var(--warning)}
.mbc-adv summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--text-secondary)}
.mbc-adv[open]{display:grid;gap:8px}
.mbc-head{margin:6px 0 0;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted)}
.mbc-status{margin:0;color:var(--destructive)}
@media (max-width:560px){.mbc-grid2,.mbc-grid3{grid-template-columns:1fr}}
.qa-profile-summary{margin:0;font-size:14px;line-height:1.55;white-space:pre-line;overflow-wrap:anywhere}
.qa-profile-summary.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.qa-profile-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.qa-profile-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;align-items:center}
.qa-profile-row-title{font-weight:600;font-size:14px;min-width:0;overflow-wrap:anywhere}
.qa-profile-row-sub{grid-column:1;font-size:13px}
.qa-profile-chips{gap:6px}
/* A 60-character skill wraps inside the card instead of overflowing it. */
.qa-profile-chips .chip{max-width:100%;height:auto;min-height:28px;padding:4px 12px;line-height:1.3;text-align:left}

/* Rich-text editor over a markdown field (JobmadicAiOutput.createRichTextEditor).
   The surface grows with its content: a fixed height was half the reason long
   application letters appeared cut off. */
.rte{border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);overflow:hidden}
.rte:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}
.rte-toolbar{display:flex;align-items:center;gap:2px;padding:6px 8px;border-bottom:1px solid var(--border);background:var(--surface-alt);flex-wrap:wrap}
/* Groups formatting from lists from links, so the row scans as three ideas
   rather than one undifferentiated strip of buttons. */
.rte-sep{width:1px;align-self:stretch;margin:2px 6px;background:var(--border)}
.rte-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:1px solid transparent;border-radius:var(--radius-sm);background:none;color:var(--text-secondary);cursor:pointer;transition:background .12s ease,color .12s ease}
.rte-btn svg{width:17px;height:17px}
.rte-glyph{font-size:15px;line-height:1}
.rte-btn:hover{background:var(--surface-hover);color:var(--text-primary)}
.rte-btn:focus-visible{outline:2px solid var(--accent);outline-offset:-1px}
/* Active state matters: without it you cannot tell whether the caret already
   sits inside bold text. */
.rte-btn.is-active{background:var(--accent-light);color:var(--accent);border-color:var(--accent-light)}
.rte-surface{padding:16px 18px;min-height:200px;outline:none;color:var(--text-primary);font-size:14px;line-height:1.65}
.rte-surface:empty::before{content:attr(data-placeholder);color:var(--text-muted)}
.rte-surface > :first-child{margin-top:0}
.rte-surface > :last-child{margin-bottom:0}
.rte-surface p{margin:0 0 12px}
.rte-surface ul,.rte-surface ol{margin:0 0 12px;padding-left:22px}
.rte-surface li{margin:0 0 4px}
.rte-surface[contenteditable="false"]{opacity:.7}
@media (max-width:600px){
  /* Comfortable touch targets; the strip wraps rather than scrolling away. */
  .rte-btn{width:36px;height:36px}
  .rte-surface{padding:14px}
}

.radio-card.is-locked{cursor:not-allowed}
.radio-card.is-locked .body{opacity:.55;background:var(--surface-alt)}
.radio-card.is-locked .pill{margin-left:6px;vertical-align:middle}
.radio-card input:focus-visible + .body{box-shadow:0 0 0 3px var(--accent-light)}
.radio-card input:disabled + .body{opacity:.55;cursor:not-allowed}

/* Chip-style radio group — tone pickers, segmented controls. Selection is a
   native :checked state rather than a class the JS has to keep in sync, which
   is how these controls lost their selected look in the first place. */
.chip-group{display:flex;flex-wrap:wrap;gap:6px}
.chip-group label{cursor:pointer}
.chip-group input{position:absolute;opacity:0;width:0;height:0}
.chip-group .body{display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 13px;
  border-radius:var(--radius-full);border:1px solid var(--border);background:var(--surface);
  font-size:12.5px;color:var(--text-secondary);transition:background .15s ease,border-color .15s ease}
.chip-group label:hover .body{background:var(--surface-hover);color:var(--text-primary)}
.chip-group input:checked + .body{border-color:var(--accent);background:var(--accent-light);
  color:var(--accent);font-weight:600}
.chip-group input:focus-visible + .body{box-shadow:0 0 0 3px var(--accent-light)}
.chip-group input:disabled + .body{opacity:.55;cursor:not-allowed}
/* Button variant. The questionnaire builds its choices in JS as <button>s, and
   there is no checkbox to hang :checked on, so selection is a class. Same rules
   as .body rather than a second chip that drifts from this one. */
.chip-group>button{display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 13px;
  border-radius:var(--radius-full);border:1px solid var(--border);background:var(--surface);
  font-family:inherit;font-size:12.5px;color:var(--text-secondary);cursor:pointer;
  transition:background .15s ease,border-color .15s ease}
.chip-group>button:hover{background:var(--surface-hover);color:var(--text-primary)}
.chip-group>button.is-selected{border-color:var(--accent);background:var(--accent-light);
  color:var(--accent);font-weight:600}
.chip-group>button:focus-visible{outline:0;box-shadow:0 0 0 3px var(--accent-light)}
/* Segmented variant: equal widths, square-ish, sits in a tray. */
.chip-group.is-segmented{gap:2px;background:var(--surface-hover);border-radius:var(--radius-md);padding:3px}
.chip-group.is-segmented label{flex:1}
.chip-group.is-segmented .body{width:100%;justify-content:center;border:0;background:transparent;border-radius:6px}
.chip-group.is-segmented input:checked + .body{background:var(--surface);color:var(--text-primary);
  box-shadow:var(--shadow-xs)}
@media (prefers-reduced-motion:reduce){.chip-group .body{transition:none}}

/* ---------- 8b. Bare inputs (inline search fields) ----------
   These sit inside a bordered wrapper that already owns the height, the padding
   and the focus ring, so the input itself draws nothing.

   `height:100%`, not `height:auto`: auto sizes the box to exactly one line box
   (18.9px), leaving zero slack inside a 36–44px wrapper, so ascenders and
   descenders touch the edges and the caret — drawn at the full line height —
   gets clipped. Filling the wrapper gives the glyphs ~12px of clearance, and
   an input centres its own value vertically, so no padding maths is needed.
   `align-self:stretch` would not do: the hero location input's parent is the
   JS-injected `.combobox`, a block, where align-self has no effect. */
.sb-search input,.topbar-search input,.search-field input{
  border:0;outline:0;width:100%;min-width:0;height:auto;align-self:stretch;padding:0;
  background:transparent;box-shadow:none;font-size:13.5px}
/* Whatever sits between the wrapper and the input — the topbar's <form>, the
   JS-injected .combobox — has to pass the height down. Made flex containers so
   the input stretches inside them; a `height:100%` chain would silently fall
   back to a one-line box the moment another wrapper appeared. Icons and buttons
   declare explicit sizes, so stretch skips them. */
.sb-search form,.topbar-search form,.search-field form,.search-field .combobox{
  display:flex;flex:1;min-width:0;align-self:stretch}
.sb-search input:focus,.topbar-search input:focus,.search-field input:focus{border:0;box-shadow:none}
.sb-search input::placeholder,.topbar-search input::placeholder,.search-field input::placeholder{color:var(--text-muted)}
.sb-search:focus-within,.topbar-search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}

/* type=search paints a clear button in Chrome/Safari and nothing in Firefox, so
   the affordance is browser-dependent chrome the design never accounted for. */
input[type=search]::-webkit-search-cancel-button,
input[type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}

/* File drop target. `.is-active` is toggled on dragenter/dragover. */
.dropzone{border:2px dashed var(--border-strong);border-radius:var(--radius-lg);background:var(--surface-alt);padding:28px 20px;text-align:center;transition:border-color .15s,background .15s}
.dropzone.is-active{border-color:var(--accent);background:var(--accent-light)}
.dropzone .feature-icon{margin:0 auto}
@media (prefers-reduced-motion:reduce){.dropzone{transition:none}}

/* ---------- 9. Cards ---------- */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg)}
/* `:where()` holds this at zero specificity so a page that authors its own gap
   with `.mt-*` (declared later, in §24) actually wins. */
:where(.card) + .card{margin-top:16px}
/* Grid/stack children already get their spacing from the container's `gap`;
   without this reset the rule above also fires between them, pushing every card
   but the first down 16px and making same-row cards different heights. */
.stats > .card,.grid-2 > .card,.grid-3 > .card,.grid-4 > .card,.stack > .card,
.plan-grid > .card{margin-top:0}
/* `.card + .card` is the only flow-rhythm rule in this file, so any *other*
   block following a card sits flush against its border. Same 16px, same zero
   specificity. `.card-foot` is excluded on purpose — it brings its own
   14px padding-top. */
:where(.card) + .btn-group,
:where(.card) + .wrap-flex,
:where(.card) + .row,
:where(.card) + .row-between,
:where(.card) + .toolbar,
:where(.card) + .grid-2,
:where(.card) + .grid-3,
:where(.card) + .grid-4,
:where(.card) + [data-when]{margin-top:16px}
/* The same rhythm when something invisible sits between two blocks (a hidden
   panel shown later, a <script>, a <template>): `+` would otherwise miss and
   leave the blocks touching. Specificity stays one class, so the grid and
   stack resets above still win. */
:where(.card) + :where([hidden],script,template,style,link,input[type=hidden]) + .card,
:where(.card) + :where([hidden],script,template,style,link,input[type=hidden]) + :where([hidden],script,template,style,link,input[type=hidden]) + .card,
:where(.card) + :where([hidden],script,template,style) + .toolbar,
:where(.card) + :where([hidden],script,template,style) + .row-between,
:where(.card) + :where([hidden],script,template,style) + .grid-2,
:where(.card) + :where([hidden],script,template,style) + .grid-3{margin-top:16px}
/* A row of stat cards is a block of its own: whatever follows it gets air. */
:where(.stats) + .card,:where(.stats) + .cv-canvas,:where(.stats) + .grid-2,:where(.stats) + .grid-3,
:where(.stats) + .toolbar,:where(.stats) + .row-between,:where(.stats) + .tabs{margin-top:16px}
/* Flex column so .card-foot pins to the bottom of a stretched grid item and
   footers line up across a row. `details.card` is excluded — flex would
   disturb the <summary> disclosure widget. */
.card:not(details){display:flex;flex-direction:column}
.card:not(details) > .card-body{flex:1}
.card-head{padding:16px 18px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.card-head h2{font-size:14.5px;font-weight:600}
.card-head p{font-size:12.5px;color:var(--text-secondary);margin-top:2px}
.card-body{padding:18px;min-width:0}
.card-foot{padding:14px 18px;border-top:1px solid var(--border);display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
/* <summary> as a card header. `display:flex` (inherited from .card-head)
   suppresses the native disclosure marker in Chromium, so draw the chevron. */
summary.card-head{cursor:pointer;list-style:none;font-size:14.5px;font-weight:600}
summary.card-head::-webkit-details-marker{display:none}
summary.card-head::after{content:"";width:7px;height:7px;border-right:2px solid var(--text-muted);border-bottom:2px solid var(--text-muted);transform:rotate(45deg);margin-left:auto;flex-shrink:0;transition:transform .15s ease}
details[open] > summary.card-head::after{transform:rotate(-135deg)}
summary.card-head:hover{background:var(--surface-hover)}
@media (prefers-reduced-motion:reduce){summary.card-head::after{transition:none}}
.card-link{font-size:12.5px;font-weight:600;color:var(--accent)}
a.card:hover{border-color:var(--border-strong)}

/* ---------- 10. Page header / breadcrumb ---------- */
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:22px}
/* Flex items default to a min-width of their content, so a long unbroken page
   title pushes the header — and the page — wider than the viewport. Let both
   columns shrink, and break the title rather than truncating it: a page title
   is the one string the reader most needs in full. */
.page-head > *{min-width:0}
.page-head h1{overflow-wrap:anywhere}
.page-head .sub{color:var(--text-secondary);font-size:14px;margin-top:4px}
.breadcrumb{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--text-muted);margin-bottom:10px;flex-wrap:wrap}
.breadcrumb a{color:var(--text-secondary)}
.breadcrumb a:hover{color:var(--accent)}
.breadcrumb .sep{color:var(--border-strong)}
.back-link{display:inline-flex;align-items:center;gap:5px;font-size:13px;font-weight:600;color:var(--accent);margin-bottom:18px}

/* ---------- 11. Stats ---------- */
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
/* A stat row is always followed by something — a filter bar, a table card, a
   chart. Most pages hand-patched the gap with an `mt-3` on that next sibling,
   so the ones that forgot (revenue shares, revenue payouts) had their filters
   sitting flush against the cards. Zero-specificity via :where(), so any page
   that still sets an explicit `mt-*` keeps winning and nothing double-spaces. */
:where(.stats) + :where(.filter-bar,.toolbar,.card,.table-wrap,.grid-2,.grid-3,.grid-4,form,section){margin-top:16px}
.stats-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.stats-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.stats-6{grid-template-columns:repeat(6,minmax(0,1fr))}
.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:18px;display:flex;flex-direction:column}
.stat-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.stat-label{font-size:12.5px;color:var(--text-secondary);font-weight:500}
.stat-top svg{width:16px;height:16px;color:var(--text-muted)}
.stat-value{font-size:26px;font-weight:700;margin-top:8px;letter-spacing:-.01em}
.stat-change{font-size:12px;margin-top:6px;display:flex;align-items:center;gap:3px}
.stat-change svg{width:11px;height:11px}
.stat-up{color:var(--success)} .stat-down{color:var(--destructive)}
.stat-link{margin-top:auto;padding-top:8px;font-size:12px;color:var(--accent);font-weight:600;display:inline-block;align-self:flex-start}

/* ---------- 12. Tables ---------- */
.table-wrap{overflow-x:auto}
/* overflow-x:auto also clips vertically, so a row's action menu was cut off
   at the table edge. While a menu inside the table is open, let it overflow. */
.table-wrap:has(.dropdown-content:not([hidden])){overflow:visible}
/* .table-stack: on phones each row becomes a card with labelled cells
   (td[data-label]) rather than a table that scrolls sideways. */
@media (max-width:640px){
  table.table-stack,table.table-stack tbody{display:block}
  table.table-stack thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  table.table-stack tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;padding:12px 0;border-top:1px solid var(--border)}
  table.table-stack td{display:block;padding:0;border-top:0;min-width:0}
  table.table-stack td:first-child{grid-column:1 / -1}
  table.table-stack td[data-label]{display:flex;align-items:center;justify-content:space-between;gap:8px;grid-column:1 / -1;font-size:13px}
  table.table-stack td[data-label]::before{content:attr(data-label);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--text-muted)}
  table.table-stack td.table-stack-actions{grid-column:1 / -1}
  table.table-stack td.table-stack-actions .row-actions{justify-content:flex-start !important}
  /* The card pulls the table out 12px (see below): stacked rows put it back. */
  table.table-stack tr{padding-left:12px;padding-right:12px}
}
table{width:100%;border-collapse:collapse}
th{text-align:left;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--text-muted);padding:14px 12px 10px;white-space:nowrap}
td{font-size:13.5px;padding:12px;border-top:1px solid var(--border);vertical-align:middle}
tbody tr:hover{background:var(--surface-hover)}
/* Every cell keeps its padding, so a row's hover highlight has room around
   the text at both ends. Inside a card the table is pulled out by the same
   12px, so the text still lines up with the card's 18px inset. */
th:first-child,td:first-child{padding-left:12px}
th:last-child,td:last-child{padding-right:12px}
.card > .table-wrap{padding:0 6px 4px;min-width:0}
.card-body > .table-wrap,.card-body > table{margin-left:-12px;margin-right:-12px}
.card-body > table{width:calc(100% + 24px)}
.td-strong{font-weight:600}
.td-muted{color:var(--text-secondary)}
.row-actions{display:flex;align-items:center;gap:4px;justify-content:flex-end}
/* On a <td> the flex layout made it stop being a table cell: it sat at the
   top of the row and missed the row's hover highlight. */
td.row-actions{display:table-cell;text-align:right;white-space:nowrap}
td.row-actions > * + *{margin-left:4px}

/* ---------- 13. Badges / pills / tags ---------- */
.pill{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 9px;border-radius:var(--radius-full);font-size:11.5px;font-weight:600;white-space:nowrap}
.pill-success{background:var(--success-bg);color:var(--success)}
.pill-warning{background:var(--warning-bg);color:var(--warning)}
.pill-destructive{background:var(--destructive-bg);color:var(--destructive)}
.pill-info{background:var(--accent-light);color:var(--accent)}
.pill-muted{background:var(--surface-hover);color:var(--text-secondary)}
.tag{display:inline-flex;align-items:center;font-size:11.5px;padding:3px 8px;border-radius:var(--radius-sm);background:var(--surface-hover);color:var(--text-secondary);border:1px solid var(--border)}
.chip{display:inline-flex;align-items:center;height:28px;padding:0 12px;border-radius:var(--radius-full);background:var(--surface-hover);border:1px solid var(--border);font-size:12.5px;color:var(--text-secondary)}
a.chip:hover,.chip.selectable:hover{background:var(--accent-light);color:var(--accent);border-color:var(--accent-border)}
.chip.is-active{background:var(--accent);color:#fff;border-color:var(--accent)}
.key{font-family:var(--mono);font-size:11.5px;color:var(--text-secondary);background:var(--surface-hover);border:1px solid var(--border);border-radius:var(--radius-sm);padding:2px 7px}

/* ---------- 14. Alerts (flash) ---------- */
.alert{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:var(--radius-md);border:1px solid;font-size:13.5px;margin-bottom:16px}
.alert svg{width:17px;height:17px;flex-shrink:0;margin-top:1px}
.alert .close{margin-left:auto;border:0;background:transparent;color:inherit;opacity:.6;padding:0;width:20px;height:20px;display:flex;align-items:center;justify-content:center}
.alert .close:hover{opacity:1}
.alert-success{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}
.alert-destructive{background:var(--destructive-bg);border-color:var(--destructive-border);color:var(--destructive-text)}
.alert-warning{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}
.alert-info{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}
/* A link inside an alert takes the alert's colour: underline it so it reads as a link. */
.alert a:not(.btn){text-decoration:underline;text-underline-offset:2px;font-weight:600}
.alert a:not(.btn):hover{text-decoration-thickness:2px}

/* ---------- 15. Empty / loading / skeleton ---------- */
.empty-state{text-align:center;padding:44px 20px}
.empty-state svg{width:40px;height:40px;color:var(--text-muted);margin:0 auto 12px;opacity:.7}
.empty-state .title{font-size:14.5px;font-weight:600}
.empty-state .desc{font-size:13px;color:var(--text-secondary);margin-top:5px;max-width:380px;margin-left:auto;margin-right:auto}
.empty-state .btn{margin-top:16px}
.spinner{width:18px;height:18px;border:2px solid var(--border-strong);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite;flex-shrink:0}
.spinner-lg{width:32px;height:32px;border-width:3px}
@keyframes spin{to{transform:rotate(360deg)}}
.loading-block{display:flex;flex-direction:column;align-items:center;gap:12px;padding:44px 20px;color:var(--text-secondary);font-size:13.5px}
.skeleton{background:linear-gradient(90deg,var(--surface-hover) 25%,var(--skeleton-shine) 50%,var(--surface-hover) 75%);background-size:200% 100%;animation:shimmer 1.4s infinite;border-radius:var(--radius-sm)}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){.spinner,.skeleton{animation:none}}
/* Images (posters, share cards, previews) shimmer in their own shape until they arrive:
   <img class="img-skel" style="aspect-ratio:auto 1080/1080" onload="this.classList.add('is-loaded')">. */
img.img-skel{display:block;max-width:100%;height:auto;background:linear-gradient(90deg,var(--surface-hover) 25%,var(--skeleton-shine) 50%,var(--surface-hover) 75%);background-size:200% 100%;animation:shimmer 1.4s infinite}
img.img-skel.is-loaded{background:none;animation:none}
img.img-skel.is-failed{background:var(--surface-hover);animation:none}
/* A preview being redrawn: the last image dims under a spinner. */
.img-updating{position:relative}
.img-updating > .spinner{position:absolute;top:50%;left:50%;margin:-16px 0 0 -16px;display:none}
.img-updating.is-updating > img{opacity:.5;transition:opacity .15s}
.img-updating.is-updating > .spinner{display:block}
@media (prefers-reduced-motion:reduce){img.img-skel{animation:none}}

/* ---------- 16. Tabs ---------- */
.tabs{display:flex;gap:2px;border-bottom:1px solid var(--border);margin-bottom:20px;overflow-x:auto}
.tab{padding:10px 14px;font-size:13.5px;font-weight:600;color:var(--text-secondary);border-bottom:2px solid transparent;white-space:nowrap;background:transparent;border-top:0;border-left:0;border-right:0}
.tab:hover{color:var(--text-primary)}
.tab.is-active{color:var(--accent);border-bottom-color:var(--accent)}
.tab .count{margin-left:6px;font-size:11px;color:var(--text-muted);background:var(--surface-hover);border-radius:var(--radius-full);padding:1px 6px}
.tab[aria-disabled="true"]{opacity:.5;cursor:not-allowed}
/* One panel per tab group; the inactive ones carry the `hidden` attribute. */
.tab-panel{display:block}

/* ---------- 17. Progress / meter ---------- */
.progress{height:6px;background:var(--surface-hover);border-radius:var(--radius-full);overflow:hidden}
.progress-bar{height:100%;background:var(--accent);border-radius:var(--radius-full)}
.progress-bar.is-success{background:var(--success)}
.progress-bar.is-warning{background:var(--warning)}
.progress-bar.is-destructive{background:var(--destructive)}

/* ---------- 18. Pagination ---------- */
.pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:16px;margin-top:4px;border-top:1px solid var(--border);flex-wrap:wrap}
.pagination .info{font-size:12.5px;color:var(--text-muted)}
.pagination .pages{display:flex;gap:4px}
.page-btn{min-width:32px;height:32px;padding:0 8px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);font-size:12.5px;font-weight:600;color:var(--text-secondary);display:inline-flex;align-items:center;justify-content:center}
.page-btn:hover{background:var(--surface-hover)}
.page-btn.is-active{background:var(--accent);border-color:var(--accent);color:#fff}
.page-btn[aria-disabled="true"]{opacity:.5;pointer-events:none}
/* placed after .pagination's own margin-top:4px above so it wins on source order */
:where(.card) + .pagination{margin-top:16px}

/* ---------- 19. Dropdown ---------- */
.dropdown{position:relative}
.dropdown-content{position:absolute;right:0;top:calc(100% + 6px);min-width:190px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-md);padding:5px;z-index:60;text-align:left}
.dropdown-item{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:var(--radius-sm);font-size:13.5px;color:var(--text-secondary);width:100%;border:0;background:transparent;text-align:left}
.dropdown-item:hover{background:var(--surface-hover);color:var(--text-primary)}
.dropdown-item svg{width:15px;height:15px;color:var(--text-muted)}
.dropdown-item.is-destructive{color:var(--destructive)}
.btn.text-destructive{color:var(--destructive)}
.btn.text-destructive:hover{background:var(--destructive-bg)}
/* A titled section inside a card (e.g. the job page's Social media tab) */
.side-section-title{font-size:13.5px;font-weight:700;margin:0 0 2px;color:var(--text-primary)}
/* Admin job images: pick the share image */
.share-pick{display:flex;flex-direction:column;gap:4px;cursor:pointer;position:relative}
.share-pick input{position:absolute;top:6px;left:6px;z-index:1;width:18px;height:18px}
.share-pick img{width:100%;object-fit:cover;border-radius:var(--radius-md);border:2px solid var(--border)}
.share-pick input:checked ~ img{border-color:var(--accent)}
.share-pill{color:var(--accent);font-weight:600}
.side-subsection{border-top:1px solid var(--border);padding-top:12px}
.job-code-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
/* Job page, Share this job: one link; an affiliate's earnings, or the pitch to join. */
.share-link-row{display:flex;align-items:center;gap:4px;min-width:0}
.share-link{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.share-earn{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid var(--accent-border);border-radius:var(--radius-md);background:var(--accent-light)}
.share-earn-head{display:flex;flex-direction:column;gap:4px}
.share-earn-badge{align-self:flex-start;font-size:12px;font-weight:700;color:#fff;background:var(--success,#16a34a);border-radius:999px;padding:3px 10px}
.share-earn-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;text-decoration:none;color:inherit;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);padding:10px 8px 8px;transition:border-color .15s}
.share-earn-stats:hover{border-color:var(--accent)}
.share-earn-stat{display:flex;flex-direction:column;align-items:center;gap:1px}
.share-earn-stat strong{font-size:15px;color:var(--text-primary)}
.share-earn-stat small{font-size:11px;color:var(--text-secondary)}
.share-earn-go{grid-column:1 / -1;text-align:center;font-size:12px;font-weight:600;color:var(--accent);border-top:1px solid var(--border);padding-top:7px;margin-top:2px}
.aff-share-link{display:flex;gap:6px;align-items:center}
.aff-share-link .input{flex:1;min-width:0;font-size:12px}
.share-pitch{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border-radius:var(--radius-md);background:var(--accent-light)}
/* Affiliate links page: the services to promote. */
.aff-services{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.aff-service{display:flex;flex-direction:column;gap:6px;padding:14px;border:1px solid var(--border);border-radius:var(--radius-md)}
.aff-service-name{font-weight:600}
.aff-service-actions{margin-top:auto;display:flex;flex-direction:column;gap:8px;align-items:flex-start;padding-top:6px}
.aff-service-actions .aff-share-link{width:100%}
.aff-service-jobs{border-style:dashed}
/* /affiliate/links → Promote: services as a list; each opens a drawer. */
.aff-svc-list{display:flex;flex-direction:column}
.aff-svc-list>[role=listitem]+[role=listitem]{border-top:1px solid var(--border)}
.aff-svc-item{display:flex;align-items:center;gap:14px;width:100%;padding:13px 18px;background:transparent;border:0;text-align:left;font:inherit;color:inherit;cursor:pointer;transition:background .12s ease}
.aff-svc-item:hover{background:var(--surface-hover)}
.aff-svc-item:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.aff-svc-icon{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;background:var(--accent-light);color:var(--accent)}
.aff-svc-icon svg{width:19px;height:19px}
.aff-svc-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.aff-svc-name{font-weight:600;font-size:14px}
.aff-svc-blurb{font-size:12.5px;color:var(--text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.aff-svc-stats{display:flex;flex-direction:column;align-items:flex-end;gap:1px;font-size:12px;color:var(--text-secondary);white-space:nowrap}
.aff-svc-stats strong{font-size:13.5px;color:var(--text-primary)}
.aff-svc-chev{width:16px;height:16px;flex-shrink:0;color:var(--text-muted)}
@media (max-width:560px){.aff-svc-stats{display:none}}
.side-drawer.aff-svc-drawer{width:min(540px,100vw)}
.aff-svc-drawer .side-drawer-head h2{font-size:16px;margin:0}
.aff-svc-drawer-title{min-width:0}
.aff-svc-body{padding:16px 18px 28px;display:flex;flex-direction:column;gap:18px}
.aff-svc-sec{display:flex;flex-direction:column;gap:8px}
.aff-svc-sec h3{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text-muted);margin:0}
.aff-svc-sec-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.aff-svc-sec textarea{resize:vertical;font-size:13px}
.aff-svc-points{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;font-size:13.5px}
.aff-svc-points li{position:relative;padding-left:24px}
.aff-svc-points li::before{content:"";position:absolute;left:0;top:3px;width:15px;height:15px;border-radius:50%;background:var(--accent-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233448f0' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/11px no-repeat}
.aff-svc-kpis{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--border);border-radius:var(--radius-md);overflow:hidden}
.aff-svc-kpis>div{display:flex;flex-direction:column;gap:2px;padding:10px 12px}
.aff-svc-kpis>div+div{border-left:1px solid var(--border)}
.aff-svc-kpis strong{font-size:15px}
.aff-svc-kpis small{font-size:11.5px;color:var(--text-muted)}
.aff-promo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.aff-promo{margin:0;display:flex;flex-direction:column;gap:6px;min-width:0}
.aff-promo-img{display:flex;align-items:center;justify-content:center;aspect-ratio:1/1;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface-hover);overflow:hidden}
.aff-promo-img img{max-width:100%;max-height:100%;object-fit:contain;display:block}
.aff-promo-img.is-loading{background:linear-gradient(90deg,var(--surface-hover) 25%,var(--surface-alt) 50%,var(--surface-hover) 75%) 0 0/200% 100%;animation:aff-promo-shimmer 1.2s linear infinite}
.aff-promo-img.is-loading img{opacity:0}
@keyframes aff-promo-shimmer{to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){.aff-promo-img.is-loading{animation:none}}
.aff-promo figcaption{display:flex;flex-direction:column;gap:6px;font-size:12px}
.aff-promo figcaption span{display:flex;flex-direction:column;line-height:1.3}
.aff-promo figcaption small{color:var(--text-muted);font-size:11px}
.aff-promo figcaption .btn{align-self:flex-start}
.aff-link-preview{display:block;border:1px solid var(--border);border-radius:var(--radius-md);overflow:hidden;background:var(--surface-alt);color:inherit;text-decoration:none;cursor:zoom-in;max-width:420px}
.aff-link-preview img{display:block;width:100%;aspect-ratio:1200/630;object-fit:cover;background:var(--surface-hover)}
.aff-link-preview-text{display:flex;flex-direction:column;gap:1px;padding:8px 10px;font-size:12.5px}
.aff-link-preview-text small{color:var(--text-muted);font-size:11px;text-transform:uppercase;letter-spacing:.02em}
.aff-link-preview-text span{color:var(--text-secondary)}
.aff-promo-sub{font-size:13px;font-weight:600;margin:10px 0 0}
.aff-promo-img{cursor:zoom-in}
/* Image preview (public/js/affiliate-links.js): above the drawer (z-70). */
.lightbox{position:fixed;inset:0;z-index:5000;display:grid;grid-template-columns:64px 1fr 64px;grid-template-rows:auto 1fr;background:rgba(8,10,15,.92);color:#f2f2f3;opacity:0;transition:opacity .18s ease}
.lightbox.is-open{opacity:1}
.lightbox[hidden]{display:none}
.lightbox-bar{grid-column:1/-1;display:flex;align-items:center;gap:12px;padding:12px 16px}
.lightbox-title{flex:1;min-width:0;display:flex;flex-direction:column}
.lightbox-title strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lightbox-title small{font-size:12px;color:#a0a2aa}
.lightbox-count{font-size:12.5px;color:#a0a2aa;font-variant-numeric:tabular-nums}
.lightbox-close{width:36px;height:36px;border-radius:50%;border:0;background:rgba(255,255,255,.1);color:#fff;font-size:16px;cursor:pointer}
.lightbox-close:hover{background:rgba(255,255,255,.2)}
.lightbox-stage{grid-column:2;margin:0;display:flex;align-items:center;justify-content:center;min-height:0;padding:8px 0 24px;position:relative}
.lightbox-stage img{max-width:100%;max-height:calc(100vh - 110px);object-fit:contain;border-radius:6px;box-shadow:0 20px 60px rgba(0,0,0,.5);background:#fff1;cursor:default}
.lightbox.is-loading .lightbox-stage img{opacity:.25}
.lightbox-spinner{display:none;position:absolute;width:34px;height:34px;border:3px solid rgba(255,255,255,.25);border-top-color:#fff;border-radius:50%;animation:lb-spin .8s linear infinite}
.lightbox.is-loading .lightbox-spinner{display:block}
@keyframes lb-spin{to{transform:rotate(360deg)}}
.lightbox-nav{align-self:center;justify-self:center;width:44px;height:44px;border-radius:50%;border:0;background:rgba(255,255,255,.12);color:#fff;font-size:28px;line-height:1;cursor:pointer}
.lightbox-nav:hover{background:rgba(255,255,255,.24)}
.lightbox-nav.is-prev{grid-column:1;grid-row:2}
.lightbox-nav.is-next{grid-column:3;grid-row:2}
.lightbox-nav[hidden]{visibility:hidden}
@media (max-width:640px){.lightbox{grid-template-columns:0 1fr 0}.lightbox-nav{display:none}.lightbox-stage{padding:4px 8px 16px}}
@media (prefers-reduced-motion:reduce){.lightbox{transition:none}.lightbox-spinner{animation:none}}
.aff-svc-qr{border:1px solid var(--border);border-radius:var(--radius-md);background:#fff;padding:6px;flex-shrink:0}
@media (max-width:480px){.aff-promo-grid{grid-template-columns:1fr 1fr}.aff-svc-kpis{grid-template-columns:repeat(2,1fr)}.aff-svc-kpis>div:nth-child(3){border-left:0}.aff-svc-kpis>div:nth-child(n+3){border-top:1px solid var(--border)}}
.job-code{font-family:var(--font-mono,ui-monospace,monospace);font-weight:700;letter-spacing:.12em;font-size:15px;padding:2px 8px;border:1px dashed var(--accent);border-radius:var(--radius-sm,6px);color:var(--accent)}
.table .num{text-align:right;font-variant-numeric:tabular-nums}
/* View / Edit switch for the post text */
.seg-toggle{display:inline-flex;align-self:flex-start;border:1px solid var(--border);border-radius:var(--radius-md);padding:2px;background:var(--surface-alt);gap:2px}
.seg-toggle button{border:0;background:transparent;padding:4px 12px;font-size:12.5px;font-weight:600;color:var(--text-secondary);border-radius:calc(var(--radius-md) - 2px)}
.seg-toggle button.is-on{background:var(--surface);color:var(--text-primary);box-shadow:0 1px 2px rgba(15,23,42,.08)}
.social-preview{margin:0;padding:12px 14px;border-radius:var(--radius-md);background:var(--surface-dark);color:var(--text-on-dark);font-family:var(--mono);font-size:12.5px;line-height:1.55;white-space:pre-wrap;word-break:break-word;max-height:420px;overflow:auto}
.social-text{width:100%;min-height:240px;resize:vertical;white-space:pre-wrap;font-size:12.5px;line-height:1.55}
/* Admin → Config → Footer Social Links: one line per link, stacked on phones. */
.social-platform{padding-bottom:12px;border-bottom:1px solid var(--border)}
.social-platform:last-of-type{border-bottom:0}
.social-rows:empty{display:none}
.social-link-row{display:grid;grid-template-columns:auto minmax(0,2fr) minmax(0,1.3fr) minmax(0,1.2fr) auto;gap:8px;align-items:center}
.social-link-row input[type=url],.social-link-row input[type=text]{width:100%;min-width:0}
.social-link-on{gap:6px}
@media (max-width:640px){.social-link-row{grid-template-columns:1fr auto;padding:10px 0;border-top:1px dashed var(--border)}.social-link-row input[type=url],.social-link-row input[type=text]{grid-column:1/-1}.social-link-row .social-link-on{grid-row:1;grid-column:1}.social-link-row [data-social-remove]{grid-row:1;grid-column:2}}
.dropdown-item.is-destructive svg{color:var(--destructive)}
.dropdown-item.is-destructive:hover{background:var(--destructive-bg);color:var(--destructive)}
/* Grouped action menus: left-aligned, titled groups, item hints, paired toggles */
.dropdown-content.is-left{left:0;right:auto}
.dropdown-menu-wide{min-width:280px}
.dropdown-group-title{margin:0;padding:8px 10px 4px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted)}
.dropdown-item-text{display:flex;flex-direction:column;min-width:0;line-height:1.3}
.dropdown-item-hint{font-size:11.5px;color:var(--text-muted);font-weight:400}
.dropdown-item:hover .dropdown-item-hint{color:var(--text-secondary)}
.dropdown-pair{display:grid;grid-template-columns:1fr 1fr;gap:2px}
.dropdown-content .dropdown-item:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.btn-chevron{width:14px;height:14px;margin-left:2px}
.dropdown-item.is-current{background:var(--accent-light);color:var(--accent)}
.dropdown-item.is-current svg{color:var(--accent)}
.dropdown-item.is-destructive:hover{background:var(--destructive-bg)}
.dropdown-sep{height:1px;background:var(--border);margin:5px 0}
.dropdown-label{padding:8px 10px;font-size:12.5px}
.dropdown-label .n{font-weight:600}
.dropdown-label .e{color:var(--text-muted);font-size:12px}

/* ---------- 19b. Combobox popup ----------
   The panel spans its anchor rather than hanging off a right edge, and carries a
   keyboard-navigable active state separate from :hover — :hover is useless for
   arrow-key navigation and sticks after a tap on touch. */
.combobox{position:relative}
/* A combobox has to behave like the input it replaced wherever it is a flex
   item. The wrapper carries no width of its own, so the `width:100%` input
   inside collapses to its intrinsic size — which is why the questionnaire's
   company and institution questions rendered a stub of a text box next to
   full-width ones. */
.search-field .combobox,.row > .combobox{flex:1;min-width:0}

/* Which ancestor the panel measures against is the whole trick to its width.
   `.combobox` is the default anchor, so the panel matches the one field. Inside
   a search or filter row we make the wrapper `static`, and the absolutely
   positioned panel resolves against the row instead — spanning keyword input,
   location input and button together. Reverted below 768px, where those rows
   stack and the row's bottom edge is under the submit button. */
.search-bar,.filter-bar{position:relative}
.search-bar .combobox,.filter-bar .combobox{position:static}

.dropdown-content.is-combobox{
  left:0;right:0;min-width:0;padding:6px;
  border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);
  top:calc(100% + 8px)}
.cb-list{max-height:min(340px,60vh);overflow-y:auto;scrollbar-width:thin;
  scrollbar-color:var(--border-strong) transparent}
.cb-list::-webkit-scrollbar{width:8px}
.cb-list::-webkit-scrollbar-track{background:transparent}
.cb-list::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:99px;
  border:2px solid var(--surface)}
.cb-list::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}

.is-combobox .dropdown-item{min-height:40px;padding:9px 10px;border-radius:var(--radius-md);
  color:var(--text-primary);gap:10px}
.is-combobox .dropdown-item.is-active{background:var(--accent-light);color:var(--accent)}
.is-combobox .dropdown-item.is-active .cb-icon{color:var(--accent)}
.cb-icon{display:flex;flex-shrink:0;color:var(--text-muted)}
.cb-icon svg{width:16px;height:16px}
/* The matched run of the query. The UA default is a yellow block highlight. */
.is-combobox mark{background:transparent;color:var(--accent);font-weight:700;padding:0}
.dropdown-item.is-active mark{color:inherit}

/* Group headings stay pinned while the list scrolls, so you never lose track of
   whether you are looking at countries or cities. */
.is-combobox .dropdown-label{position:sticky;top:0;z-index:1;background:var(--surface);
  padding:8px 10px 5px;font-size:11px;font-weight:700;letter-spacing:.06em;
  text-transform:uppercase;color:var(--text-muted)}

.cb-empty{padding:14px 10px;font-size:13px;color:var(--text-muted);text-align:center}
.cb-foot{display:flex;align-items:center;gap:6px;padding:8px 10px 4px;margin-top:4px;
  border-top:1px solid var(--border);font-size:11.5px;color:var(--text-muted)}
.cb-foot .kbd{font-size:10px}
/* A keyboard hint is noise where there is no keyboard, and clutter in a panel
   this narrow. Width is the reliable half: a desktop browser reports
   `hover:hover` even when its window is phone-sized. */
@media (hover:none),(max-width:768px){.cb-foot{display:none}}

.dropdown-item .sub{display:block;font-size:12px;color:var(--text-muted)}

/* ---------- 20. Dialog / modal ---------- */
.dialog-overlay{position:fixed;inset:0;background:rgba(15,23,42,.5);z-index:80;display:flex;align-items:center;justify-content:center;padding:20px}
.dialog{background:var(--surface);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);width:100%;max-width:440px;max-height:90vh;overflow-y:auto}
.dialog-lg{max-width:680px}
.dialog-head{padding:20px 22px 0}
.dialog-title{font-size:17px;font-weight:700}
.dialog-desc{font-size:13.5px;color:var(--text-secondary);margin-top:6px}
.dialog-body{padding:18px 22px}
.dialog-foot{padding:16px 22px 20px;display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.dialog-close{position:absolute;top:14px;right:14px;width:30px;height:30px;border:0;background:transparent;border-radius:var(--radius-sm);color:var(--text-muted);display:flex;align-items:center;justify-content:center}
.dialog-close:hover{background:var(--surface-hover);color:var(--text-primary)}

/* ---------- 21. Toasts ---------- */
.toast-container{position:fixed;right:20px;bottom:20px;z-index:90;display:flex;flex-direction:column;gap:10px;max-width:360px}
.toast{display:flex;align-items:flex-start;gap:10px;background:var(--surface);border:1px solid var(--border);border-left-width:3px;border-radius:var(--radius-md);box-shadow:var(--shadow-md);padding:12px 14px;font-size:13.5px;animation:toastIn .18s ease}
@keyframes toastIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.toast svg{width:17px;height:17px;flex-shrink:0;margin-top:1px}
.toast .close{margin-left:auto;border:0;background:transparent;color:var(--text-muted);width:20px;height:20px;display:flex;align-items:center;justify-content:center}
.toast-success{border-left-color:var(--success)} .toast-success svg{color:var(--success)}
.toast-error{border-left-color:var(--destructive)} .toast-error svg{color:var(--destructive)}
.toast-info{border-left-color:var(--accent)} .toast-info svg{color:var(--accent)}

/* ---------- 22. Stepper (wizards) ---------- */
.stepper{display:flex;align-items:center;gap:0;margin-bottom:26px;list-style:none;padding:0}
.step-node{display:flex;align-items:center;gap:9px;flex-shrink:0}
.step-dot{width:30px;height:30px;border-radius:var(--radius-full);border:2px solid var(--border-strong);color:var(--text-muted);display:flex;align-items:center;justify-content:center;font-size:12.5px;font-weight:700;background:var(--surface)}
.step-node.is-active .step-dot{border-color:var(--accent);background:var(--accent);color:#fff}
.step-node.is-done .step-dot{border-color:var(--success);background:var(--success);color:#fff}
.step-label{font-size:13px;font-weight:600;color:var(--text-secondary)}
.step-node.is-active .step-label{color:var(--text-primary)}
.step-line{display:block;flex:1;height:2px;background:var(--border);margin:0 12px;min-width:20px}
.step-line.is-done{background:var(--success)}

/* ---------- 23. Timeline ---------- */
.timeline{position:relative;padding-left:24px}
.timeline::before{content:"";position:absolute;left:5px;top:4px;bottom:4px;width:1px;background:var(--border)}
.tl-item{position:relative;padding-bottom:18px}
.tl-item:last-child{padding-bottom:0}
.tl-dot{position:absolute;left:-24px;top:3px;width:11px;height:11px;border-radius:50%;background:var(--surface);border:2px solid var(--accent)}
.tl-item .when{font-size:12px;color:var(--text-muted);margin-top:2px}

/* ---------- 24. Layout utilities ---------- */
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.grid-sidebar{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:20px;align-items:start}
.split-pane{display:grid;grid-template-columns:360px minmax(0,1fr);gap:20px;align-items:start}
/* Selectable row in a picker column (email lists, saved searches). */
.pick{display:block;border:1px solid var(--border);border-radius:var(--radius-md);padding:11px 12px;font-size:13.5px}
.pick + .pick{margin-top:8px}
.pick:hover{background:var(--surface-hover)}
.pick.is-active{border-color:var(--accent);background:var(--accent-light)}
.row{display:flex;align-items:center;gap:10px}
.row-between{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.stack{display:flex;flex-direction:column;gap:12px}
/* Flex and grid items default to a min size of their content, so one wide child
   — a code block, a long identifier, a table — makes the whole column wider than
   its track and pushes the page sideways. These containers always yield instead. */
.stack > *,.row > *,.row-between > *,.grid-2 > *,.grid-3 > *,.grid-4 > *,
.stats > *,.grid-sidebar > *,.split-pane > *,.filter-bar > *{min-width:0}
.wrap-flex{display:flex;gap:8px;flex-wrap:wrap}
.mt-0{margin-top:0}.mt-1{margin-top:6px}.mt-2{margin-top:12px}.mt-3{margin-top:18px}.mt-4{margin-top:24px}
.ml-auto{margin-left:auto}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:6px}.mb-2{margin-bottom:12px}.mb-3{margin-bottom:18px}.mb-4{margin-bottom:24px}
.filter-bar{display:grid;grid-template-columns:minmax(220px,1.5fr) repeat(auto-fit,minmax(150px,1fr));gap:8px;margin-bottom:16px}
.filter-bar .btn{grid-column:-2/-1}
.toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:16px}

/* ---------- 25. Public site chrome ---------- */
.pub-header{display:flex;align-items:center;gap:32px;padding:0 24px;height:64px;border-bottom:1px solid var(--border);background:var(--surface);position:sticky;top:0;z-index:40}
.pub-logo{display:flex;align-items:center;gap:9px;font-size:17px;font-weight:700;color:var(--text-primary);flex-shrink:0}
/* The logo (partials/brand-logo.ejs): pin in the accent colour, wordmark in the text colour, so it follows the theme */
.brand-logo{display:block;flex-shrink:0;color:var(--text-primary);height:auto}
.brand-logo-pin{fill:var(--accent)}
.brand-logo-word{fill:currentColor}
.pub-logo .mark{width:30px;height:30px;border-radius:8px;background:var(--accent);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.pub-logo .mark .brand-logo{height:20px;width:auto}
.pub-nav{display:flex;align-items:center;gap:24px;flex:1}
.pub-nav a{font-size:14px;font-weight:500;color:var(--text-secondary);display:flex;align-items:center;gap:4px}
.pub-nav a:hover{color:var(--text-primary)}
.pub-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}
/* margin-left:auto because at <=1024 the nav and actions this button replaces
   are display:none, leaving it packed against the logo with the whole right
   half of the header empty. */
.mobile-menu-btn{display:none;width:38px;height:38px;margin-left:auto;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface)}

/* Side drawer. Fixed, so opening it never moves the page — the old in-flow
   panel pushed the hero and everything under it down. `.nav-drawer` is the
   public nav; `.side-drawer` is the same slide-in used elsewhere, so there is
   one drawer behaviour rather than a second one that drifts. */
.nav-drawer,.side-drawer{position:fixed;inset:0 0 0 auto;width:min(320px,86vw);z-index:70;
  background:var(--surface);border-left:1px solid var(--border);box-shadow:var(--shadow-lg);
  display:flex;flex-direction:column;transform:translateX(100%);transition:transform .22s ease}
.nav-drawer.is-open,.side-drawer.is-open{transform:translateX(0)}
/* After the shared rule, not before it: the two set the same property at the
   same specificity, so declaring this earlier meant the 320px won and the
   template drawer was never the width its previews were sized for. */
.side-drawer{width:min(420px,92vw)}
.nav-drawer-head{display:flex;align-items:center;gap:10px;padding:14px 16px;flex-shrink:0;
  border-bottom:1px solid var(--border)}
.nav-drawer-head .dropdown-label{padding:0;min-width:0}
/* `display:block` because the drawer writes these as spans, which sat the email
   on the same line as the name. Scoped rather than put on `.dropdown-label .n`
   globally: the notifications header uses the same two classes to keep a label
   and its count side by side on purpose. */
.nav-drawer-head .dropdown-label .n,.nav-drawer-head .dropdown-label .e{
  display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav-drawer-head .close{margin-left:auto}
.nav-drawer-body{flex:1;overflow-y:auto;padding:6px 10px 14px}
.nav-drawer-foot{display:flex;align-items:center;gap:10px;padding:12px 16px;flex-shrink:0;
  border-top:1px solid var(--border)}
.nav-drawer-foot form{flex:1;margin:0}
.nav-drawer-foot .btn{flex:1}
/* Sits above the sticky .pub-header (z-40) and below the drawer (z-70). Plain
   .backdrop is z-40, level with the header, so it would render underneath it. */
.backdrop.is-nav{z-index:60;background:rgba(15,23,42,.45);opacity:0;transition:opacity .22s ease}
.backdrop.is-nav.show{opacity:1}
@media (prefers-reduced-motion:reduce){.nav-drawer,.backdrop.is-nav{transition:none}}
.wrap{max-width:1180px;margin:0 auto;padding:0 24px}
.wrap-sm{max-width:760px;margin:0 auto;padding:0 24px}
.section{padding:56px 0;border-top:1px solid var(--border)}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:28px;gap:16px;flex-wrap:wrap}
.section-head h2{font-size:24px;font-weight:700;letter-spacing:-.01em}
.section-head p{margin-top:4px;color:var(--text-secondary)}
.section-head.centered{flex-direction:column;align-items:center;text-align:center}
.hero{padding:64px 0 48px;text-align:center}
.hero h1{font-size:44px;font-weight:700;letter-spacing:-.02em;line-height:1.15}
.hero h1 span{color:var(--accent)}
.hero p{margin-top:14px;font-size:16px;color:var(--text-secondary);max-width:560px;margin-left:auto;margin-right:auto}
.search-bar{margin:32px auto 0;max-width:640px;display:flex;gap:8px;flex-wrap:wrap;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:8px;box-shadow:var(--shadow-xs)}
.search-field{flex:1;min-width:180px;display:flex;align-items:center;gap:8px;padding:0 12px;height:44px}
.search-divider{width:1px;background:var(--border);margin:6px 0}
.search-bar:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}
.search-bar .btn{height:44px}
.auth-shell{min-height:100vh;display:flex;flex-direction:column}
.auth-center{flex:1;display:flex;align-items:center;justify-content:center;padding:20px}
.auth-card{width:100%;max-width:420px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:32px;box-shadow:var(--shadow-sm)}
.oauth-btn{display:flex;align-items:center;justify-content:center;gap:10px;height:42px;width:100%;border:1px solid var(--border-strong);border-radius:var(--radius-md);background:var(--surface);font-size:14px;font-weight:600}
.oauth-btn:hover{background:var(--surface-hover)}
.oauth-btn svg{width:18px;height:18px}
/* Sign-in providers sit side by side (two per row on phones), not stacked. */
.oauth-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}
.oauth-row .oauth-btn{min-width:0;white-space:nowrap}
.divider{display:flex;align-items:center;gap:12px;margin:22px 0;color:var(--text-muted);font-size:12.5px}
/* Profile wizard review: optional sections found on the CV, folded away */
.review-more{border:1px solid var(--border);border-radius:var(--radius-md);padding:10px 14px;background:var(--surface)}
.review-more>summary{cursor:pointer;font-weight:600;font-size:14px;display:flex;align-items:center;gap:8px}
.review-more-list{margin:4px 0 0;padding-left:18px;font-size:13px;color:var(--text-secondary)}
.review-more-list li{margin:2px 0}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--border)}
.pub-footer{border-top:1px solid var(--border);padding:48px 0 28px}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:32px}
.footer-grid-5{grid-template-columns:1.4fr repeat(4,1fr)}
.footer-grid h4{font-size:12.5px;font-weight:600;margin-bottom:12px}
.footer-grid ul{list-style:none}
.footer-grid li{margin-bottom:8px}
.footer-grid a{font-size:13px;color:var(--text-secondary)}
.footer-grid a:hover{color:var(--accent)}
.footer-bottom{margin-top:36px;padding-top:20px;border-top:1px solid var(--border);font-size:12.5px;color:var(--text-muted);text-align:center}
.cta-band{background:var(--surface-dark);border-radius:var(--radius-lg);padding:48px;text-align:center;color:var(--text-on-dark);margin:0 24px}
.cta-band h2{font-size:28px;font-weight:700}
.cta-band p{margin-top:8px;color:var(--text-on-dark-muted)}
.cta-band .btn-outline{background:transparent;border-color:var(--border-on-dark);color:var(--text-on-dark)}
.cta-band .btn-outline:hover{background:var(--surface-on-dark-hover)}

/* Pricing tiers. NOT `.plan-card` — that name is taken by the sidebar's plan
   badge.

   `auto-fit` sizes the row to the number of plans on its own: four plans fill
   one row, three make three wider columns, a fifth wraps. Do NOT reintroduce
   `repeat(var(--plan-cols), …)` — a custom property that resolves to anything
   but an integer makes the whole declaration invalid at computed-value time,
   which falls back to `grid-template-columns:none` and drops every card into a
   single full-width column. A preceding fallback declaration does not save it,
   because that failure happens after parsing. */
.plan-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:16px}
.plan-grid > *{min-width:0}
/* `.card:not(details) > .card-body{flex:1}` already stretches the body; making
   it a column and letting the CTA take the slack is what pins the buttons to a
   common baseline regardless of how many features a tier lists. Scoped to
   `.plan-tier` because `.card-body` is used on essentially every page. */
.plan-tier .card-body{display:flex;flex-direction:column;height:100%}
.plan-tier .plan-cta{margin-top:auto;padding-top:18px}
.plan-tier.is-featured{border-color:var(--accent);box-shadow:var(--shadow-sm)}
.plan-legend{text-align:center;margin-top:14px}

/* ---------- 25b. Admin test bar ----------
   A floating dev tool, not product chrome. Modelled on the `.proto-bar` in
   .dev/designs/v2-design, but built from --surface-dark / --text-on-dark so it
   inverts with the theme like `.dark-card` does, instead of the prototype's
   literal greys. Rendered for admins on every page. */
/* Above every drawer, modal and editor (they stop at 1000); below the consent banner and the bot check. */
.admin-bar{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(14px + env(safe-area-inset-bottom, 0px));z-index:2800;
  display:flex;align-items:center;gap:4px;max-width:calc(100vw - 24px);
  background:var(--surface-dark);color:var(--text-on-dark);
  border:1px solid var(--border-on-dark);border-radius:var(--radius-full);
  padding:5px;box-shadow:0 10px 30px rgba(15,23,42,.28),0 2px 6px rgba(15,23,42,.18);font-size:12px}
/* Sits above page content but BELOW every real overlay — the nav drawer (70),
   dialogs (80) and toasts (90). It is an ambient dev tool; it must never
   obscure product UI. The prototype's bar used 95, which floated it over the
   mobile drawer. */
.admin-bar a,.admin-bar button{border:0;background:transparent;color:var(--text-on-dark-muted);font:inherit;
  font-size:12px;font-weight:600;padding:6px 10px;border-radius:var(--radius-full);white-space:nowrap;cursor:pointer;
  display:inline-flex;align-items:center;gap:6px;line-height:1.2;transition:background .12s ease,color .12s ease}
.admin-bar a:hover,.admin-bar button:hover{color:var(--text-on-dark);background:var(--surface-on-dark-hover)}
.admin-bar a:focus-visible,.admin-bar button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.admin-bar svg{width:14px;height:14px;flex-shrink:0}
/* The handle: shield, "Admin" and (tucked) the plan being viewed. */
.admin-bar .ab-handle{color:var(--text-on-dark);padding:6px 10px 6px 8px}
.admin-bar .ab-icon{color:var(--accent);width:16px;height:16px}
/* Dragged somewhere (app.js sets left/top): no centring, no corner anchoring. */
.admin-bar[data-moved="1"]{transform:none;right:auto;bottom:auto}
.admin-bar .ab-handle{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.admin-bar[data-dragging="1"]{opacity:.92;box-shadow:0 16px 40px rgba(15,23,42,.35)}
.admin-bar[data-dragging="1"],.admin-bar[data-dragging="1"] .ab-handle{cursor:grabbing}
.admin-bar .ab-reset{display:none}
.admin-bar[data-has-pos="1"] .ab-reset{display:inline-flex}
.admin-bar .ab-role{font-weight:700}
.admin-bar .ab-plan{display:none;align-items:center;gap:6px;font-weight:600;color:var(--text-on-dark-muted);
  padding-left:8px;border-left:1px solid var(--border-on-dark)}
.admin-bar .ab-chev{display:none;color:var(--text-on-dark-muted)}
.admin-bar .ab-panel{display:flex;align-items:center;gap:4px;min-width:0}
.admin-bar .ab-head{display:flex;align-items:center;padding:0 2px 0 4px}
.admin-bar .ab-hint{display:none}
.admin-bar .lbl{color:var(--text-on-dark-muted);font-size:10.5px;text-transform:uppercase;letter-spacing:.07em;font-weight:700;white-space:nowrap}
.admin-bar .grp{display:flex;align-items:center;gap:2px;padding:2px;min-width:0;overflow-x:auto;scrollbar-width:none;
  background:rgba(148,163,184,.12);border-radius:var(--radius-full)}
.admin-bar .grp::-webkit-scrollbar{display:none}
.admin-bar .grp a{padding:5px 11px}
.admin-bar .grp a.on{background:var(--accent);color:#fff;box-shadow:0 1px 3px rgba(37,99,235,.45)}
.admin-bar .div{width:1px;height:20px;background:var(--border-on-dark);flex-shrink:0;margin:0 2px}
.admin-bar .ab-actions{display:flex;align-items:center;gap:2px}
.admin-bar .tuck{width:28px;height:28px;padding:0;justify-content:center;flex-shrink:0}
/* Viewing as a plan (not full access): amber, so it is never forgotten. */
.admin-bar[data-testing="1"]{border-color:var(--warning)}
.admin-bar[data-testing="1"] .ab-icon{color:var(--warning)}
.admin-bar[data-testing="1"] .ab-plan{color:var(--warning)}
.admin-bar .ab-dot{width:7px;height:7px;border-radius:50%;background:var(--warning);box-shadow:0 0 0 0 rgba(217,119,6,.6);animation:ab-pulse 2s ease-out infinite}
@keyframes ab-pulse{0%{box-shadow:0 0 0 0 rgba(217,119,6,.55)}70%{box-shadow:0 0 0 6px rgba(217,119,6,0)}100%{box-shadow:0 0 0 0 rgba(217,119,6,0)}}
/* Tucked: only the handle, a small pill that still names the plan being viewed. */
.admin-bar[data-tucked="1"] .ab-panel{display:none}
.admin-bar[data-tucked="1"] .ab-plan,.admin-bar[data-tucked="1"] .ab-chev{display:inline-flex}
.admin-bar[data-tucked="1"] .ab-handle{padding-right:8px}
@media (prefers-reduced-motion:reduce){.admin-bar a,.admin-bar button{transition:none}.admin-bar .ab-dot{animation:none}}
/* Compact (designer, CV editor): a small pill centred over the canvas that
   expands on hover or keyboard focus, so the full bar never sits on top of
   the block palette, the inspector or the editor's add button. */
.admin-bar[data-compact="1"]{bottom:10px;opacity:.94}
.admin-bar[data-compact="1"]:not(:hover):not(:focus-within) .ab-panel{display:none}
.admin-bar[data-compact="1"]:not(:hover):not(:focus-within) .ab-plan{display:inline-flex}
.admin-bar[data-compact="1"]:hover,.admin-bar[data-compact="1"]:focus-within{opacity:1}
body:has(.admin-bar[data-compact="1"]){padding-bottom:0}
/* Phones: tucked, a small pill in the bottom-right corner that leaves the
   page alone; open, a card above it with the plans in a grid and the
   actions as full buttons. Tapping outside the card closes it (app.js). */
@media (max-width:600px){
  .admin-bar{left:auto;right:12px;transform:none;bottom:calc(12px + env(safe-area-inset-bottom, 0px))}
  .admin-bar[data-compact="1"]{left:auto;right:12px;transform:none}
  .admin-bar[data-tucked="0"]{left:10px;right:10px;flex-direction:column;align-items:stretch;gap:0;
    border-radius:18px;padding:6px 6px 10px;max-height:calc(100vh - 120px);overflow:auto}
  .admin-bar[data-tucked="0"] .ab-handle{justify-content:flex-start;padding:8px 8px 10px;border-radius:12px}
  .admin-bar[data-tucked="0"] .ab-handle:hover{background:transparent}
  .admin-bar[data-tucked="0"] .ab-plan{display:inline-flex}
  .admin-bar[data-tucked="0"] .ab-chev{display:inline-flex;margin-left:auto;transform:rotate(180deg)}
  .admin-bar .ab-panel{flex-direction:column;align-items:stretch;gap:10px;padding:0 6px}
  .admin-bar .ab-head{flex-direction:column;align-items:flex-start;gap:3px;padding:0 2px}
  .admin-bar .ab-hint{display:block;font-size:12px;color:var(--text-on-dark-muted);font-weight:500;line-height:1.35}
  .admin-bar .grp{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;overflow:visible;border-radius:12px}
  .admin-bar .grp a{justify-content:center;padding:9px 6px;border-radius:9px;font-size:13px;min-height:40px}
  .admin-bar .div{display:none}
  .admin-bar .ab-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:6px}
  .admin-bar .ab-actions .bar-link{justify-content:center;padding:10px;border-radius:10px;font-size:13px;min-height:42px;
    color:var(--text-on-dark);border:1px solid var(--border-on-dark)}
  .admin-bar .tuck{display:none}
  body:has(.admin-bar){padding-bottom:64px}
  /* Before app.js has set its state (first paint, or a slow in-place navigation)
     the bar is the small pill, not the full panel in a pill shape. */
  .admin-bar:not([data-tucked]) .ab-panel{display:none}
  .admin-bar:not([data-tucked]) .ab-plan,.admin-bar:not([data-tucked]) .ab-chev{display:inline-flex}
}

/* Password reveal. The wrapper is created by app.js around every
   input[type=password], so the control is identical on all 32 of them rather
   than re-implemented per template. The input keeps its own width; only right
   padding is reserved for the button. */
.password-field{position:relative;display:block}
.password-field input{padding-right:40px}
.password-toggle{position:absolute;top:50%;right:6px;transform:translateY(-50%);
  width:28px;height:28px;display:flex;align-items:center;justify-content:center;
  border:0;background:transparent;color:var(--text-muted);border-radius:var(--radius-sm)}
.password-toggle:hover{color:var(--text-primary);background:var(--surface-hover)}
.password-toggle svg{width:16px;height:16px}

/* TOTP enrolment QR. The SVG is rendered server-side (src/utils/qr.js); the
   white plate is fixed on purpose — a QR must stay dark-on-light to scan, so
   this is one of the few places a literal colour is correct. */
.qr-frame{display:inline-block;background:#fff;padding:12px;border-radius:var(--radius-md);
  border:1px solid var(--border)}
.qr-frame svg{display:block;width:180px;height:180px}

/* job cards + marketing blocks */
.job-card{border:1px solid var(--border);border-radius:var(--radius-lg);padding:18px;background:var(--surface);display:flex;flex-direction:column}
.job-card:hover{border-color:var(--border-strong)}
.job-logo{width:36px;height:36px;border-radius:8px;background:var(--accent-light);color:var(--accent);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex-shrink:0}
/* A real logo: white tile with a hairline so transparent and dark logos read in both themes */
.job-logo.has-logo{background:#fff;border:1px solid var(--border);overflow:hidden;padding:3px}
.job-logo.has-logo img{width:100%;height:100%;object-fit:contain;border-radius:calc(8px - 3px);display:block}
/* Job page: posted / apply-by / re-advertised row under the title */
.job-dates{display:flex;flex-wrap:wrap;gap:8px 20px;margin-top:14px;padding-top:12px;border-top:1px solid var(--border)}
.job-date{display:flex;align-items:center;gap:8px;min-width:0}
.job-date svg{width:18px;height:18px;flex-shrink:0;color:var(--text-muted)}
.job-date>div{display:flex;flex-direction:column;line-height:1.25;min-width:0}
.job-date-label{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted)}
.job-date-value{font-size:13px;font-weight:600;color:var(--text-primary)}
.job-date-hint{font-weight:400;color:var(--text-secondary)}
.job-date-hint::before{content:'\00B7\00A0';color:var(--text-muted)}
.job-date.is-soon svg,.job-date.is-soon .job-date-hint{color:var(--warning)}
.job-date.is-closed svg,.job-date.is-closed .job-date-hint{color:var(--destructive)}
/* Similar jobs: titles wrap (two lines at most), the company stays on one */
.related-job{display:flex;align-items:flex-start;gap:10px;margin-top:12px;color:inherit;text-decoration:none}
.related-job:first-child{margin-top:0}
.related-job-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.related-job-title{font-size:13px;font-weight:600;color:var(--text-primary);line-height:1.3;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.related-job:hover .related-job-title{color:var(--accent)}
.related-job-company{font-size:12px;color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Company page */
.company-hero{display:flex;gap:18px;align-items:flex-start}
.company-hero-logo{width:72px;height:72px;font-size:24px;border-radius:14px}
.company-hero-logo img{width:100%;height:100%;border-radius:inherit;object-fit:cover}
.company-hero-stats{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:10px;font-size:13px;color:var(--text-secondary)}
.company-hero-stats strong{color:var(--text-primary)}
.company-facts{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px 20px;margin:0;padding-top:12px;border-top:1px solid var(--border)}
.company-facts dt{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted)}
.company-facts dd{margin:2px 0 0;font-size:14px;font-weight:500;color:var(--text-primary);overflow-wrap:anywhere}
.company-contact-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.company-contact-list li{display:flex;gap:10px;align-items:flex-start;min-width:0}
.company-contact-list svg{width:18px;height:18px;flex-shrink:0;margin-top:2px;color:var(--text-muted)}
.company-contact-list li>div{display:flex;flex-direction:column;min-width:0;font-size:14px;overflow-wrap:anywhere}
.company-contact-label{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted)}
.company-team{border:1px dashed var(--border-strong);border-radius:var(--radius-md);background:var(--surface-alt);padding:12px 14px;display:flex;flex-direction:column;gap:10px}
.company-team-head{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-secondary);margin:0}
.company-team-head svg{width:14px;height:14px;flex-shrink:0}
.company-unpublished-row{gap:12px;padding:8px 0;border-bottom:1px solid var(--border);color:inherit;text-decoration:none}
.company-unpublished-row:last-child{border-bottom:0}
@media (max-width:640px){.company-hero{gap:12px}.company-hero-logo{width:56px;height:56px;font-size:19px}}
/* Card regions. In grid mode they stack in source order, which is exactly how
   the card read before they were named. */
.jc-head{display:flex;align-items:flex-start;gap:10px}
.jc-id{min-width:0}
.jc-aside{min-width:0;margin-top:auto}
/* Posted / closes footer: one row under a hairline, pinned to the card's foot */
.jc-meta{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px;margin-top:14px;padding-top:10px;border-top:1px solid var(--border);font-size:12px;color:var(--text-secondary)}
.jc-meta-item{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.jc-meta-item svg{width:14px;height:14px;flex-shrink:0;color:var(--text-muted)}
.jc-meta-hint{margin-left:6px;padding:1px 7px;border-radius:var(--radius-full);font-size:11px;font-weight:600;background:var(--warning-bg);color:var(--warning)}
.jc-deadline.is-soon,.jc-deadline.is-soon svg{color:var(--warning)}
.jc-deadline.is-closed,.jc-deadline.is-closed svg{color:var(--text-muted)}

/* Results container for the public job listings and the home page's Recent
   Jobs. NOT `.grid-3` — that is a global utility used by dozens of pages
   (including the "More filters" block on the jobs page) and by two
   `:where(.card) + .grid-3` adjacency rules. */
.job-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.job-results > *{min-width:0}

/* List view, driven off `data-jobs-view` on <html>, which the switcher partial
   sets from localStorage before the cards below it are parsed — so both
   layouts render from one DOM with no reload and no flash.

   EVERY rule here is scoped `.job-results > .job-card`. Unscoped, they reached
   the `.job-card`s the home page renders in a plain `.grid-3`: the aside took
   145px of a 367px card and squeezed the title column to 118px, which read as
   the title truncating far too early. A card outside a `.job-results` must
   never be re-laid-out. */
:root[data-jobs-view="list"] .job-results{grid-template-columns:minmax(0,1fr);gap:10px}
:root[data-jobs-view="list"] .job-results > .job-card{
  display:grid;grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:"head aside" "tags aside";
  align-items:start;column-gap:20px}
:root[data-jobs-view="list"] .job-results > .job-card .jc-head{grid-area:head}
:root[data-jobs-view="list"] .job-results > .job-card .jc-tags{grid-area:tags}
:root[data-jobs-view="list"] .job-results > .job-card .jc-aside{grid-area:aside;text-align:right;align-self:center}
:root[data-jobs-view="list"] .job-results > .job-card .jc-aside p{margin-top:0;white-space:nowrap}
:root[data-jobs-view="list"] .job-results > .job-card .jc-aside{margin-top:0}
:root[data-jobs-view="list"] .job-results > .job-card .jc-meta{flex-direction:column;align-items:flex-end;gap:4px;margin-top:6px;padding-top:0;border-top:0}

/* The segmented list/grid control. */
.view-switch{flex-shrink:0}
.view-switch .body{gap:6px}
.view-switch svg{width:14px;height:14px}
.feature-icon{width:40px;height:40px;border-radius:10px;background:var(--accent-light);color:var(--accent);display:flex;align-items:center;justify-content:center;margin-bottom:14px}
.step-num{width:36px;height:36px;border-radius:var(--radius-full);background:var(--surface-dark);color:var(--text-on-dark);display:flex;align-items:center;justify-content:center;font-weight:700;margin:0 auto 14px}

/* ---------- 26. Long-form prose ----------
   Legal pages, admin documentation and blog posts render authored copy that
   the component classes don't cover. Scoped to .prose so it never leaks into
   app chrome; headings keep the global scale, only rhythm is added here. */
.prose{color:var(--text-secondary);font-size:14px;line-height:1.7;max-width:72ch;min-width:0}
/* Inside an editor the preview mirrors the editing column, so the reading
   measure above would leave half the card empty. Published prose keeps it. */
.prose.editor-preview{max-width:none}
/* Job descriptions fill their card: the card already sets the measure, and
   the descriptions bring their own headings, so the first one sits flush. */
.prose.prose-wide{max-width:none}
.prose.prose-wide > :first-child{margin-top:0}
.prose > * + *{margin-top:12px}
.prose h2{color:var(--text-primary);margin-top:28px}
.prose h3{color:var(--text-primary);margin-top:20px}
.prose strong{color:var(--text-primary);font-weight:600}
.prose a{color:var(--accent);font-weight:500}
.prose a:hover{text-decoration:underline}
.prose ul,.prose ol{padding-left:20px}
.prose ul{list-style:disc}
.prose ol{list-style:decimal}
.prose li + li{margin-top:6px}
.prose li::marker{color:var(--text-muted)}
.prose ul.plain{list-style:none;padding-left:0}
.prose code{font-family:var(--mono);font-size:12.5px;background:var(--surface-hover);border:1px solid var(--border);border-radius:var(--radius-sm);padding:1px 5px}
.prose pre{background:var(--surface-dark);color:var(--text-on-dark);border-radius:var(--radius-md);padding:14px 16px;overflow-x:auto}
.prose pre code{background:transparent;border:0;color:inherit;padding:0}
.prose blockquote{border-left:3px solid var(--border-strong);padding-left:14px;color:var(--text-muted)}
/* Rendered markdown reaches these; only h2/h3 were covered before, so a post
   using h1 or h4 fell back to the UA sizes. */
.prose h1{color:var(--text-primary);font-size:23px;margin-top:28px}
.prose h4,.prose h5,.prose h6{color:var(--text-primary);font-weight:600;margin-top:16px}
.prose h4{font-size:15px}
.prose h5,.prose h6{font-size:14px}
.prose img{max-width:100%;height:auto;border-radius:var(--radius-md)}
.prose th,.prose td{border:1px solid var(--border);padding:8px 10px;vertical-align:top}
.prose th{background:var(--surface-hover);color:var(--text-primary);font-size:13px;
  text-transform:none;letter-spacing:0;white-space:normal}
/* A borderless heading-sized field — the post title behaves like the document
   title, not like a form control. */
.title-input{width:100%;border:0;background:transparent;padding:0;height:auto;
  font-size:23px;font-weight:700;letter-spacing:-.01em;color:var(--text-primary)}
.title-input:focus{box-shadow:none;border:0}
.title-input::placeholder{color:var(--text-muted)}
/* Authored prose can contain a table or a long identifier far wider than the
   column. Each must scroll or wrap inside .prose — never widen the page. */
.prose table{margin-top:12px;display:block;width:fit-content;max-width:100%;overflow-x:auto}
.prose pre{max-width:100%}
.prose code{overflow-wrap:anywhere}
.prose a{overflow-wrap:anywhere}
/* Markdown tables carry real header text, not the app's uppercase column labels. */
.prose th{text-transform:none;font-size:12.5px;color:var(--text-secondary)}
.prose img{border-radius:var(--radius-md)}
.prose hr{border:0;border-top:1px solid var(--border);margin:24px 0}

/* ---------- 26b. Letter surface ----------
   A cover letter is a document, not app chrome, so it gets a serif and a
   generous measure. The stack is local: the three cover-letter styles each
   pulled a Google Fonts <link> for this, three network requests for one face. */
.letter-surface{background:var(--surface);padding:48px 40px;font-family:var(--serif);
  font-size:15px;line-height:1.75;color:var(--text-primary)}
.letter-surface .prose{max-width:none;color:inherit;font-size:inherit;line-height:inherit}
.letter-placeholder{font-family:var(--font);font-size:13px;color:var(--text-muted);
  text-align:center;padding:64px 0}
/* Paragraph Studio: outline | letter | rewrite panel. Collapses to one column
   on narrow screens — it used to depend on a `.grid` class that never existed,
   so the three panes stacked even on desktop. */
.pst-studio{display:grid;grid-template-columns:220px minmax(0,1fr) 280px;gap:14px;align-items:start}
@media (max-width:1200px){.pst-studio{grid-template-columns:minmax(0,1fr)}}
/* A selected paragraph inside the letter. Selection used to be `ring-1
   ring-brand`, which does not exist — clicking a paragraph did nothing visible. */
.para{position:relative;margin:0 -12px 16px;padding:4px 12px;border-radius:var(--radius-md);
  cursor:pointer;white-space:pre-line}
.para:hover{background:var(--surface-hover)}
.para.is-selected{background:var(--accent-light);outline:1px solid var(--accent-border)}
.para .role{position:absolute;top:-9px;left:12px;padding:1px 6px;border-radius:var(--radius-sm);
  background:var(--accent);color:#fff;font-family:var(--mono);font-size:9px;
  text-transform:uppercase;letter-spacing:.06em}
.quality{display:inline-flex;gap:3px}
.quality i{width:6px;height:6px;border-radius:50%;background:var(--border-strong)}
.quality i.on{background:var(--accent)}
@media (max-width:768px){.letter-surface{padding:28px 20px}}

/* ---------- 26c. Interview companion ----------
   Shared by all three interview styles, which is why they convert as a set:
   the style picker puts them side by side, so a component that only exists in
   one of them reads as a bug. */

/* A small tinted square carrying a section's icon. Each output card had this
   inline as `flex h-6 w-6 items-center justify-center rounded-md bg-*-light`. */
.icon-badge{width:24px;height:24px;flex-shrink:0;display:flex;align-items:center;
  justify-content:center;border-radius:var(--radius-sm);
  background:var(--accent-light);color:var(--accent)}
.icon-badge svg{width:14px;height:14px}
.icon-badge.is-warning{background:var(--warning-bg);color:var(--warning)}
.icon-badge.is-success{background:var(--success-bg);color:var(--success)}

/* Checklist rows. `.check` is the app's generic checkbox row and must stay
   neutral, so striking out a completed item is opt-in via `.is-task` — the
   done state used to be four Tailwind classes applied from JS, so ticking an
   item changed nothing on screen. */
.check.is-task{align-items:center;cursor:pointer;padding:3px 0}
.check.is-task input:checked + span{text-decoration:line-through;color:var(--text-muted)}

/* Chat transcript (conversational coach). Bubbles alternate sides; the whole
   transcript is built in JS, so these are the only styles it can reach. */
.chat-log{display:flex;flex-direction:column;gap:12px;padding:18px;overflow-y:auto;flex:1;min-height:0}
.chat-msg{display:flex;gap:9px;max-width:82%}
.chat-msg.is-me{align-self:flex-end;flex-direction:row-reverse}
.chat-msg .bubble{padding:9px 13px;border-radius:var(--radius-lg);font-size:13.5px;
  line-height:1.55;background:var(--surface-hover);color:var(--text-primary);min-width:0}
.chat-msg.is-me .bubble{background:var(--accent);color:#fff}
.chat-msg .bubble .prose{color:inherit;font-size:inherit;max-width:none}
.chat-meta{font-size:11px;color:var(--text-muted);margin-top:4px}
.chat-msg.is-me .chat-meta{text-align:right}
.chat-compose{border-top:1px solid var(--border);padding:12px 14px;display:flex;gap:8px;
  align-items:flex-end;flex-shrink:0}
.chat-compose textarea{min-height:44px;max-height:150px}

/* The three-dot typing indicator. `.cc-dot` was referenced but never defined,
   so the indicator was invisible. */
.typing{display:inline-flex;gap:4px;align-items:center;padding:11px 13px}
.typing i{width:6px;height:6px;border-radius:50%;background:var(--text-muted);
  animation:typing 1.2s ease-in-out infinite}
.typing i:nth-child(2){animation-delay:.15s}
.typing i:nth-child(3){animation-delay:.3s}
@keyframes typing{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
@media (prefers-reduced-motion:reduce){.typing i{animation:none;opacity:.6}}

/* Practice studio: setup | question deck | practice panel. */
.ps-studio{display:grid;grid-template-columns:272px minmax(0,1fr) minmax(0,1fr);
  gap:14px;align-items:start}
@media (max-width:1200px){.ps-studio{grid-template-columns:minmax(0,1fr)}}
.ps-pane{display:flex;flex-direction:column;overflow:hidden;min-height:480px}
.ps-pane-head{padding:12px 14px;border-bottom:1px solid var(--border);
  display:flex;align-items:center;gap:8px;flex-shrink:0}
.ps-pane-head h3{font-size:13.5px;font-weight:600}
.ps-scroll{overflow-y:auto;padding:10px;flex:1;min-height:0}
.ps-body{display:flex;flex-direction:column;gap:16px;padding:18px;flex:1;min-height:0;overflow-y:auto}
/* A deck row's number chip. Three states — done, current, pending — that used
   to be `bg-success text-success-foreground` etc., none of which existed. */
.deck-num{width:28px;height:28px;flex-shrink:0;display:flex;align-items:center;
  justify-content:center;border-radius:var(--radius-sm);font-family:var(--mono);
  font-size:11.5px;font-weight:600;background:var(--surface-hover);color:var(--text-secondary)}
.deck-num.is-done{background:var(--success-bg);color:var(--success)}
.pick.is-active .deck-num{background:var(--accent);color:#fff}
/* The circle timer's readout. The ring itself is an inline SVG whose stroke JS
   swaps between accent/warning/destructive as the target time approaches. */
.timer-ring{flex-shrink:0}
.timer-ring text{font-family:var(--mono);font-weight:600}
.beats{display:flex;flex-direction:column;gap:6px;font-size:13.5px}
.beats li{display:flex;gap:8px}
.beats .bullet{font-family:var(--mono);color:var(--text-muted);flex-shrink:0}
.inset-panel{border:1px solid var(--border);border-radius:var(--radius-md);
  background:var(--surface-hover);padding:14px}
.overline{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.07em;
  color:var(--text-muted)}
.tile{background:var(--surface-hover);border-radius:var(--radius-md);padding:10px;text-align:center}
.tile .v{font-size:18px;font-weight:600;letter-spacing:-.01em}

/* Conversational coach: chat column + a fixed captured-wins rail. */
.chat-card{display:flex;flex-direction:column;overflow:hidden;min-height:600px}
.chat-bar{padding:9px 14px;border-bottom:1px solid var(--border);display:flex;
  align-items:center;gap:8px;flex-shrink:0}
.chat-setup{padding:12px 14px;border-bottom:1px solid var(--border);
  background:var(--surface-hover);flex-shrink:0}
.composer-box{border:1px solid var(--border-strong);border-radius:var(--radius-md);
  padding:10px;background:var(--surface)}
.composer-box textarea{border:0;box-shadow:none;padding:0;min-height:44px;background:transparent}
.composer-box textarea:focus{box-shadow:none}
.composer-head{display:flex;align-items:center;gap:8px;padding-bottom:9px;
  margin-bottom:9px;border-bottom:1px solid var(--border)}
/* The live-transcription indicator's pulsing dot. */
.rec-dot{width:8px;height:8px;border-radius:50%;background:var(--destructive);
  flex-shrink:0;animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.25}}
@media (prefers-reduced-motion:reduce){.rec-dot{animation:none}}

/* ---------- 26d. Questionnaire builder frame ----------
   The frame, the surface and the floating toolbars are ours. The nodes drawn
   *inside* the surface come from public/js/questionnaire-builder.js and use a
   `qb-*` vocabulary that was never defined in any committed stylesheet — a
   pre-existing gap, recorded in the conversion checklist and in
   KNOWN_UNSTYLED_PREFIXES, not something this migration introduced. */
.qb-frame{position:relative;height:640px;overflow:hidden;cursor:grab;
  border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface-hover)}
.qb-frame > #qb-surface{position:absolute;transform-origin:0 0}
.qb-frame #qb-edges,.qb-frame #qb-nodes{position:absolute;inset:0}
.qb-tools{position:absolute;bottom:12px;display:flex;gap:6px;z-index:2}
.qb-tools.is-left{left:12px}
.qb-tools.is-right{right:12px}
.qb-tools .btn{box-shadow:var(--shadow-sm);background:var(--surface)}
.qb-tools .btn-accent{background:var(--accent)}
.sticky-aside{position:sticky;top:16px}
@media (max-width:1024px){.sticky-aside{position:static}}

/* ---------- 26e. Accordion ----------
   A <details> disclosure. The chevron rotation is CSS driven off [open];
   admin used Tailwind's `group-open:rotate-90` / `rotate-180`, neither of
   which exists here, so every collapsible header's chevron sat frozen. */
.accordion{border:1px solid var(--border);border-radius:var(--radius-lg);
  background:var(--surface);overflow:hidden}
.accordion + .accordion{margin-top:10px}
.accordion > summary{display:flex;align-items:center;gap:10px;padding:12px 16px;
  cursor:pointer;list-style:none;font-size:13.5px}
.accordion > summary::-webkit-details-marker{display:none}
.accordion > summary:hover{background:var(--surface-hover)}
.accordion > summary .chevron{width:15px;height:15px;flex-shrink:0;color:var(--text-muted);
  transition:transform .15s ease}
.accordion[open] > summary .chevron{transform:rotate(90deg)}
.accordion[open] > summary{border-bottom:1px solid var(--border)}
.accordion-body{padding:0}
@media (prefers-reduced-motion:reduce){.accordion > summary .chevron{transition:none}}

/* JS-driven collapsibles (admin config). These are plain divs toggled by
   `hidden`, not <details>, so the chevron needs its own state class. It used to
   be Tailwind's `rotate-180`, which exists nowhere — every chevron on the
   config page sat frozen pointing down whether the card was open or shut. */
.card-head.collapsible{cursor:pointer;user-select:none;flex-wrap:nowrap}
.card-head.collapsible:hover{background:var(--surface-hover)}
.chevron{width:15px;height:15px;flex-shrink:0;color:var(--text-muted);
  transition:transform .15s ease}
.chevron.is-open{transform:rotate(180deg)}
@media (prefers-reduced-motion:reduce){.chevron{transition:none}}
.section-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;
  width:100%;padding:14px 18px;text-align:left;background:transparent;border:0}
.section-toggle:hover{background:var(--surface-hover)}
.section-body{padding:2px 18px 18px}
.section-list > * + *{border-top:1px solid var(--border)}

/* Header strip inside a bordered group (font family, flag group). */
.font-family-head{padding:12px 16px;border-bottom:1px solid var(--border);
  background:var(--surface-hover)}

/* One feature flag: description on the left, switch on the right. */
.flag-row{display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 16px}
.flag-row + .flag-row{border-top:1px solid var(--border)}

/* Bulk-selection bar. Sticks to the top of the scroll area so the chosen
   action stays reachable while working down a long table. */
.bulk-bar{position:sticky;top:0;z-index:10;display:flex;align-items:center;
  justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 14px;
  border:1px solid var(--accent-border);border-radius:var(--radius-md);
  background:var(--accent-light);margin-bottom:10px}
.bulk-bar select,.bulk-bar input{height:32px;font-size:12.5px;width:auto}

/* ---------- 27. CV thumbnail ----------
   The box. Stored thumbnails are `<svg width="240" height="340" viewBox="0 0 595 842">`
   (generateCvThumbnail, src/utils/cv-db.js). That `width` presentation attribute makes the
   SVG's width non-auto, so `align-items:stretch` could never stretch it — it sat at 240px in
   a 365px card and was then squashed 340→150 as a shrinkable flex item. The render now fills
   the width and is cropped by overflow, the same way `.tpl-preview` already did it. */
.cv-thumb{height:180px;flex-shrink:0;overflow:hidden;background:var(--surface-hover);
  border-bottom:1px solid var(--border);display:flex;align-items:flex-start;justify-content:center}
/* width:100% maps the 595pt page width onto the card in every case, so a one-page
   (595×842) and a multi-page (595×1704) CV render at the SAME scale and show the same
   region of page 1. Anchoring to flex-start is what makes that true — centring would pull a
   tall SVG's midpoint into view and show page 2's header. */
.cv-thumb > svg,.cv-thumb > img{width:100%;height:auto;display:block;flex-shrink:0}
/* Grey-bar placeholder, used only when no thumbnail_svg is stored. */
.cv-thumb.is-placeholder{flex-direction:column;align-items:stretch;padding:14px;gap:6px}
.cv-thumb .ln{height:6px;background:var(--border-strong);border-radius:3px;flex-shrink:0}
.cv-thumb .ln.hd{width:55%;background:var(--accent);height:8px}
.cv-thumb .ln.w1{width:90%}.cv-thumb .ln.w2{width:75%}.cv-thumb .ln.w3{width:82%}.cv-thumb .ln.w4{width:60%}
/* Inline chip (the "CV used" row on an application). */
.cv-thumb.is-chip{width:48px;height:64px;border:1px solid var(--border);
  border-radius:var(--radius-sm)}
/* The chip's fallback icon stays centred while a real render fills the box, so the
   centring lives on the icon rather than on the container. */
.cv-thumb .doc-icon{margin:auto;width:22px;height:22px;color:var(--text-muted);flex-shrink:0}

/* Rendered template preview (admin template gallery). Holds the A4 page ratio
   so the tile does not reflow while the SVG or PNG loads; the child preview is
   whatever the renderer emits, so it is sized from here rather than inline. */
.tpl-preview{position:relative;aspect-ratio:595/842;background:var(--surface-hover);border-bottom:1px solid var(--border);overflow:hidden;display:flex;align-items:flex-start;justify-content:center}
.tpl-preview > svg,.tpl-preview > img{width:100%;height:auto}
.tpl-preview .placeholder{margin:auto;font-size:12px;color:var(--text-muted)}
/* Actions sit in a strip along the bottom of the thumbnail, shown on hover or
   keyboard focus, so a locked (Pro) template is previewed at full clarity —
   no grey wash — with only a small lock badge to say it needs an upgrade.
   Touch screens have no hover: locked cards keep the strip visible, and a
   selected card shows its Preview button. */
.tpl-preview .overlay,.tpl-shot .overlay{position:absolute;left:0;right:0;bottom:0;display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:center;padding:26px 8px 10px;background:linear-gradient(to top,rgba(15,23,42,.78),rgba(15,23,42,0));opacity:0;transition:opacity .15s}
.tpl-preview:hover .overlay,.tpl-preview:focus-within .overlay,
.tpl-shot:hover .overlay,.tpl-shot:focus-within .overlay{opacity:1}
.tpl-preview .overlay .btn-outline,.tpl-shot .overlay .btn-outline{background:var(--surface);color:var(--text-primary)}
@media (hover:none){
  .tpl-preview.is-locked .overlay,.tpl-option.is-locked .overlay,
  .radio-card input:checked + .body .tpl-preview .overlay{opacity:1}
}
.tpl-lock-badge{position:absolute;top:8px;right:8px;z-index:1;display:inline-flex;align-items:center;gap:4px;padding:3px 8px 3px 7px;border-radius:var(--radius-full);background:rgba(15,23,42,.85);color:#fff;font-size:11px;font-weight:700;line-height:1.3;letter-spacing:.02em}
.tpl-lock-badge svg{width:11px;height:11px}
.radio-card.tpl-card-locked{cursor:default}
.radio-card.tpl-card-locked input:disabled + .body{opacity:1;cursor:default}
/* Lazy thumbnails shimmer until the image arrives, so a card is never blank. */
.tpl-preview:has(> img):not(.is-loaded),.tpl-shot:not(.is-loaded){background:linear-gradient(90deg,var(--surface-hover) 25%,var(--skeleton-shine) 50%,var(--surface-hover) 75%);background-size:200% 100%;animation:shimmer 1.4s infinite}
@media (prefers-reduced-motion:reduce){.tpl-preview:has(> img):not(.is-loaded),.tpl-shot:not(.is-loaded){animation:none}}
/* Large preview dialog (views/partials/template-preview-dialog.ejs). */
.tpl-lightbox-panel{max-width:760px}
.tpl-lightbox-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tpl-lightbox-body{padding-top:12px;padding-bottom:4px}
.tpl-lightbox-frame{width:min(100%,calc(68vh * 595 / 842));aspect-ratio:595/842;margin:0 auto;border:1px solid var(--border);border-radius:var(--radius-md);overflow:hidden;background:#fff}
.tpl-lightbox-frame img{display:block;width:100%;height:auto}
.tpl-lightbox-note{margin:0 auto 0 0;align-self:center}
@media (prefers-reduced-motion:reduce){.tpl-preview .overlay{transition:none}}

/* ---------- 28. CV document surface (editor + preview) ----------
   The CV is a *document*, not app chrome, so the type scale and colours below
   are the renderer's own (2-rc / MINIMAL_STYLES) rather than the design tokens above — the
   page is authored at 595px so they map ~1:1 to the SVG's pt units.
   The editing overlays that sit on top of it DO use the design tokens. */
.cv-canvas{position:relative;background:var(--surface-alt);border:1px solid var(--border);border-radius:var(--radius-lg);padding:28px 20px;overflow-x:auto}
.cv-pages{display:flex;flex-direction:column;align-items:center;gap:14px}
.cv-page{position:relative;width:595px;max-width:100%;min-height:842px;background:#fff;border:1px solid rgba(15,23,42,.06);border-radius:8px;box-shadow:var(--shadow-md);padding:40px 50px}
.cv-page-num{position:absolute;left:0;right:0;bottom:16px;text-align:center;font-family:"Trebuchet MS",var(--font);font-size:9px;color:#5b6770}

/* document typography */
.cv-doc{font-family:"Trebuchet MS",var(--font)}
.cv-name{font-family:Georgia,"Times New Roman",serif;font-size:28px;line-height:32px;font-weight:600;color:#1f2428;letter-spacing:.3px}
.cv-headline{font-size:12px;line-height:16px;font-weight:500;color:#5b6770;letter-spacing:.6px;margin-top:4px}
.cv-contact{font-size:9px;line-height:14px;color:#5b6770;margin-top:6px}
.cv-section{position:relative;font-size:9px;line-height:14px;font-weight:600;color:#5b6770;letter-spacing:2px;text-transform:uppercase;margin-top:16px}
.cv-rule{height:1px;width:90%;background:#d4dce2;margin-top:5px;margin-bottom:12px}
.cv-body{font-size:11px;line-height:16px;color:#1f2428}
.cv-role{font-size:11px;line-height:16px;font-weight:600;color:#1f2428}
.cv-muted{font-size:9px;line-height:14px;color:#5b6770}
.cv-entry + .cv-entry{margin-top:10px}
.cv-list{list-style:none;margin-top:4px}
.cv-list li{position:relative;padding-left:12px;font-size:11px;line-height:16px;color:#1f2428}
.cv-list li + li{margin-top:4px}
.cv-list li::before{content:"";position:absolute;left:2.5px;top:6px;width:4px;height:4px;border-radius:50%;background:#1f2428}

/* editing overlays — design tokens */
.cv-block{position:relative}
.cv-block.is-selected{outline:1px solid var(--accent);outline-offset:6px;border-radius:6px;background:var(--accent-light)}
.cv-block-actions{position:absolute;top:-16px;right:-16px;display:flex;gap:6px;padding:6px;background:var(--surface);border:1px solid var(--accent-border);border-radius:var(--radius-md);box-shadow:var(--shadow-md);z-index:5}
.cv-act-add{width:24px;height:24px;flex-shrink:0;border:1px solid var(--accent-border);background:var(--accent-light);color:var(--accent);border-radius:var(--radius-sm);font-size:14px;font-weight:700;display:flex;align-items:center;justify-content:center}
.cv-act-add:hover{background:var(--accent);color:#fff}
.cv-act-del{padding:4px 8px;border:1px solid var(--destructive-border);background:var(--destructive-bg);color:var(--destructive);border-radius:var(--radius-sm);font-size:12px;font-weight:600}
.cv-act-del:hover{background:var(--destructive);color:#fff}
.cv-section-add{position:absolute;right:0;top:-3px;width:19px;height:19px;border-radius:var(--radius-full);border:1px solid var(--accent-border);background:var(--accent-light);color:var(--cv-ov-accent, var(--accent));font-size:12px;font-weight:700;line-height:1;display:flex;align-items:center;justify-content:center;box-shadow:var(--cv-ov-shadow, var(--shadow-sm))}
.cv-section-add:hover{background:var(--cv-ov-accent, var(--accent));color:#fff}
.cv-fab{position:fixed;right:24px;bottom:24px;width:46px;height:46px;border:0;border-radius:var(--radius-full);background:var(--accent);color:#fff;font-size:22px;font-weight:700;line-height:1;display:flex;align-items:center;justify-content:center;box-shadow:var(--shadow-md);z-index:10}
.cv-fab:hover{background:var(--accent-hover)}
.cv-gear{position:fixed;right:0;top:50%;transform:translateY(-50%);width:36px;height:36px;border:1px solid var(--border);border-right:0;border-radius:var(--radius-md) 0 0 var(--radius-md);background:var(--surface-hover);color:var(--text-secondary);display:flex;align-items:center;justify-content:center;box-shadow:var(--shadow-sm);z-index:10}
.cv-gear:hover{background:var(--surface);color:var(--text-primary)}
.cv-status{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:var(--success);font-weight:600}
.cv-status .dot-ok{position:static;width:7px;height:7px;border-radius:50%;background:var(--success);border:0}
.cv-status.is-busy{color:var(--text-secondary)}
.cv-status.is-busy .dot-ok{background:var(--warning)}
.cv-status.is-error{color:var(--destructive)}
.cv-status.is-error .dot-ok{background:var(--destructive)}

/* ---------- 28b. CV editor chrome ----------
   The editor is full-bleed: its toolbar and canvas cancel `.content`'s padding
   so the A4 page sits on an edge-to-edge surface. Moved here from an inline
   <style> in dashboard/cv-editor.ejs — the page sizes below are A4 geometry
   (595 × 842 pt), not theme, so they are literal rather than tokenised. */
.cv-edit-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  margin:-28px -24px 0;padding:12px 24px;border-bottom:1px solid var(--border);background:var(--surface)}
.cv-edit-canvas{position:relative;isolation:isolate;margin:0 -24px -72px;height:calc(100vh - var(--topbar-h) - 62px);overflow:auto;
  background:var(--surface-alt);padding:32px 16px;display:flex;flex-direction:column;align-items:center}
/* The CV title, edited in place in the toolbar. */
.cv-edit-name{border:0;background:transparent;padding:0;height:auto;width:auto;max-width:320px;
  font-size:15px;font-weight:600;color:var(--text-primary)}
.cv-edit-name:focus{border:0;box-shadow:none;outline:0;border-bottom:1px solid var(--accent)}

#cv-preview-container{position:relative;width:min(640px,calc(100vw - 2rem));min-height:842px}
.cv-render-pages{display:flex;flex-direction:column;gap:14px;align-items:center;width:100%}
.cv-render-page{position:relative;width:min(595px,calc(100vw - 2rem));background:#fff;border-radius:8px;
  border:1px solid rgba(15,23,42,.06);box-shadow:0 8px 20px rgba(15,23,42,.08);overflow:hidden}
.cv-render-page svg{display:block;width:100%;height:auto;background:#fff}

/* Admin tools drawer, opened by the .cv-gear tab. */
.cv-admin{position:fixed;right:0;top:50%;transform:translate(100%,-50%);z-index:9;width:224px;
  background:var(--surface);border:1px solid var(--border);border-right:0;
  border-radius:var(--radius-lg) 0 0 var(--radius-lg);box-shadow:var(--shadow-lg);transition:transform .2s ease}
.cv-admin.is-open{transform:translate(0,-50%)}
@media (prefers-reduced-motion:reduce){.cv-admin{transition:none}}

/* ---------- 28c. Template designer ----------
   Full-height workbench inside the app shell: toolbar, structure/add rail,
   engine-rendered artboard with a selection overlay, and an inspector rail.
   The artboard reuses .cv-render-pages/.cv-render-page from the CV editor. */
.designer{display:flex;flex-direction:column;margin:-28px -24px -72px;height:calc(100vh - var(--topbar-h));background:var(--surface-alt)}
.designer-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 16px;border-bottom:1px solid var(--border);background:var(--surface);flex-shrink:0}
.designer-toolbar-title{display:flex;flex-direction:column;line-height:1.2;min-width:120px}
.designer-toolbar-title strong{font-size:14px}
.designer-toolbar-group{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.designer-toolbar-group:last-child{margin-left:auto}
.designer-toolbar-field{display:flex;align-items:center;gap:6px}
.designer-toolbar-sep{width:1px;height:22px;background:var(--border);margin:0 4px}
.designer-toolbar .icon-btn{width:32px;height:32px;font-size:15px}
.designer-toolbar .icon-btn:disabled{opacity:.35}
.input-sm{height:32px;padding:0 8px;font-size:13px;width:auto;min-width:0}
.designer-toolbar select.input-sm{padding-right:30px}
/* Room to scroll the last page clear of the compact admin pill. */
body:has(.admin-bar[data-compact="1"]) .designer-artboard-scroll{padding-bottom:64px}
.designer-status{font-size:12px;color:var(--text-muted);min-width:80px;text-align:right}
.designer-status.is-ok{color:var(--success)}.designer-status.is-error{color:var(--destructive)}
.designer-main{display:grid;grid-template-columns:280px minmax(0,1fr) 320px;flex:1;min-height:0}
.designer-rail{display:flex;flex-direction:column;min-height:0;background:var(--surface);border-right:1px solid var(--border)}
.designer-rail-right{border-right:0;border-left:1px solid var(--border)}
.designer-rail-tabs{margin:0;padding:0 6px;flex-shrink:0}
.designer-rail-tabs .tab{padding:10px 8px;font-size:12.5px}
/* Five inspector tabs share a 280–320px rail: compact them and let them wrap
   rather than scroll, so "Issues" is never cut off. */
.designer-rail-right .designer-rail-tabs{flex-wrap:wrap;overflow:visible;column-gap:0}
.designer-rail-right .designer-rail-tabs .tab{padding:10px 7px;font-size:12px;display:inline-flex;align-items:center;gap:4px}
.designer-rail-right .designer-rail-tabs .designer-issues-count:empty{display:none}
.designer-rail-body{flex:1;overflow:auto;padding:10px 12px;min-height:0}
.designer-issues-count{display:inline-block;min-width:16px;padding:0 5px;border-radius:var(--radius-full);font-size:10.5px;line-height:16px;text-align:center}
.designer-issues-count.is-warn{background:var(--warning-bg);color:var(--warning)}
.designer-issues-count.is-error{background:var(--destructive-bg);color:var(--destructive)}
/* Structure tree */
.designer-tree{font-size:12.5px}
.tree-node{display:flex;align-items:center;gap:6px;height:26px;padding-right:6px;border-radius:var(--radius-sm);cursor:pointer;white-space:nowrap;overflow:hidden;user-select:none}
.tree-node:hover{background:var(--surface-hover)}
.tree-node.is-selected{background:var(--accent-light);color:var(--accent)}
.tree-node.is-hidden .tree-type,.tree-node.is-hidden .tree-text{opacity:.45;text-decoration:line-through}
.tree-node.is-drop-before{box-shadow:inset 0 2px 0 var(--accent)}
.tree-node.is-drop-after{box-shadow:inset 0 -2px 0 var(--accent)}
.tree-node.is-drop-inside{outline:2px dashed var(--accent);outline-offset:-2px}
.tree-node.is-dragging{opacity:.5}
.tree-caret{width:16px;height:16px;border:0;background:transparent;color:var(--text-muted);font-size:14px;line-height:1;flex-shrink:0;transition:transform .12s ease;cursor:pointer}
.tree-caret.is-open{transform:rotate(90deg)}
.tree-caret.is-leaf{opacity:.4;pointer-events:none}
.tree-type{font-family:var(--mono);font-size:11px;color:var(--text-secondary);flex-shrink:0}
.tree-node.is-selected .tree-type{color:var(--accent)}
.tree-text{color:var(--text-muted);overflow:hidden;text-overflow:ellipsis}
.tree-eye{margin-left:auto;width:20px;height:20px;border:0;background:transparent;color:var(--text-muted);font-size:9px;cursor:pointer;opacity:0;flex-shrink:0}
.tree-node:hover .tree-eye,.tree-node.is-hidden .tree-eye{opacity:1}
.tree-slot{font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);padding:4px 0 2px}
/* Palette */
.palette-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:8px}
.palette-list{display:flex;flex-direction:column;gap:6px;margin-bottom:8px}
.palette-row{display:flex;gap:6px;align-items:center}
.palette-row .palette-item{flex:1}
.palette-row select{width:96px;height:30px;font-size:12px;padding:0 6px}
.palette-item{height:32px;padding:0 10px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);font-size:12.5px;font-weight:500;color:var(--text-primary);text-align:left;cursor:pointer}
.palette-item:hover{border-color:var(--accent-border);background:var(--accent-light);color:var(--accent)}
/* Inspector */
.designer-inspector{font-size:12.5px}
.inspector-title{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.inspector-title code{font-size:11px;color:var(--text-muted)}
.inspector-group{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);margin:14px 0 6px;padding-bottom:4px;border-bottom:1px solid var(--border)}
.inspector-field{display:flex;flex-direction:column;gap:3px;margin-bottom:8px}
.inspector-field>span{font-size:11.5px;font-weight:600;color:var(--text-secondary)}
.inspector-field input,.inspector-field select,.inspector-field textarea{height:30px;padding:0 8px;font-size:12.5px}
.inspector-field textarea{height:auto;padding:6px 8px;font-family:var(--mono);font-size:11.5px;line-height:1.4;resize:vertical}
.inspector-field .help{display:block;font-size:11px;color:var(--text-muted);line-height:1.35}
.inspector-field .help.is-error{color:var(--destructive);font-weight:600}
.inspector-field input[aria-invalid="true"]{border-color:var(--destructive)}
.inspector-field.is-check{flex-direction:row;align-items:center;gap:8px;flex-wrap:wrap}
.inspector-field.is-check input{width:15px;height:15px;margin:0}
.inspector-field.is-check .help{flex-basis:100%}
.inspector-field.is-check>span{flex:1;min-width:0}
.inspector-note{display:flex;flex-direction:column;align-items:flex-start;gap:6px;margin:0 0 8px;padding:8px 10px;border-radius:var(--radius-md);background:var(--warning-bg);color:var(--warning);font-size:11.5px;line-height:1.4}
.inspector-color{display:flex;gap:6px;align-items:center}
.inspector-color input[type=color]{width:30px;height:30px;padding:2px;border-radius:var(--radius-sm);flex-shrink:0}
.inspector-color input[type=text]{flex:1;min-width:0}
.inspector-actions{display:flex;gap:6px;margin-top:12px}
.inspector-slot{display:flex;align-items:center;gap:4px;margin-bottom:4px}
.inspector-slot code{flex:1;font-size:11.5px}
.style-table{display:flex;flex-direction:column;gap:4px}
.style-row{border:1px solid var(--border);border-radius:var(--radius-md);padding:0 8px}
.style-row summary{cursor:pointer;padding:6px 0;font-size:12px}
.style-row-body{padding:4px 0 6px}
/* Artboard */
.designer-canvas{display:flex;flex-direction:column;min-width:0;min-height:0;position:relative}
.designer-error{margin:10px 16px 0;flex-shrink:0}
.designer-artboard-scroll{flex:1;overflow:auto;padding:24px}
.designer-artboard-stage{position:relative;width:max-content;min-width:100%;display:flex;justify-content:center}
/* `zoom` (not transform) so the scaled page also scales its layout box: a
   fitted page never leaves a horizontal scrollbar behind. The overlay reads
   getBoundingClientRect, which reports the zoomed geometry. */
.designer-artboard{--artboard-zoom:1;zoom:var(--artboard-zoom);transition:opacity .12s ease}
.designer-artboard.is-rendering{opacity:.6}
.designer-artboard .cv-render-page{width:595px;max-width:none;cursor:crosshair;border-radius:4px}
.designer-artboard .cv-render-page[data-page-size=Letter]{width:612px}
.designer-artboard .cv-render-page[data-page-size=Legal]{width:612px}
.designer-artboard [data-block-id]{cursor:pointer}
.artboard-overlay{position:absolute;inset:0;pointer-events:none}
.overlay-box{position:absolute;border:1px solid var(--accent);pointer-events:none;box-sizing:border-box}
.overlay-box.is-hover{border-style:dashed;opacity:.6}
.overlay-box.is-selected{border-width:2px;box-shadow:0 0 0 3px var(--accent-light)}
.overlay-label.is-grip{pointer-events:auto;cursor:move;user-select:none;touch-action:none}
.overlay-handle{position:absolute;right:-5px;top:50%;width:9px;height:18px;margin-top:-9px;background:var(--accent);border-radius:2px;cursor:ew-resize;pointer-events:auto}
.overlay-label{position:absolute;left:-1px;top:-19px;padding:1px 6px;background:var(--accent);color:#fff;font-size:10.5px;line-height:16px;border-radius:3px 3px 0 0;white-space:nowrap;font-family:var(--mono)}
/* Issues */
.designer-diagnostics{display:flex;flex-direction:column;gap:6px}
.diag-item{display:flex;flex-direction:column;gap:2px;padding:8px 10px;border:1px solid var(--border);border-left-width:3px;border-radius:var(--radius-md);background:var(--surface);text-align:left;cursor:pointer;font-size:12px}
.diag-item strong{font-size:12.5px}
.diag-item span{color:var(--text-muted);font-size:11px}
.diag-item small{color:var(--text-secondary);line-height:1.35}
.diag-item.is-warn{border-left-color:var(--warning)}
.diag-item.is-error{border-left-color:var(--destructive)}
.diag-item:hover{background:var(--surface-hover)}
.diag-item.is-static{cursor:default}
.designer-json{width:100%;font-family:var(--mono);font-size:12px;line-height:1.45;padding:10px;min-height:360px;resize:vertical}
@media (max-width:1200px){
  .designer-main{grid-template-columns:240px minmax(0,1fr) 280px}
}
/* At 1024 the admin sidebar is off-canvas, so three narrower columns still
   fit; stacking there put the inspector below every rendered page. */
@media (max-width:1024px){
  .designer-main{grid-template-columns:220px minmax(0,1fr) 260px}
  .designer-artboard-scroll{padding:16px}
}
@media (max-width:860px){
  .designer{height:auto;min-height:calc(100vh - var(--topbar-h))}
  .designer-main{grid-template-columns:1fr;grid-auto-rows:auto}
  .designer-rail{max-height:38vh;border-right:0;border-bottom:1px solid var(--border)}
  .designer-rail-right{border-left:0;border-top:1px solid var(--border)}
  /* The canvas scrolls inside itself so the inspector stays one scroll away. */
  .designer-canvas{height:70vh}
  .designer-artboard-scroll{padding:12px}
}
/* Same bleed as .content's padding, which only narrows at 560px. */
@media (max-width:560px){
  .designer{margin:-20px -16px -84px}
}

/* ---------- 28d. CV editor overlays and drawers ----------
   Everything the editor draws over the rendered document: the hover
   highlight, the in-place text editor, entry/list/skill action bars, the
   "+" beside section headings, the missing-data button, and the Templates /
   Customise / Sections drawers. Document typography stays the renderer's. */
/* Shared look for everything drawn over the CV: one accent, one radius,
   one ring/glow, one bar surface (light and dark themes). */
:root{
  --cv-ov-accent:var(--accent);
  --cv-ov-tint:color-mix(in srgb,var(--accent) 9%,transparent);
  --cv-ov-tint-strong:color-mix(in srgb,var(--accent) 30%,transparent);
  --cv-ov-line:color-mix(in srgb,var(--accent) 45%,transparent);
  --cv-ov-radius:6px;
  --cv-ov-radius-sm:4px;
  --cv-ov-outline:1px solid var(--cv-ov-accent);
  --cv-ov-glow:0 0 0 4px color-mix(in srgb,var(--accent) 12%,transparent),0 6px 20px -6px color-mix(in srgb,var(--accent) 45%,transparent);
  --cv-ov-bar-bg:var(--surface);
  --cv-ov-bar-border:var(--border);
  --cv-ov-shadow:0 1px 2px rgba(15,23,42,.06),0 4px 12px -2px rgba(15,23,42,.12);
}
.cv-inline-highlight{position:fixed;z-index:900;border:1px solid var(--cv-ov-line);border-radius:var(--cv-ov-radius-sm);background:var(--cv-ov-tint);pointer-events:none}
.cv-inline-editor{position:fixed;inset:0;z-index:1000}
/* The editor sits exactly on the text it replaces: no padding, border or
   fill (overlay-text.js sets font, size, colour, line height and position
   from the SVG text, which is hidden while editing). */
.cv-inline-editor-input,.cv-inline-editor-input:focus{position:absolute;box-sizing:content-box;margin:0;padding:0;border:0;border-radius:2px;min-width:0;min-height:0;resize:none;overflow:hidden;background:transparent;color:inherit;caret-color:var(--cv-ov-accent);outline:var(--cv-ov-outline);outline-offset:3px;box-shadow:var(--cv-ov-glow);white-space:pre-wrap;overflow-wrap:break-word;word-break:normal;tab-size:4;appearance:none;-webkit-appearance:none;scrollbar-width:none}
.cv-inline-editor-input::-webkit-scrollbar{display:none}
.cv-inline-editor-input::selection{background:var(--cv-ov-tint-strong);color:inherit}
.cv-inline-editor-input::placeholder{color:inherit;opacity:.38}
/* While the editor is open, hover frames and bars stay out of its way. */
body:has(.cv-inline-editor:not([hidden])) :is(.cv-item-frame,.cv-list-frame,.cv-level-actions,.cv-skill-actions,.cv-inline-highlight){visibility:hidden}
.cv-inline-editor-mirror{position:fixed;left:-9999px;top:0;visibility:hidden;white-space:pre;padding:0;margin:0;border:0;pointer-events:none}
.cv-inline-label{position:absolute;display:inline-flex;align-items:center;gap:6px;max-width:min(360px,calc(100vw - 12px));padding:2px 7px;border:1px solid var(--cv-ov-bar-border);border-radius:var(--cv-ov-radius);background:var(--cv-ov-bar-bg);box-shadow:var(--cv-ov-shadow);font:500 11px/16px var(--font-sans,Inter,system-ui,sans-serif);color:var(--text-primary);white-space:nowrap;letter-spacing:0;text-transform:none;cursor:default;user-select:none;-webkit-user-select:none}
.cv-inline-label::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--cv-ov-accent);flex-shrink:0}
.cv-inline-label-name{overflow:hidden;text-overflow:ellipsis}
.cv-inline-label-hint{color:var(--text-secondary);font-weight:400}
.cv-page-badge{margin-left:4px;flex:0 0 auto;white-space:nowrap}
/* The embedded editor's Done button keeps its full width; the CV name shrinks instead. */
.cv-embed-done{flex:0 0 auto;white-space:nowrap}
/* Entry / list frames follow the hovered element (fixed, viewport coordinates). */
.cv-item-frame{position:absolute;z-index:5;border:1px dotted var(--destructive-border);border-radius:var(--cv-ov-radius);background:rgba(220,38,38,.03);pointer-events:none}
.cv-list-frame{position:absolute;z-index:6;border:1px dashed var(--cv-ov-line);border-radius:var(--cv-ov-radius-sm);background:var(--cv-ov-tint);pointer-events:none}
.cv-item-frame .cv-block-actions,.cv-list-frame .cv-block-actions{position:absolute;top:-8px;right:auto;left:calc(100% + 8px);white-space:nowrap;display:flex;gap:6px;padding:5px;background:var(--cv-ov-bar-bg);border:1px solid var(--cv-ov-bar-border);border-radius:calc(var(--cv-ov-radius) + 2px);box-shadow:var(--cv-ov-shadow);pointer-events:auto;font-size:12px;line-height:1}
.cv-item-frame.is-left .cv-block-actions,.cv-list-frame.is-left .cv-block-actions{left:auto;right:calc(100% + 8px)}
.cv-item-frame.is-left .cv-act-menu{right:auto;left:0}
.cv-item-frame.is-flipped .cv-block-actions,.cv-list-frame.is-flipped .cv-block-actions{left:auto;right:0;top:auto;bottom:calc(100% + 6px)}
.cv-item-frame.is-flipped .cv-act-menu{top:auto;bottom:34px}
.cv-block-actions .cv-act-add,.cv-block-actions .cv-act-move{height:24px;min-width:24px;padding:0 6px;border:1px solid var(--accent-border);background:var(--accent-light);color:var(--cv-ov-accent);border-radius:var(--cv-ov-radius);font-weight:700;font-size:13px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.cv-block-actions .cv-act-move:disabled{opacity:.35;cursor:default}
.cv-block-actions .cv-act-del{height:24px;padding:0 10px;border:1px solid var(--destructive-border);background:var(--destructive-bg);color:var(--destructive);border-radius:var(--cv-ov-radius);font-size:12px;cursor:pointer}
.cv-block-actions .is-text{width:auto;padding:0 10px}
.cv-act-menu{position:absolute;top:34px;right:0;display:flex;flex-direction:column;gap:4px;min-width:190px;padding:6px;background:var(--surface);border:1px solid var(--border);border-radius:8px;box-shadow:var(--shadow-md);pointer-events:auto;z-index:1}
.cv-act-menu-item{border:1px solid var(--border);background:var(--surface-alt);color:var(--text-primary);border-radius:6px;padding:6px 8px;text-align:left;cursor:pointer;font-size:12px;white-space:nowrap}
.cv-act-menu-item:hover{background:var(--accent-light);border-color:var(--accent-border);color:var(--accent)}
.cv-level-actions,.cv-skill-actions{position:absolute;right:auto;bottom:auto;width:max-content;z-index:7;display:flex;gap:4px;padding:5px;background:var(--cv-ov-bar-bg);border:1px solid var(--cv-ov-bar-border);border-radius:calc(var(--cv-ov-radius) + 2px);box-shadow:var(--cv-ov-shadow);font-size:12px;line-height:1}
.cv-skills-menu{position:absolute;z-index:8;top:auto;right:auto}
.cv-section-add-layer{position:absolute;left:0;top:0;width:0;height:0;overflow:visible;pointer-events:none;z-index:4}
.cv-section-add-layer .cv-section-add{position:absolute;top:auto;right:auto;pointer-events:auto;cursor:pointer}
/* SVG overlay mode (editor_overlay_mode = svg): the same chrome drawn inside
   each page's SVG (public/js/cv-editor/svg-overlay). Controls are drawn in
   screen pixels inside a scale(1/zoom) group; strokes never scale. The page
   lets the chrome paint into the gutter beside it, and the page showing
   chrome sits above its neighbours. */
#cv-preview-container[data-overlay-mode=svg] .cv-render-page{overflow:visible}
#cv-preview-container[data-overlay-mode=svg] .cv-render-page>svg{overflow:visible;border-radius:8px}
#cv-preview-container[data-overlay-mode=svg] .cv-render-page:is(:hover,:focus-within,.is-ov-active){z-index:2}
.cv-ov{font-family:var(--font-sans,Inter,system-ui,sans-serif);font-size:12px;letter-spacing:0;text-transform:none}
.cv-ov text{user-select:none;-webkit-user-select:none;pointer-events:none;font-style:normal}
.cv-ov rect,.cv-ov circle,.cv-ov path{vector-effect:non-scaling-stroke}
.cv-ov-highlight{fill:var(--cv-ov-tint);stroke:var(--cv-ov-line);stroke-width:1;pointer-events:none}
.cv-ov-frame{pointer-events:none;stroke-width:1}
.cv-ov-frame-item{fill:rgba(220,38,38,.03);stroke:var(--destructive-border);stroke-dasharray:1.5 2}
.cv-ov-frame-list{fill:var(--cv-ov-tint);stroke:var(--cv-ov-line);stroke-dasharray:4 3}
.cv-ov-bar-bg,.cv-ov-menu-bg,.cv-ov-label-bg{fill:var(--cv-ov-bar-bg);stroke:var(--cv-ov-bar-border);stroke-width:1;filter:drop-shadow(0 1px 1px rgba(15,23,42,.06)) drop-shadow(0 4px 6px rgba(15,23,42,.10))}
.cv-ov-btn{cursor:pointer;outline:none}
.cv-ov-btn-bg{fill:var(--accent-light);stroke:var(--accent-border);stroke-width:1}
.cv-ov-btn-text{fill:var(--cv-ov-accent);font-size:13px;font-weight:700}
.cv-ov-btn:hover .cv-ov-btn-bg{fill:var(--cv-ov-accent);stroke:var(--cv-ov-accent)}
.cv-ov-btn:hover .cv-ov-btn-text{fill:#fff}
.cv-ov-btn-del .cv-ov-btn-bg{fill:var(--destructive-bg);stroke:var(--destructive-border)}
.cv-ov-btn-del .cv-ov-btn-text{fill:var(--destructive);font-size:12px;font-weight:600}
.cv-ov-btn-del:hover .cv-ov-btn-bg{fill:var(--destructive);stroke:var(--destructive)}
.cv-ov-btn-item .cv-ov-btn-bg{fill:var(--surface-alt);stroke:var(--border)}
.cv-ov-btn-item .cv-ov-btn-text{fill:var(--text-primary);font-size:12px;font-weight:400}
.cv-ov-btn-item:hover .cv-ov-btn-bg,.cv-ov-btn-item:focus-visible .cv-ov-btn-bg{fill:var(--accent-light);stroke:var(--accent-border)}
.cv-ov-btn-item:hover .cv-ov-btn-text,.cv-ov-btn-item:focus-visible .cv-ov-btn-text{fill:var(--accent)}
.cv-ov-btn[aria-disabled=true]{opacity:.35;cursor:default;pointer-events:none}
.cv-ov-btn-ring,.cv-ov-adder-ring{fill:none;stroke:none}
.cv-ov-btn:focus-visible .cv-ov-btn-ring,.cv-ov-adder:focus-visible .cv-ov-adder-ring{stroke:var(--cv-ov-accent);stroke-width:2}
.cv-ov-adder{cursor:pointer;outline:none}
.cv-ov-adder-bg{fill:var(--accent-light);stroke:var(--accent-border);stroke-width:1}
.cv-ov-adder-icon{stroke:var(--cv-ov-accent);stroke-width:1.8;stroke-linecap:round}
.cv-ov-adder:hover .cv-ov-adder-bg{fill:var(--cv-ov-accent);stroke:var(--cv-ov-accent)}
.cv-ov-adder:hover .cv-ov-adder-icon{stroke:#fff}
.cv-ov-edit-ring{fill:none;stroke:var(--cv-ov-accent);stroke-width:1;pointer-events:none}
.cv-ov-edit-glow{fill:none;stroke:color-mix(in srgb,var(--accent) 16%,transparent);stroke-width:6;pointer-events:none}
.cv-ov-sel{fill:var(--cv-ov-tint-strong);pointer-events:none}
.cv-ov-compose{fill:var(--cv-ov-accent);pointer-events:none}
.cv-ov-caret{fill:var(--cv-ov-accent);pointer-events:none;animation:cv-ov-blink 1.06s steps(1,end) .5s infinite}
@keyframes cv-ov-blink{50%{opacity:0}}
.cv-ov-label{pointer-events:none}
.cv-ov-label-dot{fill:var(--cv-ov-accent)}
.cv-ov-label-name{fill:var(--text-primary);font-size:11px;font-weight:500}
.cv-ov-label-hint{fill:var(--text-secondary);font-size:11px;font-weight:400}
/* The SVG editor's keyboard: a textarea at the caret (IME windows open
   there), invisible, 16px so phones never zoom into it. */
.cv-ov-input{position:fixed;left:0;top:0;display:none;width:2px;height:16px;margin:0;padding:0;border:0;outline:0;opacity:0;font-size:16px;line-height:16px;resize:none;overflow:hidden;white-space:pre;background:transparent;color:transparent;caret-color:transparent;pointer-events:none;z-index:1}
.cv-ov-input.is-open{display:block}
/* While a field is edited in place, hover frames and bars stay out of its way. */
body:has(.cv-ov-input.is-open) .cv-ov :is(.cv-ov-highlight,.cv-ov-frames,.cv-ov-bars,.cv-ov-menus){visibility:hidden}
@media (prefers-reduced-motion:reduce){.cv-ov-caret{animation:none}}
/* Missing-data button (bottom right) and its menu. */
.cv-fab-wrap{position:fixed;right:24px;bottom:24px;z-index:56}
.cv-fab-wrap .cv-fab{position:static}
.cv-fab.is-empty{opacity:.4}
.cv-fab-menu{position:absolute;right:0;bottom:56px;min-width:230px;max-height:320px;overflow:auto;padding:8px;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-lg);display:flex;flex-direction:column;gap:6px}
.cv-fab-item{border:1px solid var(--border);background:var(--surface-alt);color:var(--text-primary);border-radius:8px;padding:7px 10px;text-align:left;cursor:pointer;font-size:12.5px}
.cv-fab-item:hover{background:var(--accent-light);border-color:var(--accent-border);color:var(--accent)}
/* Photo picker */
.cv-image-picker-dialog{max-width:940px}
.cv-image-picker-body{display:grid;grid-template-columns:minmax(240px,320px) minmax(280px,1fr);gap:14px}
.cv-image-picker-side{display:flex;flex-direction:column;gap:12px}
.cv-image-picker-stage{padding:12px;display:flex;flex-direction:column;gap:10px}
.cv-image-preview{display:flex;justify-content:center;align-items:center;min-height:300px;background:var(--surface-alt);border-radius:10px;border:1px solid var(--border)}
.cv-image-preview canvas{box-shadow:var(--shadow-md);background:#fff;cursor:grab;touch-action:none}
.cv-image-zoom{display:flex;align-items:center;gap:10px}
.cv-image-zoom input[type=range]{flex:1}
.cv-image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:8px;max-height:240px;overflow:auto}
.cv-image-tile{border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:4px;cursor:pointer}
.cv-image-tile img{display:block;width:100%;height:76px;object-fit:cover;border-radius:6px;background:var(--surface-alt)}
.cv-image-tile:hover{border-color:var(--accent)}
.cv-image-dropzone{border:1px dashed var(--border-strong);border-radius:10px;background:var(--surface-alt);padding:14px;text-align:center;font-size:12.5px;color:var(--text-secondary);cursor:pointer}
.cv-image-dropzone.is-over{border-color:var(--accent);background:var(--accent-light)}
.cv-image-status.is-error{color:var(--destructive)}
/* Sections drawer */
.cv-section-list{display:flex;flex-direction:column;gap:6px}
.cv-section-item{display:flex;align-items:center;gap:6px;padding:6px 8px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface)}
.cv-section-item.is-hidden .cv-section-name{color:var(--text-muted);text-decoration:line-through}
.cv-section-name{flex:1;font-size:13.5px;font-weight:500}
.cv-section-item .icon-btn{width:30px;height:30px}
.cv-section-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cv-section-rename{flex:1;min-width:0;font-size:13.5px;padding:4px 6px;border:1px solid var(--accent);border-radius:6px;background:var(--surface);color:var(--text-primary)}
.cv-section-item .cv-section-rename-btn,.cv-section-item .cv-section-reset{color:var(--text-muted)}
.cv-custom-sections{display:flex;flex-direction:column;gap:6px;margin:-2px 0 4px 18px;padding-left:10px;border-left:2px solid var(--border)}
.cv-section-sub{background:var(--surface-hover)}
.cv-section-add-custom{align-self:flex-start}
.segmented{display:flex;gap:2px;margin-top:8px;background:var(--surface-hover);border-radius:var(--radius-md);padding:3px}
.segmented-btn{flex:1;min-height:32px;border:0;background:transparent;border-radius:6px;font:inherit;font-size:13px;color:var(--text-secondary);cursor:pointer}
.segmented-btn.is-active{background:var(--surface);color:var(--text-primary);font-weight:600;box-shadow:0 1px 2px rgb(0 0 0 / .08)}
.segmented-btn:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
/* Customise drawer */
.cv-customise-group{margin-bottom:18px}
.swatch-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.swatch{width:30px;height:30px;border-radius:var(--radius-full);border:2px solid var(--surface);box-shadow:0 0 0 1px var(--border);cursor:pointer;padding:0}
.swatch.is-active{box-shadow:0 0 0 2px var(--accent)}
.swatch.is-default{background:repeating-linear-gradient(45deg,#fff 0 4px,#e2e8f0 4px 8px)}
.swatch-custom{width:30px;height:30px;border-radius:var(--radius-full)}
/* Template drawer categories */
.tpl-category{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);margin:14px 0 6px}
.tpl-category:first-child{margin-top:0}
.tpl-name{display:flex;align-items:center;gap:6px}
.tpl-name-text{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tpl-name .pill{margin-left:auto;height:18px;font-size:10.5px;flex-shrink:0;white-space:nowrap}
/* Preview page: pages stack the same way as the editor */
.cv-preview-pages{width:100%;display:flex;justify-content:center}
.cv-preview-hint{display:none}
@media (max-width:768px){
  .qa-profile-head{gap:10px}
  .qa-profile-row{grid-template-columns:minmax(0,1fr)}
  .qa-profile-row .pill{justify-self:start}
  .cv-preview-hint{display:block}
  .cv-edit-bar .btn-sm{padding:0 10px}
  .cv-image-picker-body{grid-template-columns:1fr}
}

/* ---------- 28e. CV editor: toolbar, entry sheet, phone editing ----------
   The status keeps a fixed box (is-idle only hides it) so the CV name never
   reflows while "Saving…" shows. The secondary actions are display:contents
   on wide screens and fold into a "More" menu on phones. */
.cv-edit-bar > .row{flex-wrap:nowrap}
.cv-edit-name{flex:1 1 auto;min-width:8ch}
.cv-status{flex:0 0 86px;white-space:nowrap}
.cv-status.is-idle{visibility:hidden}
.cv-edit-actions{align-items:center;justify-content:flex-end;position:relative}
/* Undo / redo: one segmented control in the editor bar. */
.cv-history{display:inline-flex;align-items:stretch;height:32px;flex:none;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);box-shadow:var(--shadow-xs);overflow:hidden}
.cv-history-btn{width:36px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--text-primary);cursor:pointer;transition:background-color .15s ease,color .15s ease}
.cv-history-btn + .cv-history-btn{border-left:1px solid var(--border)}
.cv-history-btn svg{width:16px;height:16px}
.cv-history-btn:hover:not(:disabled){background:var(--surface-hover);color:var(--accent)}
.cv-history-btn:active:not(:disabled){background:var(--accent-light)}
.cv-history-btn:disabled{color:var(--text-muted);opacity:.5;cursor:default}
.cv-history-btn:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.cv-edit-more{display:contents}
.cv-edit-more-btn{display:none}
#btn-template{max-width:200px}
#btn-template .truncate{min-width:0}
.cv-customise-warning{margin-top:8px;padding:6px 9px;border-radius:var(--radius-md);background:var(--warning-bg);color:var(--warning-text,#92400e);border:1px solid var(--warning-border);font-size:12px;line-height:1.4;font-weight:500}
/* Entry sheet: a compact dialog on wide screens, a bottom sheet on phones. */
.cv-sheet{z-index:85}
.cv-sheet-panel{max-width:460px}
.cv-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.cv-sheet-grip{display:none}
.cv-sheet-body .field:last-child{margin-bottom:0}
.cv-sheet-body textarea{min-height:88px;resize:vertical}
.cv-sheet-foot{align-items:center}
.cv-sheet-extra{display:flex;gap:6px;margin-right:auto;flex-wrap:wrap}
/* Phone zoom control, shown by main.js only at ≤640px. */
.cv-zoom{position:fixed;left:12px;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:56;display:flex;align-items:center;gap:2px;padding:4px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-full);box-shadow:var(--shadow-md)}
.cv-zoom .icon-btn{width:36px;height:36px;font-size:18px;border-radius:var(--radius-full)}
.cv-zoom-level{min-width:52px;height:36px;border:0;background:transparent;color:var(--text-secondary);font-size:12.5px;font-weight:600;font-variant-numeric:tabular-nums;border-radius:var(--radius-full)}
.cv-zoom-level:hover{background:var(--surface-hover)}
@media (max-width:640px){
  .cv-edit-bar{row-gap:8px}
  .cv-edit-bar > .row{width:100%}
  .cv-edit-actions{width:100%;flex-wrap:nowrap;gap:6px}
  .cv-edit-actions #btn-template{flex:1 1 auto;min-width:0;max-width:none}
  .cv-edit-more-btn{display:inline-flex}
  .cv-edit-more{display:none;position:absolute;right:0;top:calc(100% + 6px);z-index:60;flex-direction:column;align-items:stretch;gap:4px;min-width:190px;padding:6px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg)}
  .cv-edit-more.is-open{display:flex}
  .cv-edit-more .btn{justify-content:flex-start;height:40px;width:100%}
  /* Fit-to-width page; zoom scales the layout box so the canvas pans. */
  .cv-edit-canvas{align-items:flex-start;touch-action:pan-x pan-y;height:calc(100vh - var(--topbar-h) - 108px)}
  #cv-preview-container{margin-inline:auto;zoom:var(--cv-zoom,1);min-height:0}
  .cv-sheet{align-items:flex-end;padding:0}
  .cv-sheet-panel{max-width:none;width:100%;max-height:88vh;border-radius:16px 16px 0 0;padding-bottom:env(safe-area-inset-bottom,0px);transform:translateY(12px);transition:transform .18s ease}
  .cv-sheet.is-open .cv-sheet-panel{transform:none}
  .cv-sheet-grip{display:block;width:40px;height:4px;border-radius:2px;background:var(--border-strong);margin:8px auto 0}
  .cv-sheet-head{padding-top:10px}
  .cv-sheet-body input,.cv-sheet-body select,.cv-sheet-body textarea{font-size:16px}
  .cv-sheet-foot .btn{height:40px}
  body.has-cv-sheet .cv-fab-wrap,body.has-cv-sheet .cv-zoom{display:none}
}
@media (prefers-reduced-motion:reduce){.cv-sheet-panel{transition:none}}

/* Editor/designer state and layout hooks referenced from scripts and views. */
.text-center{text-align:center}
.cv-customise{display:flex;flex-direction:column}
.cv-image-picker .dialog{margin:auto}
.cv-list-actions{white-space:nowrap}
#cv-preview-container.is-editing [data-edit-bind]{cursor:pointer}
/* Placeholders in empty fields (editor renders only, template-engine.js
   placeholderFor): dimmed while editing, hidden with Edit off and anywhere
   else a page is shown. They keep their space either way. */
[data-edit-placeholder]{visibility:hidden}
#cv-preview-container.is-editing [data-edit-placeholder]{visibility:visible;fill-opacity:.38}
.designer-rail-left{min-width:0}

/* ---------- 29. Responsive ---------- */
@media (max-width:1200px){
  .stats-5,.stats-6{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:1024px){
  .sidebar{transform:translateX(-100%)}
  .sidebar.open{transform:translateX(0)}
  .main{margin-left:0}
  .hamburger{display:flex}
  .stats,.grid-4,.grid-3,.job-results,.plan-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-2,.grid-sidebar,.split-pane{grid-template-columns:minmax(0,1fr)}
  .user-chip .name{display:none}
  .pub-nav{display:none}
  /* The mobile panel carries these, so showing them here too overflows the bar. */
  .pub-actions{display:none}
  .mobile-menu-btn{display:flex}
  .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .topbar-search{display:none}
}
@media (max-width:768px){
  .grid-3,.job-results,.plan-grid{grid-template-columns:minmax(0,1fr)}
  /* Below this width the right-hand column would squeeze the salary, so the
     list row folds into a single column like the grid card. */
  :root[data-jobs-view="list"] .job-results > .job-card{grid-template-columns:minmax(0,1fr);
    grid-template-areas:"head" "tags" "aside"}
  :root[data-jobs-view="list"] .job-results > .job-card .jc-aside{text-align:left;align-self:start}
  :root[data-jobs-view="list"] .job-results > .job-card .jc-meta{flex-direction:row;align-items:center;justify-content:space-between;margin-top:12px;padding-top:10px;border-top:1px solid var(--border)}
  :root[data-jobs-view="list"] .job-results > .job-card .jc-aside p{white-space:normal}
  :root[data-jobs-view="list"] .job-results > .job-card .jc-aside p:first-child{margin-top:12px}
  .hero h1{font-size:32px}
  .filter-bar{grid-template-columns:minmax(0,1fr)}
  .cta-band{margin:0 16px;padding:32px 20px}
  .footer-grid{grid-template-columns:minmax(0,1fr)}
  .wrap,.wrap-sm{padding:0 16px}
  /* The hero pill dissolves on mobile: two bare inputs sharing one card read as
     a single control. Each field becomes a standalone input instead, matching
     how every other input in the system looks. (The previous adjacent-sibling
     hairline never applied — .search-divider sits between the two fields.) */
  .search-bar{flex-direction:column;background:transparent;border:0;box-shadow:none;padding:0;gap:10px}
  .search-bar:focus-within{border:0;box-shadow:none}
  /* flex:none matters: the base rule sets flex:1, whose flex-basis:0 wins over
     height on the main axis once the bar becomes a column. */
  .search-field{flex:none;width:100%;min-width:0;height:48px;background:var(--surface);
                border:1px solid var(--border-strong);border-radius:var(--radius-md)}
  .search-field:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}
  .search-divider{display:none}
  .search-bar .btn{width:100%;height:48px}
  /* Stacked, the row's bottom edge sits below the submit button, so the panel
     goes back to hanging off its own field. It anchors to `.search-field`, not
     to the `.combobox` wrapper — the wrapper starts after the leading pin icon,
     which would inset the panel from the field's left edge. */
  .search-field{position:relative}
  .filter-bar .combobox{position:relative}
  .page-head{flex-direction:column;align-items:stretch}
  .stepper{overflow-x:auto}
  .step-label{display:none}
  .cv-canvas{padding:16px 12px}
  .cv-page{padding:24px 20px}
}
@media (max-width:560px){
  .stats,.grid-4,.grid-3,.stats-3,.stats-5,.stats-6{grid-template-columns:minmax(0,1fr)}
  .content{padding:20px 16px 84px}
  /* Keep the full-bleed editor flush with the narrower mobile content padding. */
  .cv-edit-bar{margin:-20px -16px 0;padding:12px 16px}
  .cv-edit-canvas{margin:0 -16px -84px;padding:20px 12px}
  .topbar{padding:0 16px}
  .toast-container{left:16px;right:16px;max-width:none}
  .hero{padding:40px 0 32px}
  .chip{height:34px;padding:0 14px}
  .cv-fab{bottom:104px}
}

/* One-time secret reveal (new API key): high-contrast monospace, one-click select. */
.secret-reveal{display:flex;align-items:center;gap:12px;padding:12px 12px 12px 16px;border:1px solid var(--border-strong);border-radius:var(--radius-md);background:var(--surface)}
.secret-reveal-value{flex:1;min-width:0;padding:0;background:none;border:0;font-family:var(--mono);font-size:15px;font-weight:600;line-height:1.5;color:var(--text-primary);letter-spacing:.02em;overflow-wrap:anywhere;user-select:all;-webkit-user-select:all}
.secret-reveal-copy{flex-shrink:0;min-width:96px}
@media (max-width:640px){.secret-reveal{flex-direction:column;align-items:stretch}.secret-reveal-copy{width:100%}}
/* One-off purchases: product cards on /dashboard/purchases and the quick-apply pay-once offer. */
.offer-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px}
.offer-card{display:flex;flex-direction:column;gap:6px;padding:16px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface)}
.offer-card.is-highlighted{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent)}
.offer-card-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.offer-card-head h3{font-size:15px;margin:0}
.offer-price{font-size:18px;font-weight:700;letter-spacing:-.01em;white-space:nowrap}
.offer-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto;padding-top:8px}
.qa-pay-once{border:1px solid var(--border);border-radius:var(--radius-md);padding:14px;background:var(--surface)}
.qa-pay-once.is-lead{border-color:var(--accent);background:var(--accent-light)}
.qa-pay-once + .qa-pay-once{margin-top:10px}
.qa-pay-once-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
/* Credit counters are three short numbers: keep them in one row on phones. */
@media (max-width:640px){
  .stats.credit-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .credit-stats .stat-card{padding:12px}
  .credit-stats .stat-value{font-size:22px;margin-top:4px}
  .credit-stats .stat-label,.credit-stats .text-xs{font-size:11.5px}
}
/* /jobs list controls: view switch, "Still open", posted window and sort in one
   row; selects are full-width by default, so they are sized to their text. */
.jobs-list-controls{flex-wrap:nowrap;justify-content:flex-end;align-items:center;gap:10px}
.jobs-list-controls select{width:auto;min-width:140px}
.jobs-open-toggle{white-space:nowrap;font-size:13px;margin:0}
@media (max-width:760px){
  .jobs-list-controls{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:8px}
  .jobs-list-controls select{width:100%;min-width:0}
  .jobs-open-toggle{justify-self:end}
}
.jc-deadline{color:var(--text-secondary);font-weight:500}

/* ---------- 30. Profile builder ----------
   One component, two layouts (public/js/profile-builder.js): `.pb-single`
   stacks every section as a card; `.pb-steps` asks one question per screen.
   Used by quick apply, the apply gate and /dashboard/profile/builder. */
.pb{display:flex;flex-direction:column;gap:16px;min-width:0}
.pb-steps{max-width:620px;width:100%;margin:0 auto}
.pb-loading{padding:24px 0;text-align:center}
.pb-head h2{font-size:20px;letter-spacing:-.01em}
.pb-head p{margin-top:4px}
.pb-optional{font-weight:400;color:var(--text-muted)}
.pb-sub{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted);margin:14px 0 8px}
.pb-section .card-head{border-bottom:0;padding-bottom:0}
.pb-fields .field:last-child,.pb-entry-body .field{margin-bottom:0}
.pb-foot{position:sticky;bottom:0;z-index:5;display:flex;align-items:center;justify-content:flex-end;gap:14px;
  padding:12px 0;background:linear-gradient(to top,var(--bg) 70%,transparent)}
.pb-foot .pb-status{margin:0 auto 0 0}
.pb-foot .pb-need{margin:0 auto 0 0}
.pb-status{margin-top:10px}
/* Upload */
.pb-drop{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;padding:26px 18px;margin:0;
  border:1.5px dashed var(--border-strong);border-radius:var(--radius-lg);background:var(--surface-alt);cursor:pointer;
  transition:border-color .15s ease,background .15s ease}
.pb-drop:hover,.pb-drop.is-active{border-color:var(--accent);background:var(--accent-light)}
.pb-drop strong{font-size:14px}
.pb-drop .muted{font-weight:400;max-width:44ch}
.pb-file-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.pb-drop:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}
.pb-files{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.pb-files:empty{display:none}
/* The file's name, then what was read from it under the name: the note can
   be a long list ("filled in headline, phone, 4 work experience, …"), so it
   wraps instead of pushing the row wider than the card. */
.pb-file{display:flex;flex-direction:column;align-items:stretch;gap:2px;padding:8px 12px;border:1px solid var(--border);
  border-radius:var(--radius-md);font-size:13px;background:var(--surface);min-width:0}
.pb-file-name{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pb-file-note{color:var(--text-secondary);font-size:12.5px;line-height:1.45;min-width:0;overflow-wrap:anywhere}
.pb-file.is-working .pb-file-note{color:var(--accent)}
.pb-file.is-done .pb-file-note{color:var(--success)}
.pb-file.is-failed{border-color:var(--destructive-border)}
.pb-file.is-failed .pb-file-note{color:var(--destructive)}
.pb-file.is-queued .pb-file-note{color:var(--text-muted)}
.pb-file.is-saved .pb-file-note{color:var(--text-secondary)}
/* Phones and emails */
.pb-contacts{display:flex;flex-direction:column;gap:10px}
.pb-contact{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pb-cc{position:relative;flex-shrink:0}
/* Country code picker: the closed button is flag + "+260"; the panel lists
   every country by full name with a search box. */
.pb-cc-btn{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 10px 0 11px;border:1px solid var(--border-strong);
  border-radius:var(--radius-md);background:var(--surface);color:var(--text-primary);font-size:14px;font-weight:500;cursor:pointer;white-space:nowrap}
.pb-cc-btn:hover{background:var(--surface-hover)}
.pb-cc-btn:focus-visible,.pb-cc-btn[aria-expanded="true"]{outline:0;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}
.pb-flag{font-size:18px;line-height:1;font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}
.pb-cc-code{font-variant-numeric:tabular-nums}
.pb-cc-chev{font-size:11px;color:var(--text-muted);margin-left:2px}
.pb-cc-panel{position:absolute;top:calc(100% + 6px);left:0;z-index:40;width:min(340px,calc(100vw - 72px));padding:8px;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-md)}
.pb-cc-search{margin-bottom:6px}
.pb-cc-list{list-style:none;margin:0;padding:0;max-height:min(300px,45vh);overflow-y:auto;overscroll-behavior:contain}
.pb-cc-opt{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:0;border-radius:var(--radius-sm);
  background:transparent;color:var(--text-primary);font-size:14px;text-align:left;cursor:pointer}
.pb-cc-opt:hover,.pb-cc-opt:focus-visible{outline:0;background:var(--surface-hover)}
.pb-cc-opt.is-selected{background:var(--accent-light);color:var(--accent);font-weight:600}
.pb-cc-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pb-cc-dial{color:var(--text-secondary);font-variant-numeric:tabular-nums;font-size:13px}
.pb-cc-opt.is-selected .pb-cc-dial{color:inherit}
.pb-cc-empty{padding:10px;font-size:13px;color:var(--text-muted)}
.pb-contact-main{flex:1 1 180px;min-width:0}
.pb-contact-opts{display:flex;align-items:center;gap:14px;flex-shrink:0}
.pb-contact-opts .check{margin:0;white-space:nowrap}
.pb-add{align-self:flex-start;color:var(--accent)}
.pb-add:hover{color:var(--accent-hover)}
/* Yes/no gate and entries */
.pb-list{display:flex;flex-direction:column;gap:10px}
.pb-gate{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.pb-gate-q{flex-basis:100%;font-size:14px;color:var(--text-secondary);margin-bottom:2px}
.pb-steps .pb-gate .btn{flex:1 1 160px;height:48px;font-size:15px}
.pb-entry{border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface)}
.pb-entry-head{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;min-width:0}
.pb-entry-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;padding-top:3px}
.pb-entry-title{font-size:13.5px;line-height:1.35;overflow-wrap:anywhere}
.pb-entry-meta{font-size:12.5px;line-height:1.4;color:var(--text-secondary);overflow-wrap:anywhere}
.pb-entry-actions{display:flex;gap:2px;margin-left:auto;flex-shrink:0}
.pb-entry-body{display:flex;flex-direction:column;gap:14px;padding:4px 12px 14px;border-top:1px solid var(--border);padding-top:14px}
/* Done/Remove repeated at the foot of an open entry. */
.pb-entry-foot{display:flex;justify-content:flex-end;gap:8px;padding-top:12px;border-top:1px solid var(--border)}
.pb-entry-remove{margin-right:auto;color:var(--destructive-text)}
/* Drag to reorder: the handle, and the card while it moves. */
.pb-drag{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;margin:-2px -4px 0 -6px;
  border:0;border-radius:var(--radius-sm);background:transparent;color:var(--text-muted);cursor:grab;touch-action:none}
.pb-drag:hover,.pb-drag:focus-visible{color:var(--text-primary);background:var(--surface-hover)}
.pb-entry.is-dragging{position:relative;z-index:5;box-shadow:var(--shadow-lg);border-color:var(--accent-border)}
.pb-entry.is-dragging .pb-drag{cursor:grabbing}
.pb-list.is-sorting{user-select:none}
/* Copies attached to an entry (certificate, membership card). */
.pb-entry-docs{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.pb-entry-docs-label{font-size:13px;font-weight:600}
.pb-doc-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;width:100%}
.pb-doc{display:flex;align-items:center;gap:8px;padding:6px 8px 6px 10px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-alt)}
.pb-doc-name{flex:1;min-width:0;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pb-doc-status:empty{display:none}
.pb-years{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
.pb-years .field{margin-bottom:0}
.pb-more .field{margin-bottom:0}
.pb-more > .btn{padding-left:0;color:var(--accent)}
/* Typeahead under a field (cities, qualifications, institutions …) */
.pb-ac{position:relative;min-width:0}
.pb-ac-menu{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:35;list-style:none;margin:0;padding:4px;
  max-height:min(280px,50vh);overflow-y:auto;overscroll-behavior:contain;background:var(--surface);
  border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-md)}
.pb-ac-opt{display:flex;flex-direction:column;align-items:flex-start;gap:1px;width:100%;padding:8px 10px;border:0;
  border-radius:var(--radius-sm);background:transparent;color:var(--text-primary);font-size:14px;text-align:left;cursor:pointer}
.pb-ac-opt:hover,.pb-ac-opt.is-active{background:var(--surface-hover)}
.pb-ac-value{overflow-wrap:anywhere}
.pb-ac-meta{font-size:12px;color:var(--text-secondary)}
.pb-skill-add .pb-ac{flex:1}
/* Skills */
.pb-skill-list{display:flex;flex-wrap:wrap;gap:6px}
.pb-skill{display:inline-flex;align-items:center;gap:4px;height:30px;padding:0 4px 0 12px;border-radius:var(--radius-full);
  background:var(--accent-light);border:1px solid var(--accent-border);color:var(--accent);font-size:13px;font-weight:600}
.pb-skill-x{width:22px;height:22px;border:0;border-radius:50%;background:transparent;color:inherit;font-size:16px;line-height:1;cursor:pointer;opacity:.7}
.pb-skill-x:hover{opacity:1;background:var(--surface)}
.pb-suggest{height:30px;padding:0 12px;border-radius:var(--radius-full);border:1px dashed var(--border-strong);background:var(--surface);
  color:var(--text-secondary);font-size:13px;cursor:pointer}
.pb-suggest:hover{border-color:var(--accent);color:var(--accent)}
.pb-suggest.is-ai{border-style:solid;border-color:var(--accent-border);background:var(--accent-light);color:var(--accent)}
.pb-skill-ai-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.pb-skill-ai-head[hidden],.pb-skill-ai-head:has(> .pb-sub[hidden]){display:none}
.pb-skill-add{display:flex;gap:8px;margin-top:12px}
.pb-skill-add input{flex:1;min-width:0}
/* Steps */
.pb-step{overflow:hidden}
.pb-step-top{display:flex;flex-direction:column;gap:8px;padding:16px 18px 0}
.pb-step .card-body{padding-top:14px}
.pb-intro{margin-bottom:14px}
.pb-q{font-size:21px;font-weight:700;letter-spacing:-.01em;line-height:1.3}
.pb-hint{margin:6px 0 18px;font-size:14px}
.pb-step-error{margin-top:12px}
.pb-step-foot{justify-content:flex-start}
.pb-spacer{flex:1}
/* Review */
.pb-review{display:flex;flex-direction:column;margin:0}
.pb-review-row{display:grid;grid-template-columns:120px 1fr auto;gap:12px;align-items:start;padding:10px 0;border-bottom:1px solid var(--border)}
.pb-review-row:last-child{border-bottom:0}
.pb-review-row dt{font-size:12.5px;font-weight:600;color:var(--text-secondary);padding-top:2px}
.pb-review-row dd{margin:0;font-size:13.5px;white-space:pre-line;min-width:0;overflow-wrap:anywhere}
.pb-review-row.is-needed dt{color:var(--warning)}
/* Review: each job, qualification, certification, membership and referee as its own item. */
.pb-review-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;white-space:normal}
.pb-review-item{display:flex;flex-direction:column;gap:2px;padding:8px 11px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface-alt)}
.pb-review-item-head{font-weight:600;color:var(--text-primary);line-height:1.4}
.pb-review-item-meta{font-size:12.5px;color:var(--text-secondary);line-height:1.45}
.pb-review-items.is-plain{gap:4px}
.pb-review-items.is-plain .pb-review-item{flex-direction:row;flex-wrap:wrap;align-items:center;gap:6px;padding:0;border:0;background:none}
.pb-review-chips{display:flex;flex-wrap:wrap;gap:6px;white-space:normal}
.pb-review-chip{display:inline-block;padding:3px 10px;border:1px solid var(--border);border-radius:var(--radius-full);background:var(--surface-alt);font-size:12.5px;line-height:1.5}
/* Dashboard: "Finish your profile" card */
.pb-nudge{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:16px 18px;margin-bottom:20px;border:1px solid var(--accent-border);
  border-radius:var(--radius-lg);background:var(--accent-light)}
.pb-nudge-text{flex:1 1 260px;min-width:0}
.pb-nudge-text strong{display:block;font-size:14.5px}
.pb-nudge-text p{font-size:13px;color:var(--text-secondary);margin-top:2px}
.pb-nudge .progress{width:120px;flex-shrink:0;background:var(--surface)}
.pb-nudge-actions{display:flex;gap:8px;align-items:center}
/* Admin results */
.pb-results{width:100%;border-collapse:collapse;font-size:13px}
.pb-results th,.pb-results td{padding:8px 10px;border-bottom:1px solid var(--border);text-align:right;white-space:nowrap}
.pb-results th:first-child,.pb-results td:first-child{text-align:left}
.pb-results thead th{font-size:12px;color:var(--text-secondary);font-weight:600}
.pb-win{color:var(--success);font-weight:700}
@media (max-width:640px){
  .pb-q{font-size:18px}
  .pb-contact-opts{width:100%;justify-content:flex-start}
  .pb-review-row{grid-template-columns:1fr auto}
  .pb-review-row dd{grid-column:1 / -1;grid-row:2}
  .pb-foot{justify-content:stretch}
  .pb-foot .btn{flex:1}
  .pb-foot .pb-status{flex-basis:100%;margin:0}
  .pb-foot .pb-need{flex-basis:100%;margin:0}
  .pb-foot{flex-wrap:wrap}
}

/* ---------- 31. Apply card (job page) ----------
   Brand palette only: paid options use the accent, the Premium badge the
   same warning tone as the Pro badge elsewhere.
   The selected CV with a thumbnail and preview, the paid "tailor for this
   job" step, and the connect-or-send-it-yourself dialog. */
.pill-premium{background:var(--warning-bg);color:var(--warning);height:18px;padding:0 7px;font-size:10.5px;letter-spacing:.02em}
.btn-premium{background:var(--accent);color:#fff;border:0}
.btn-premium:hover{background:var(--accent-hover);color:#fff}
.btn-premium svg{width:16px;height:16px}
.apply-cv{display:flex;gap:12px;align-items:flex-start}
.apply-cv-thumb{position:relative;flex:0 0 76px;height:104px;padding:0;border:1px solid var(--border);border-radius:var(--radius-sm);background:#fff;overflow:hidden;cursor:zoom-in;transition:box-shadow .15s,border-color .15s}
.apply-cv-thumb:hover{border-color:var(--accent-border);box-shadow:var(--shadow-sm)}
.apply-cv-thumb > svg{display:block;width:100%;height:auto}
.apply-cv-thumb.is-loading{opacity:.5}
.apply-cv-zoom{position:absolute;right:4px;bottom:4px;width:22px;height:22px;border-radius:var(--radius-full);background:rgba(15,23,42,.7);color:#fff;display:flex;align-items:center;justify-content:center}
.apply-cv-zoom svg{width:13px;height:13px}
.apply-cv-info{flex:1;min-width:0}
.apply-cv-info select{width:100%}
.apply-cv-note{margin-top:6px;font-size:12.5px;line-height:1.4;color:var(--text-secondary)}
.apply-cv-note.is-tailored{color:var(--success-text);font-weight:600}
.apply-cv-note.is-tailored::before{content:"\2713  "}
.apply-cv-info .btn svg{width:14px;height:14px}
.apply-upsell{margin-top:14px;padding:14px;border:1px solid var(--accent);border-radius:var(--radius-md);background:linear-gradient(135deg,var(--accent-light),var(--surface));box-shadow:0 1px 0 var(--accent-border) inset}
.apply-upsell-head{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.apply-upsell .text-sm{color:var(--text-secondary);margin-bottom:10px}
.apply-upsell-price{margin-top:8px;font-size:12px;color:var(--text-secondary);text-align:center}
.apply-auto{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.apply-foot{justify-content:flex-start;flex-direction:column;align-items:stretch;gap:6px}
.cv-preview-dialog{max-width:760px}
.cv-preview-frame{background:var(--surface-alt);border-radius:var(--radius-sm);padding:10px;max-height:68vh;overflow:auto}
.cv-preview-frame > svg{display:block;width:100%;height:auto;background:#fff;box-shadow:var(--shadow-sm)}
.apply-benefits{list-style:none;margin:0 0 16px;padding:0;display:grid;gap:12px}
.apply-benefits li{display:flex;gap:10px;align-items:flex-start}
.apply-benefits strong{display:flex;align-items:center;gap:6px;font-size:14px}
.apply-benefits span:not(.pill):not(.apply-benefit-icon){display:block;font-size:12.5px;color:var(--text-secondary)}
.apply-benefit-icon{flex:0 0 24px;height:24px;border-radius:var(--radius-full);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700}
.apply-benefit-icon.is-on{background:var(--success-bg);color:var(--success-text)}
.apply-benefit-icon.is-premium{background:var(--warning-bg);color:var(--warning)}
.apply-connect-box{padding:14px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface-alt)}
.apply-manual strong{font-size:14px}
.manual-send{display:grid;gap:10px}
.manual-send-row{display:flex;align-items:center;gap:8px;justify-content:space-between}
.manual-send-row > div{min-width:0}
.manual-send-row .stat-label{margin:0}
.manual-send-value{font-size:13px;overflow-wrap:anywhere}
.manual-steps{margin:0;padding-left:18px;font-size:13px;color:var(--text-secondary);display:grid;gap:4px}
/* The dialog already says what connecting does. */
.apply-connect-box > .text-sm.muted:first-child{display:none}
.apply-connect-box > .mt-3:nth-child(2){margin-top:0}
.apply-upsell-price a{font-weight:600}
@media (max-width:640px){
  .cv-preview-frame{max-height:52vh}
  .cv-preview-dialog .dialog-foot .btn{flex:1 1 auto}
  .cv-preview-dialog .dialog-foot .btn-premium{flex-basis:100%;order:-1}
}
/* Quick apply: the locked match score as one line on the CV step, and what
   connecting a mailbox gives. */
.qa-match-teaser{margin:0 0 12px;padding:10px 12px;border:1px dashed var(--border-strong);border-radius:var(--radius-md);line-height:1.45}
.qa-connect-perks{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:6px;color:var(--text-secondary)}
.qa-connect-perks li{display:flex;align-items:baseline;gap:8px}
/* The text wraps under itself, never below the tick (phones). */
.qa-connect-perks li::before{flex:none}
.qa-connect-perks li::before{content:"\2713";color:var(--success-text);font-weight:700}
.apply-flow-note{margin-top:6px;text-align:center}
/* Profile builder: the summary and its "Write it for me". */
.pb-summary-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pb-summary-status{margin:0}
/* Profile builder: "Write duties for me" on a job. */
.pb-more-add{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pb-ai-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px}
.pb-more-add .pb-ai-row{margin-top:0}
.pb-ai-btn{display:inline-flex;align-items:center;gap:6px}
.pb-ai-icon{width:14px;height:14px;flex:none;color:var(--accent)}
.pb-ai-btn.is-locked .pb-ai-icon{color:var(--text-muted)}
.pb-ai-btn[aria-busy="true"] .pb-ai-icon{animation:pb-ai-pulse 1s ease-in-out infinite}
@keyframes pb-ai-pulse{50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.pb-ai-btn[aria-busy="true"] .pb-ai-icon{animation:none}}
.pb-ai-status{margin:0;flex:1 1 220px}

/* Apply drawer on the public job page (public/js/apply-drawer.js): the apply
   flow in a frame, sliding in from the right. Full width on a phone. */
/* Width: dragged on the left edge (--apply-drawer-w, kept per browser), or
   the whole window with Expand. */
.apply-drawer{width:min(var(--apply-drawer-w,560px),100vw);max-width:100vw}
.apply-drawer.is-expanded{width:100vw}
.apply-drawer.is-resizing{transition:none;user-select:none}
.apply-drawer.is-resizing .apply-drawer-frame{pointer-events:none}
.apply-drawer .side-drawer-head .close{margin-left:0}
.apply-drawer-tools{margin-left:auto;display:flex;align-items:center;gap:2px;flex-shrink:0}
.apply-drawer-expand svg{width:18px;height:18px}
.apply-drawer-expand .when-expanded,.apply-drawer.is-expanded .apply-drawer-expand .when-collapsed{display:none}
.apply-drawer.is-expanded .apply-drawer-expand .when-expanded{display:block}
.apply-drawer-resize{position:absolute;left:-5px;top:0;bottom:0;width:10px;z-index:3;cursor:ew-resize;touch-action:none;outline:none}
.apply-drawer-resize::after{content:"";position:absolute;left:4px;top:50%;width:3px;height:44px;margin-top:-22px;border-radius:3px;
  background:var(--border-strong,var(--border));opacity:0;transition:opacity .15s ease,background .15s ease}
.apply-drawer:hover .apply-drawer-resize::after,.apply-drawer.is-resizing .apply-drawer-resize::after{opacity:1}
.apply-drawer-resize:hover::after,.apply-drawer-resize:focus-visible::after,.apply-drawer.is-resizing .apply-drawer-resize::after{background:var(--accent);opacity:1}
.apply-drawer.is-expanded .apply-drawer-resize{display:none}
@media (max-width:640px){.apply-drawer{width:100vw}.apply-drawer-resize,.apply-drawer-expand{display:none}}
.apply-drawer-title{display:flex;flex-direction:column;min-width:0;gap:2px}
.apply-drawer-body{flex:1;position:relative;min-height:0;display:flex}
.apply-drawer-frame{flex:1;width:100%;height:100%;border:0;background:var(--bg)}
.apply-drawer-loading{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--bg)}
.apply-drawer-loading[hidden]{display:none}
html.apply-drawer-open{overflow:hidden}
@media (prefers-reduced-motion:reduce){.apply-drawer{transition:none}}
/* The flow inside that frame: no card frame or page padding around it. */
.section.qa-embed{padding:8px 0 24px}
.qa-embed #qa-card{border:0;background:transparent;box-shadow:none}

/* "Finish your application" notice (public/js/resume-apply.js). */
.resume-apply{position:fixed;right:16px;bottom:16px;z-index:55;width:min(380px,calc(100vw - 32px));
  background:var(--float-bg);border:1px solid var(--float-border);border-top:3px solid var(--accent);border-radius:var(--radius-lg);box-shadow:var(--float-shadow);
  padding:14px 16px;display:flex;flex-direction:column;gap:6px;opacity:0;transform:translateY(8px);transition:opacity .2s ease,transform .2s ease}
.resume-apply-icon{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;flex-shrink:0;border-radius:50%;background:var(--accent-light);color:var(--accent)}
.resume-apply-icon svg{width:17px;height:17px}
.resume-apply-head strong{font-size:15px}
/* One bottom notice at a time: the cookie choice first. */
body:has(.jm-consent) .resume-apply{display:none}
.resume-apply.show{opacity:1;transform:none}
.resume-apply-head{display:flex;align-items:center;gap:8px}
.resume-apply-head .close{margin-left:auto;width:28px;height:28px}
.resume-apply-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}
.resume-apply-discard{margin-left:auto;color:var(--destructive-text)}
html.apply-drawer-open .resume-apply{display:none}
@media (prefers-reduced-motion:reduce){.resume-apply{transition:none}}

/* "Still needed: …" beside a Save that waits for required answers. */
.pb-need{margin:0;font-size:13px;color:var(--warning-text)}
.pb-need button{border:0;background:none;padding:0;color:inherit;font:inherit;font-weight:600;text-decoration:underline;cursor:pointer}
.pb-need:empty{display:none}
.pb-need .pb-wait{color:var(--text-secondary);font-weight:500}

/* Phone check under a number (profile builder): full row under the inputs. */
.pb-phone-note{flex-basis:100%;margin:2px 0 0;font-size:12.5px}
.pb-phone-note:empty{display:none}
.pb-phone-warn{color:var(--warning-text)}
.pb-contact-main[aria-invalid="true"]{border-color:var(--destructive)}

/* Admin → SEO → Meta tags (views/admin/seo-meta.ejs). */
.seo-preview{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);max-width:620px}
.seo-preview-url{font-size:12px;color:var(--text-secondary)}
.seo-preview-title{font-size:18px;line-height:1.3;color:var(--accent)}
.seo-preview-desc{font-size:13px;line-height:1.5;color:var(--text-secondary)}
.seo-page{border:1px solid var(--border);border-radius:var(--radius-md);padding:12px 14px;background:var(--surface)}
.seo-page-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.seo-page-head input[data-field="path"]{flex:0 1 260px;min-width:160px}
.seo-page-head [data-remove-page]{margin-left:auto}
.seo-long{color:var(--warning-text)}
.seo-noindex{display:inline-flex;align-items:center;gap:6px;cursor:pointer}

/* Quick apply: the letter's paragraph held back without the AI letter,
   blurred inside the text with the offer over it. */
/* Text and offer share one grid cell, so the box is as tall as the taller. */
.qa-letter-locked{display:grid;margin:2px 0 14px;border-radius:var(--radius-md,8px);user-select:none;-webkit-user-select:none;cursor:default}
.qa-letter-locked>*{grid-area:1/1}
.qa-letter-locked-text{margin:0;align-self:center;filter:blur(4px);opacity:.75;pointer-events:none}
.qa-letter-locked-cta{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:10px 14px;text-align:center;background:color-mix(in srgb,var(--surface) 55%,transparent);border:1px dashed var(--accent-border);border-radius:inherit}
.qa-letter-locked-title{margin:0;font-weight:600;color:var(--text-primary);font-size:14px;line-height:1.3}
.qa-letter-locked-sub{margin:0 0 4px;font-size:12px;line-height:1.4;color:var(--text-secondary);max-width:46ch}

.qa-premium-was{color:var(--text-secondary);font-weight:400;margin-left:2px}
.qa-premium-save{vertical-align:1px}
.qa-letter-locked-pack{font-size:12px;margin-top:2px}
.qa-letter-locked-cta{position:relative}
.qa-letter-locked-close{position:absolute;top:4px;right:6px;width:28px;height:28px;border:0;background:none;color:var(--text-secondary);font-size:20px;line-height:1;border-radius:50%;cursor:pointer}
.qa-letter-locked-close:hover{background:var(--surface-hover,rgba(127,127,127,.12));color:var(--text-primary)}
.qa-letter-locked-title{padding:0 22px}
.qa-letter-locked-self{font-size:12px;margin-top:4px}
.qa-letter-write-here{min-height:1.6em}
.qa-letter-write-here:empty::before{content:attr(data-placeholder);color:var(--text-secondary);opacity:.8;pointer-events:none}

/* Profile builder: a file that failed can be tried again in place. */
.pb-file-retry{align-self:flex-start;margin-top:6px}

/* Bot protection: Turnstile's check, shown only when it needs a click. */
.jm-turnstile{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:3000;padding:8px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-md)}
.jm-turnstile[hidden]{display:none}
/* The visible check in contact / sign-in / sign-up forms (public/js/turnstile.js). */
[data-turnstile-slot]{min-height:65px;margin:4px 0 12px}
[data-turnstile-slot]:not(.is-rendered){display:none}
.jm-consent{position:fixed;left:16px;right:16px;bottom:16px;z-index:2900;max-width:560px;margin:0 auto;display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px;padding:14px 16px 14px 18px;background:var(--float-bg);color:var(--text-primary);border:1px solid var(--float-border);border-left:4px solid var(--accent);border-radius:var(--radius-lg);box-shadow:var(--float-shadow);animation:jm-float-in .25s ease-out}
/* With the apply drawer open, keep the choice off its action buttons. */
html.apply-drawer-open .jm-consent{bottom:auto;top:16px}
@keyframes jm-float-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.jm-consent{animation:none}}
.jm-consent-text{flex:1 1 260px;margin:0;font-size:.875rem;line-height:1.45}
.jm-consent-text a{color:var(--accent);text-decoration:underline}
.jm-consent-actions{display:flex;gap:8px;margin-left:auto}

/* Landing: popular searches. Wrapped and centred on wide screens; one
   compact row that scrolls sideways on phones, so the hero stays short. */
.landing-popular{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px}
@media (max-width:640px){
  .landing-popular{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;gap:6px;margin-right:-16px;padding:2px 16px 6px 0;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 32px),transparent 100%);mask-image:linear-gradient(90deg,#000 calc(100% - 32px),transparent 100%)}
  .landing-popular::-webkit-scrollbar{display:none}
  .landing-stat-sep{display:none}
  .landing-popular>*{flex:0 0 auto;scroll-snap-align:start}
  .landing-popular .chip{padding:5px 11px;font-size:12.5px;line-height:1.3;white-space:nowrap}
}

/* Floating notices (cookie choice, unfinished application): lifted off the
   page with a lighter surface, an accent edge and a ring, so they read as
   separate from the content behind them in light and dark. */
:root{--float-bg:var(--surface);--float-border:var(--border-strong);--float-shadow:0 0 0 1px rgba(15,23,42,.04),0 18px 44px rgba(15,23,42,.22)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--float-bg:#1f2b45;--float-border:#33476e;--float-shadow:0 0 0 1px rgba(148,163,184,.10),0 20px 50px rgba(0,0,0,.75)}}
:root[data-theme="dark"]{--float-bg:#1f2b45;--float-border:#33476e;--float-shadow:0 0 0 1px rgba(148,163,184,.10),0 20px 50px rgba(0,0,0,.75)}

/* Loading in place: a small spinner in a line or beside a price, and buttons
   that wait (greyed, not clickable) until what they act on has loaded. */
.qa-spin{display:inline-block;width:12px;height:12px;border-width:2px;margin-right:6px;vertical-align:-2px}
.qa-loading-line{display:flex;align-items:center;gap:0}
.qa-offer-price-zmw.is-loading,.qa-pay-method-amount.is-loading{display:inline-flex;align-items:center;color:var(--text-muted);font-weight:400}
.qa-pay-method-amount.is-loading .qa-spin{margin-right:0}
.btn[aria-busy="true"],.qa-pay-method[aria-busy="true"]{opacity:.55;cursor:progress}
.qa-pay-method[disabled]{pointer-events:none}
.mm-field-value .qa-spin{width:14px;height:14px;margin-right:8px;vertical-align:-1px}
.mm-field-value.is-loading{display:inline-flex;align-items:center;font-size:14px;color:var(--text-muted)}
/* The CV written for this job: its new ATS score over the CV, with how far it moved. */
.qa-cv-score-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
.qa-cv-score-delta{display:inline-flex;align-items:center;padding:1px 8px;border-radius:999px;font-size:.72rem;font-weight:700;color:var(--success);background:color-mix(in srgb,var(--success) 14%,transparent);white-space:nowrap}
.qa-cv-score.is-tailored{background:linear-gradient(135deg,color-mix(in srgb,var(--success) 9%,var(--surface)),var(--surface))}
.qa-cv-score.is-tailored .qa-cv-score-text s{color:var(--text-muted)}

/* ── Admin → Logs (views/admin/logs.ejs) ───────────────────────────────── */
.logs-live{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--text-secondary);cursor:pointer;user-select:none}
.logs-scope{margin:-4px 0 12px;font-size:13px;color:var(--text-secondary)}
.logs-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 12px}
.logs-stat{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);color:inherit;text-decoration:none;min-width:0}
a.logs-stat:hover{border-color:var(--border-strong);background:var(--surface-hover)}
.logs-stat .label{font-size:12px;color:var(--text-muted)}
.logs-stat strong{font-size:20px;font-weight:650;color:var(--text-primary);font-variant-numeric:tabular-nums}
.logs-stat .hint{font-size:12px;color:var(--text-secondary)}
.logs-stat.has-errors strong{color:var(--destructive)}
.logs-services{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px}
.logs-service-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 8px 3px 4px;border:1px solid var(--border);border-radius:var(--radius-full);background:var(--surface);text-decoration:none;color:var(--text-secondary);font-size:12px}
.logs-service-chip:hover{border-color:var(--border-strong)}
.logs-service-chip.is-selected{border-color:var(--accent);background:var(--accent-light)}
.logs-service-chip .n{font-variant-numeric:tabular-nums;color:var(--text-primary);font-weight:600}
.logs-service-chip .err{color:var(--destructive)}

.logs-table td{vertical-align:top}
.logs-table .num{text-align:right;font-variant-numeric:tabular-nums}
.logs-table .nowrap{white-space:nowrap}
.logs-row{cursor:pointer}
.logs-row:hover td{background:var(--surface-hover)}
.logs-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.logs-row.is-active td{background:var(--accent-light)}
.logs-name{min-width:0;max-width:520px}
.logs-method{font-size:11px;font-weight:600;color:var(--text-secondary);margin-right:6px}
.logs-target{font-size:13px;color:var(--text-primary);word-break:break-all}
.logs-model{display:block;font-size:11.5px;color:var(--text-secondary);margin-top:2px}
.logs-error-line{display:block;font-size:12px;color:var(--destructive);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:520px}
.logs-slow{color:var(--warning)}

.logs-svc{display:inline-flex;align-items:center;font-size:11.5px;font-weight:600;padding:2px 8px;border-radius:var(--radius-full);background:var(--surface-hover);color:var(--text-secondary);border:1px solid var(--border);white-space:nowrap}
.logs-svc-ai,.logs-svc-workers-ai,.logs-svc-arc,.logs-svc-ollama,.logs-svc-openai,.logs-svc-anthropic{background:var(--info-bg);color:var(--info-text);border-color:var(--info-border)}
.logs-svc-mobpay,.logs-svc-cgrate,.logs-svc-stripe,.logs-svc-fx{background:var(--success-bg);color:var(--success-text);border-color:var(--success-border)}
.logs-svc-email,.logs-svc-telegram,.logs-svc-whatsapp,.logs-svc-facebook,.logs-svc-instagram{background:var(--warning-bg);color:var(--warning-text);border-color:var(--warning-border)}
.logs-svc-api,.logs-svc-admin,.logs-svc-web{background:var(--accent-light);color:var(--accent);border-color:var(--accent-border)}

.logs-status{display:inline-flex;align-items:center;justify-content:center;min-width:38px;font-size:11.5px;font-weight:650;padding:2px 7px;border-radius:var(--radius-sm);font-variant-numeric:tabular-nums}
.logs-status.is-ok{background:var(--success-bg);color:var(--success-text);border:1px solid var(--success-border)}
.logs-status.is-warn{background:var(--warning-bg);color:var(--warning-text);border:1px solid var(--warning-border)}
.logs-status.is-error{background:var(--destructive-bg);color:var(--destructive-text);border:1px solid var(--destructive-border)}
.logs-status.is-pending{background:var(--surface-hover);color:var(--text-secondary);border:1px solid var(--border)}

/* The drawer */
.logs-drawer-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.38);opacity:0;transition:opacity .2s ease;z-index:2840}
.logs-drawer-backdrop.is-open{opacity:1}
.logs-drawer{position:fixed;top:0;right:0;bottom:0;width:min(760px,100vw);display:flex;flex-direction:column;background:var(--surface);border-left:1px solid var(--border);box-shadow:var(--shadow-lg);transform:translateX(102%);transition:transform .22s cubic-bezier(.2,.8,.2,1);z-index:2850;outline:none}
.logs-drawer.is-open{transform:none}
html.logs-drawer-open{overflow:hidden}
/* The admin "view as" bar floats over everything; it steps aside while a log is open. */
html.logs-drawer-open .admin-bar{display:none}
.logs-drawer-head{display:flex;align-items:flex-start;gap:12px;padding:16px 18px 12px;border-bottom:1px solid var(--border)}
.logs-drawer-titles{flex:1;min-width:0}
.logs-drawer-kicker{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:6px;min-height:22px}
.logs-kicker-ms{font-size:12px;color:var(--text-secondary);font-variant-numeric:tabular-nums}
.logs-drawer-head h2{margin:0;font-size:15px;font-weight:650;line-height:1.35;word-break:break-all;color:var(--text-primary)}
.logs-drawer-nav{display:flex;gap:2px;flex-shrink:0}
.logs-drawer-nav .btn{min-width:30px;font-size:15px}
.logs-drawer-nav .btn:disabled{opacity:.35;cursor:not-allowed}
.logs-drawer-body{flex:1;overflow:auto;padding:14px 18px 28px;overscroll-behavior:contain}
.logs-loading{display:flex;align-items:center;gap:10px;color:var(--text-secondary);font-size:13px;padding:24px 0}
.logs-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 18px;margin-bottom:16px}
.logs-field{display:flex;flex-direction:column;gap:2px;min-width:0}
.logs-field .label{font-size:11.5px;color:var(--text-muted)}
.logs-field .value{font-size:13px;color:var(--text-primary);word-break:break-all}
.logs-field a.value{color:var(--accent)}
.logs-error-box{border:1px solid var(--destructive-border);background:var(--destructive-bg);color:var(--destructive-text);border-radius:var(--radius-md);padding:10px 12px;margin:0 0 14px;font-size:13px}
.logs-error-box p{margin:4px 0 0;white-space:pre-wrap;word-break:break-word}
.logs-section{margin:0 0 16px}
.logs-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.logs-section-head h3{margin:0;font-size:13px;font-weight:650;color:var(--text-primary)}
.logs-tabs{display:inline-flex;gap:2px;padding:2px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface-alt)}
.logs-tab{border:0;background:transparent;font-size:12px;padding:4px 10px;border-radius:var(--radius-sm);color:var(--text-secondary);cursor:pointer}
.logs-tab.is-active{background:var(--surface);color:var(--text-primary);box-shadow:var(--shadow-xs)}
.logs-code-wrap{border:1px solid var(--border);border-radius:var(--radius-md);overflow:hidden}
.logs-code-bar{display:flex;align-items:center;gap:8px;padding:4px 6px 4px 10px;background:var(--surface-alt);border-bottom:1px solid var(--border);font-size:11.5px;color:var(--text-secondary)}
.logs-code-kind{font-weight:650}
.logs-code-size{flex:1;font-variant-numeric:tabular-nums}
.logs-code{margin:0;padding:10px 12px;max-height:46vh;overflow:auto;font-family:var(--mono);font-size:12px;line-height:1.5;background:var(--surface);color:var(--text-primary);white-space:pre;tab-size:2}
.logs-code.is-wrapped{white-space:pre-wrap;word-break:break-word}
.logs-empty{font-size:13px;color:var(--text-muted);margin:4px 0}
.logs-headers{display:grid;grid-template-columns:minmax(120px,max-content) 1fr;gap:4px 14px;margin:0;font-size:12px;border:1px solid var(--border);border-radius:var(--radius-md);padding:10px 12px}
.logs-headers dt{color:var(--text-secondary)}
.logs-headers dd{margin:0;word-break:break-all;color:var(--text-primary)}
.logs-related{list-style:none;margin:0;padding:0;border:1px solid var(--border);border-radius:var(--radius-md)}
.logs-related li+li{border-top:1px solid var(--border)}
.logs-related-item{display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;border:0;background:transparent;text-align:left;cursor:pointer;color:inherit}
.logs-related-item:hover{background:var(--surface-hover)}
.logs-related-name{flex:1;min-width:0;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.logs-related-ms{font-size:12px;color:var(--text-secondary);font-variant-numeric:tabular-nums;min-width:52px;text-align:right}

@media (max-width:760px){
  .logs-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .logs-grid{grid-template-columns:1fr}
  .logs-drawer{width:100vw;border-left:0}
  .logs-name{max-width:260px}
}
@media (prefers-reduced-motion:reduce){
  .logs-drawer,.logs-drawer-backdrop{transition:none}
}

/* ── Admin → Activity (views/admin/activity.ejs) ───────────────────────── */
.act-stats{grid-template-columns:repeat(6,minmax(0,1fr))}
.act-daily{margin:0 0 14px}
.act-bars{display:flex;align-items:flex-end;gap:2px;height:120px}
.act-bar{flex:1;min-width:2px;height:var(--h);background:var(--accent);opacity:.75;border-radius:3px 3px 0 0;transition:opacity .12s}
.act-bar:hover{opacity:1}
.act-bars-axis{display:flex;justify-content:space-between;margin-top:6px;font-size:11.5px;color:var(--text-muted);font-variant-numeric:tabular-nums}
.act-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.act-breakdown{min-width:0}
.act-breakdown .card-head{padding:12px 14px}
.act-cols{display:flex;gap:0;font-size:11.5px;color:var(--text-muted)}
.act-cols span{width:64px;text-align:right}
.act-list{list-style:none;margin:0;padding:6px 6px 8px}
.act-list li{position:relative;display:flex;align-items:center;gap:0;padding:6px 8px;border-radius:var(--radius-sm);font-size:13px;min-width:0}
.act-list li:hover{background:var(--surface-hover)}
.act-meter{position:absolute;left:0;top:3px;bottom:3px;width:var(--w);background:var(--accent-light);border-radius:var(--radius-sm);pointer-events:none}
.act-label{position:relative;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text-primary)}
a.act-label:hover{color:var(--accent)}
.act-num{position:relative;width:64px;text-align:right;font-variant-numeric:tabular-nums;flex-shrink:0}
.act-funnel .num,.act-table .num{text-align:right;font-variant-numeric:tabular-nums}
.act-share-cell{min-width:180px}
.act-share-cell .act-num{width:52px;display:inline-block}
.act-share{display:inline-block;vertical-align:middle;width:120px;height:8px;border-radius:var(--radius-full);background:var(--surface-hover);overflow:hidden}
.act-share span{display:block;height:100%;background:var(--accent);border-radius:inherit}
.act-exits{color:var(--warning)}
.act-note{font-size:12.5px;color:var(--text-secondary);margin:10px 0 14px}
.act-table td{vertical-align:top}
.act-event{font-weight:600;color:var(--text-primary)}
.act-event:hover{color:var(--accent)}
.act-sub{display:block;font-size:11.5px;color:var(--text-secondary);margin-top:2px}
.act-detail td{background:var(--surface-alt)}
tbody tr.act-detail:hover{background:transparent}
.act-dl{display:grid;grid-template-columns:minmax(90px,max-content) 1fr;gap:4px 14px;margin:2px 0;font-size:12.5px}
.act-dl dt{color:var(--text-secondary)}
.act-dl dd{margin:0;word-break:break-word;color:var(--text-primary)}
.act-ua{font-size:11.5px}
/* An event's details: a drawer from the right, one row at a time */
.act-drawer{width:min(480px,94vw)}
.act-drawer-heading{display:flex;flex-direction:column;min-width:0}
.act-drawer .act-dl{grid-template-columns:1fr;gap:2px 0;font-size:13px}
.act-drawer .act-dl dt{margin-top:12px;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}
.act-drawer .act-dl dt:first-child{margin-top:0}
.act-drawer .act-ua{font-size:12px}
.act-drawer-foot{display:flex;justify-content:space-between;gap:8px;padding:10px 16px;border-top:1px solid var(--border);flex-shrink:0}
.act-table tbody tr.is-open{background:var(--accent-light)}
.act-spin{width:12px;height:12px;border-width:2px;display:inline-block;vertical-align:-2px}
@media (max-width:1100px){.act-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.act-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.act-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.act-grid{grid-template-columns:1fr}}
.act-grid > .card{margin-top:0}
.filter-bar .act-filter-actions{grid-column:-2/-1;display:flex;gap:8px}
.filter-bar .act-filter-actions .btn{grid-column:auto;flex:1}

/* ---------- Admin: edit job (views/admin/job-edit.ejs) ----------
   A sticky action bar (status, Publish/Unpublish, one Save) and collapsible
   <details> sections whose headers carry a one-line summary. */
.je-head-stats{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:6px;font-size:12.5px;color:var(--text-secondary)}
.je-head-stats strong{color:var(--text-primary);font-weight:600}
.je-bar{position:sticky;top:var(--topbar-h);z-index:20;display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:10px 14px;margin:0 0 16px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm)}
.je-bar-info{display:flex;align-items:center;gap:10px;min-width:0}
.je-bar-title{font-size:13.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.je-dirty{font-size:12px;font-weight:600;color:var(--warning);white-space:nowrap}
.je-bar-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}
.je-save{position:relative}
.je-save.is-dirty::after{content:"";position:absolute;top:-4px;right:-4px;width:10px;height:10px;border-radius:50%;background:var(--warning);border:2px solid var(--surface)}
.je-save-short{display:none}
.je-spin{display:inline-block;width:13px;height:13px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;
  animation:spin .7s linear infinite;vertical-align:-2px;margin-right:6px}
@media (prefers-reduced-motion:reduce){.je-spin{animation-duration:1.6s}}
.job-edit details.card > summary.card-head{flex-wrap:nowrap}
.job-edit details.card:not([open]) > summary.card-head{border-bottom:0}
.job-edit summary.card-head > div{min-width:0}
.je-meta{margin-left:auto;font-size:12px;font-weight:500;color:var(--text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:48%;flex-shrink:0}
.job-edit summary.card-head p{font-weight:400}
/* The sidebar is narrow: drop the subtitle so the summary has room. */
.je-side summary.card-head p{display:none}
.je-side .je-meta{max-width:62%}
.job-edit summary.card-head:has(.je-meta)::after{margin-left:10px}
.je-more{margin-top:4px;padding-top:12px;border-top:1px solid var(--border)}
.je-tabs-head{padding:6px 18px 0;border-bottom:1px solid var(--border)}
.je-more > summary{font-weight:600}
.je-more[open] > summary{margin-bottom:12px}
.je-foot{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:20px}
.je-danger{margin-top:28px}
@media (max-width:640px){
  .je-bar{margin:0 -16px 14px;padding:8px 16px;border-radius:0;border-left:0;border-right:0}
  .je-bar-title,.je-dirty{display:none}
  .je-bar .je-save-long{display:none}
  .je-bar .je-save-short{display:inline}
  .je-foot .je-save-short{display:none}
  .job-edit summary.card-head p{display:none}
  .je-meta{max-width:55%}
  .je-foot > .btn{flex:1 1 auto}
}

/* ---------- Admin: jobs list (views/admin/jobs.ejs) ----------
   Desktop: a slimmer table (company, location and type folded under the
   title) with the Actions column pinned to the right edge. Phones: one card
   per job with labelled action buttons, and compact stat tiles. */
.jl-title{display:inline-block}
.jl-meta{font-size:12.5px;color:var(--text-secondary);margin-top:2px}
.jl-table td.jl-job{min-width:240px}
.jl-trunc{display:inline-block;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
.jl-promo .chip{height:26px;padding:0 10px;font-size:12px}
.jl-promo .chip[aria-busy="true"]{opacity:.6}
.jl-label{display:none}
.jl-selectall{display:none}
.jl-table th.jl-actions{text-align:right}
.jl-table th.jl-actions,.jl-table td.jl-actions{position:sticky;right:0;background:var(--surface);box-shadow:-10px 0 10px -10px rgba(15,23,42,.18)}
#bulk-bar.jl-bulk{top:var(--topbar-h)}
@media (max-width:760px){
  .jl-selectall{display:flex;align-items:center;gap:8px;margin-top:12px}
  .jl-card .table-wrap{overflow:visible}
  .jl-table thead{display:none}
  .jl-table,.jl-table tbody{display:block}
  .jl-table tr{display:grid;grid-template-columns:22px minmax(0,1fr) auto;
    grid-template-areas:"cb job job" ". status posted" ". promo promo" "actions actions actions";
    column-gap:10px;row-gap:10px;padding:14px;border-top:1px solid var(--border)}
  .jl-table tbody tr:first-child{border-top:0}
  .jl-table td{display:block;padding:0;border:0;min-width:0}
  .jl-table td.jl-job{grid-area:job;min-width:0}
  .jl-table td.jl-cb{grid-area:cb;padding-top:2px}
  .jl-table td.jl-status{grid-area:status}
  .jl-table td.jl-posted{grid-area:posted;text-align:right;font-size:12.5px;align-self:center}
  .jl-table td.jl-source{display:none}
  .jl-table td.jl-promo{grid-area:promo}
  .jl-table td.jl-actions{grid-area:actions;position:static;box-shadow:none;background:transparent}
  .jl-actions .row-actions{justify-content:flex-start;flex-wrap:wrap;gap:6px}
  .jl-actions .row-actions form{display:contents}
  .jl-actions .btn{height:34px;padding:0 9px;font-size:12.5px;border:1px solid var(--border);gap:5px}
  .jl-label{display:inline}
  /* Delete: icon only, at the far end of the row. */
  .jl-actions .btn[aria-label="Delete"]{margin-left:auto;width:34px;padding:0;justify-content:center}
  .jl-actions .btn[aria-label="Delete"] .jl-label{display:none}
  .jl-toolbar .input-icon{flex:1 1 100%!important;max-width:none!important;min-width:0!important}
  .jl-toolbar select{flex:1 1 auto}
}
@media (max-width:640px){
  .stats:is(.jl-stats,.stats-compact){grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  :is(.jl-stats,.stats-compact) .stat-card{padding:10px 12px}
  :is(.jl-stats,.stats-compact) .stat-top svg{display:none}
  :is(.jl-stats,.stats-compact) .stat-label{font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  :is(.jl-stats,.stats-compact) .stat-value{font-size:20px;margin-top:4px}
}

/* Admin bar tucked into the side (like iOS picture-in-picture): fling or drag
   it off the left or right edge and it becomes a small tab there. Tap the tab
   to bring it back; drag the tab up or down. State and height per layout in
   localStorage (app.js). */
.admin-bar .ab-stash{display:none}
.admin-bar[data-stashed]{left:auto;right:auto;bottom:auto;transform:none;width:28px;height:68px;max-width:none;max-height:none;
  padding:0;gap:0;flex-direction:row;overflow:visible;opacity:.9;animation:ab-stash-in .2s ease-out}
.admin-bar[data-stashed="left"]{left:0;border-left:0;border-radius:0 14px 14px 0}
.admin-bar[data-stashed="right"]{right:0;border-right:0;border-radius:14px 0 0 14px}
.admin-bar[data-stashed] > :not(.ab-stash){display:none!important}
.admin-bar[data-stashed] .ab-stash{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:0;
  border-radius:inherit;color:var(--text-on-dark);touch-action:none;cursor:pointer;user-select:none;-webkit-user-select:none}
.admin-bar[data-stashed] .ab-stash svg{width:18px;height:18px}
.admin-bar[data-stashed="right"] .ab-stash svg{transform:rotate(180deg)}
.admin-bar[data-stashed]:hover,.admin-bar[data-stashed]:focus-within{opacity:1}
.admin-bar[data-stashed][data-dragging="1"] .ab-stash{cursor:grabbing}
body:has(.admin-bar[data-stashed]){padding-bottom:0}
.admin-bar[data-unstashing="1"]{animation:ab-unstash .22s ease-out}
@keyframes ab-stash-in{from{opacity:0}to{opacity:.9}}
@keyframes ab-unstash{from{opacity:0;scale:.92}to{opacity:1;scale:1}}
@media (prefers-reduced-motion:reduce){.admin-bar[data-stashed],.admin-bar[data-unstashing="1"]{animation:none}}

/* ---------- Admin: dashboard (views/admin/dashboard.ejs) ----------
   Compact stat tiles (shared with the Jobs page: .stats-compact), short
   one-line lists for what needs attention and service health, and charts /
   recent activity as sections that start closed on phones. */
details.card:not([open]) > summary.card-head{border-bottom:0}
.stats-compact a.stat-card:hover{border-color:var(--border-strong)}
.stats-compact .stat-value{margin-top:6px}
.dash-warn{color:var(--warning)}
.dash-trend{font-size:12px;color:var(--text-muted);margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-trend.is-up{color:var(--success)}
.dash-trend.is-down{color:var(--destructive)}
.dash-list{padding:4px 8px 6px}
.dash-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;min-height:42px;font-size:13.5px;color:var(--text-primary)}
.dash-row + .dash-row{border-top:1px solid var(--border)}
a.dash-row{border-radius:var(--radius-md)}
a.dash-row:hover{background:var(--surface-hover)}
a.dash-row:hover + .dash-row{border-top-color:transparent}
.dash-row.is-zero .dash-row-label{color:var(--text-secondary)}
.dash-row-label{display:flex;align-items:center;gap:10px;min-width:0}
.dash-two{display:flex;flex-direction:column;min-width:0}
.dash-two > *{display:block;max-width:100%}
.dash-amount{display:flex;flex-direction:column;align-items:flex-end;gap:3px;flex-shrink:0}
.dash-more{display:block;padding:10px;border-top:1px solid var(--border);font-size:12.5px;font-weight:600;color:var(--accent);text-align:center}
.dash-empty{padding:12px 10px}
.dash-meta{margin-left:auto;font-size:12px;font-weight:500;color:var(--text-secondary);white-space:nowrap}
.dash summary.card-head{flex-wrap:nowrap}
.dash summary.card-head > div{min-width:0}
.dash summary.card-head:has(.dash-meta)::after{margin-left:10px}
.dash .grid-2 > details.card{align-self:start}
@media (max-width:640px){
  .dash summary.card-head p{display:none}
  .dash-trend{font-size:11px}
}

/* User dashboard (views/dashboard/overview.ejs): reuses the admin dashboard's
   compact tiles and lists; four tiles go 2 × 2 on a phone. */
.dash-head{flex-wrap:nowrap;align-items:flex-start}
.dash-head > .btn{flex-shrink:0}
.dash-bar{display:block;height:4px;margin-top:8px}
.dash-bar .progress-bar{display:block;height:100%}
.dash-actions{display:flex;flex-wrap:wrap;gap:8px}
.dash-dot{width:9px;height:9px;border-radius:50%;border:2px solid var(--accent);flex-shrink:0}
.dash-activity{min-width:0;overflow-wrap:anywhere}
.dash-when{flex-shrink:0;white-space:nowrap}
@media (max-width:640px){
  .stats.stats-compact.stats-compact-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dash-actions{flex-wrap:nowrap;overflow-x:auto;margin:0 -16px;padding:0 16px 2px;scrollbar-width:none}
  .dash-actions::-webkit-scrollbar{display:none}
  .dash-actions > .btn{flex-shrink:0}
  .dash-plan{padding:10px 12px;font-size:13px}
  .dash-when{font-size:11px}
}

/* User dashboard, FNB-style: the stat tiles are soft-tinted feature cards with
   an arrow, and quick actions are a grid of icon tiles with the label below. */
.dash-feature .stat-card{position:relative;border:0;padding-right:48px;
  background:linear-gradient(135deg,color-mix(in srgb,var(--tile) 22%,var(--surface)),color-mix(in srgb,var(--tile) 8%,var(--surface)))}
.dash-feature .stat-card:nth-child(1){--tile:#0d9488}
.dash-feature .stat-card:nth-child(2){--tile:#7c3aed}
.dash-feature .stat-card:nth-child(3){--tile:#2563eb}
.dash-feature .stat-card:nth-child(4){--tile:#d97706}
.dash-feature .stat-card::after{content:"";position:absolute;right:12px;bottom:12px;width:26px;height:26px;border-radius:50%;
  background:var(--text-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center/14px no-repeat;
  transition:transform .15s ease}
.dash-feature .stat-card:hover::after{transform:translateX(2px)}
.dash-feature .stat-label{color:var(--text-primary);font-weight:600}
.dash-feature .dash-bar{background:color-mix(in srgb,var(--tile) 18%,transparent)}
.dash-feature .dash-bar .progress-bar{background:var(--tile)}
.dash-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:18px 8px;margin:22px 0 4px}
.dash-tile{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;font-size:13px;font-weight:500;line-height:1.25;color:var(--text-primary)}
.dash-tile-icon{width:58px;height:58px;display:flex;align-items:center;justify-content:center;border:1.5px solid var(--border-strong);
  border-radius:16px;background:var(--surface);color:var(--accent);transition:border-color .15s ease,background .15s ease}
.dash-tile-icon svg{width:26px;height:26px}
.dash-tile:hover .dash-tile-icon,.dash-tile:focus-visible .dash-tile-icon{border-color:var(--accent);background:var(--accent-light)}
.dash-tile:focus-visible{outline:0}
@media (prefers-reduced-motion:reduce){.dash-feature .stat-card::after,.dash-tile-icon{transition:none}}
@media (max-width:640px){
  .page-head.dash-head{flex-direction:row;align-items:flex-start}
  .dash-tiles{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px 6px}
  .dash-tile{font-size:12.5px}
  .dash-tile-icon{width:54px;height:54px;border-radius:15px}
  .dash-feature .stat-card{padding:12px 44px 12px 12px;min-height:92px}
  .dash-feature .stat-card::after{right:10px;bottom:10px;width:24px;height:24px}
}

/* My profile (views/dashboard/my-profile.ejs) */
.mp .mp-lang{display:grid;grid-template-columns:minmax(0,1fr) 150px auto;gap:8px;align-items:center}
@media (max-width:640px){.mp .mp-lang{grid-template-columns:minmax(0,1fr) 120px auto}.mp .mp-lang .btn{padding:0 8px}}

/* Quick actions on wider screens: a full-width row of action cards (icon,
   label, one-line hint) instead of small tiles bunched on the left. Phones
   keep the icon grid. */
.dash-tile-text{display:flex;flex-direction:column;min-width:0}
.dash-tile-hint{display:none}
@media (min-width:761px){
  .dash-tiles{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:18px 0 4px}
  .dash-tile{flex-direction:row;align-items:center;gap:12px;text-align:left;padding:12px 14px;
    border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);transition:border-color .15s ease,box-shadow .15s ease}
  .dash-tile:hover,.dash-tile:focus-visible{border-color:var(--accent-border,var(--accent));box-shadow:var(--shadow-sm)}
  .dash-tile-icon{width:44px;height:44px;border-radius:12px;flex-shrink:0;border:0;background:var(--accent-light)}
  .dash-tile-icon svg{width:22px;height:22px}
  .dash-tile:hover .dash-tile-icon{background:var(--accent-light)}
  .dash-tile-label{font-size:13.5px;font-weight:600}
  .dash-tile-hint{display:block;margin-top:2px;font-size:12px;font-weight:400;color:var(--text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
@media (prefers-reduced-motion:reduce){.dash-tile{transition:none}}

/* ---------- Admin lists (users, applications, transactions, purchases…) ----------
   .adm-stats compact tiles that filter, .adm-toolbar filters that apply as you
   pick them (form[data-live-filters], app.js), .adm-summary, person cells
   (.adm-who), row menus (details[data-row-menu] .adm-menu-list), and the
   Users table (.ul-*) with its own phone cards. */
.adm-stats .stat-card.is-on{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.adm-stats{gap:10px;margin-bottom:16px}
.adm-stats .stat-card{padding:12px 14px;text-decoration:none}
.adm-stats .stat-label{font-size:12.5px}
.adm-stats .stat-value{font-size:22px;margin-top:4px;line-height:1.2}
.adm-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:2px 0 10px}
.adm-toolbar .adm-search{flex:1 1 240px;min-width:200px;max-width:420px}
.adm-toolbar select{flex:0 1 auto;width:auto;min-width:0}
.adm-toolbar.is-live .adm-apply{display:none}
.adm-summary{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:20px;margin:0 2px 8px;font-size:13px;color:var(--text-secondary)}
.adm-summary strong{color:var(--text-primary)}
.adm-clear{font-weight:600;color:var(--accent);text-decoration:none}
.adm-clear:hover{text-decoration:underline}
.ul-card{padding:0}
.ul-table th.num,.ul-table td.num{text-align:right}
.ul-table td{padding-top:10px;padding-bottom:10px}
.ul-table td.ul-user{min-width:240px;max-width:380px}
.ul-table tr.is-suspended .adm-who{opacity:.7}
.ul-table td.ul-joined,.ul-table td.ul-active{white-space:nowrap;color:var(--text-secondary);font-size:13px}
.adm-who{display:flex;align-items:center;gap:10px;min-width:0;max-width:340px;color:inherit;text-decoration:none}
.adm-who:hover .adm-name .truncate{text-decoration:underline;text-underline-offset:2px}
.adm-names{display:flex;flex-direction:column;min-width:0;gap:1px}
.adm-name{display:flex;align-items:center;gap:6px;min-width:0;font-weight:600;color:var(--text-primary)}
.adm-email{font-size:12.5px;color:var(--text-secondary)}
.adm-badge{flex-shrink:0;font-size:10.5px;font-weight:600;line-height:1.5;padding:0 7px;border-radius:999px;background:var(--accent-light);color:var(--accent)}
.adm-2fa{flex-shrink:0;width:14px;height:14px;color:var(--success)}
.adm-av{flex-shrink:0;overflow:hidden;font-size:12px;font-weight:700;letter-spacing:.02em;
  background:hsl(var(--ul-h) 75% 50% / .16);color:hsl(var(--ul-h) 70% 48%)}
.adm-av img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}
.adm-av-0{--ul-h:217}.adm-av-1{--ul-h:160}.adm-av-2{--ul-h:265}.adm-av-3{--ul-h:25}.adm-av-4{--ul-h:330}.adm-av-5{--ul-h:190}
.tag.tag-staff{background:var(--accent-light);color:var(--accent);border-color:transparent;font-weight:600}
.ul-mobile{display:none}
.ul-table th.ul-actions,.ul-table td.ul-actions{width:1%;white-space:nowrap;text-align:right;
  position:sticky;right:0;background:var(--surface);box-shadow:-10px 0 10px -10px rgba(15,23,42,.18)}
.ul-table tbody tr:hover td.ul-actions{background:var(--surface-hover)}
.ul-actions .row-actions{justify-content:flex-end;align-items:center;gap:4px}
.adm-menu{position:relative;display:inline-block}
.adm-menu>summary{list-style:none;width:30px;padding:0;justify-content:center;cursor:pointer}
.adm-menu>summary::-webkit-details-marker{display:none}
.adm-menu>summary svg{width:16px;height:16px}
.adm-menu[open]>summary{background:var(--surface-hover)}
.adm-menu-list{position:fixed;z-index:60;min-width:184px;display:flex;flex-direction:column;padding:4px;text-align:left;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg)}
.adm-menu-list form{display:contents;margin:0}
.adm-menu-list a,.adm-menu-list button{display:block;width:100%;padding:9px 10px;border:0;border-radius:var(--radius-sm);background:none;
  font:inherit;font-size:13.5px;text-align:left;color:var(--text-primary);text-decoration:none;cursor:pointer}
.adm-menu-list a:hover,.adm-menu-list button:hover,.adm-menu-list a:focus-visible,.adm-menu-list button:focus-visible{background:var(--surface-hover);outline:none}
.adm-menu-list .is-danger{color:var(--destructive)}
.adm-pager{padding:0 14px}
@media (max-width:1360px){
  .ul-table td.ul-active,.ul-table th:nth-child(8){display:none}
  .adm-who{max-width:250px}
}
@media (max-width:760px){
  .adm-toolbar .adm-search{flex:1 1 100%;max-width:none}
  .adm-toolbar select{flex:1 1 calc(50% - 4px)}
  .ul-card .table-wrap{overflow:visible;padding:0}
  .ul-table thead{display:none}
  .ul-table,.ul-table tbody{display:block}
  .ul-table tr{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-top:1px solid var(--border)}
  .ul-table tbody tr:first-child{border-top:0}
  .ul-table td{display:none;padding:0;border:0}
  .ul-table td.ul-user{display:block;flex:1 1 auto;min-width:0;max-width:none}
  .ul-table td.ul-actions{display:block;flex:0 0 auto;width:auto;position:static;box-shadow:none;background:transparent}
  .adm-who{max-width:none}
  .adm-who{align-items:flex-start}
  .adm-av{width:38px;height:38px;font-size:13px}
  .ul-mobile{display:flex;flex-direction:column;gap:6px;margin-top:7px}
  .ul-chips{display:flex;flex-wrap:wrap;gap:5px}
  .ul-chips:empty{display:none}
  .ul-metaline{font-size:12px;color:var(--text-muted);line-height:1.4}
  .ul-actions .btn-xs{height:32px}
  .adm-menu>summary{width:32px}
  .adm-pager{padding:0 10px}
}
.adm-toolbar input[type="date"]{width:auto;min-width:0}
.adm-toolbar .adm-field{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--text-secondary)}

/* Generic list table: a sticky actions column on wide screens, and on phones
   each row becomes a card whose cells show their data-label. */
.adm-card{padding:0}
.adm-table td{padding-top:10px;padding-bottom:10px}
.adm-table th.num,.adm-table td.num{text-align:right}
.adm-sub{display:block;font-size:12.5px;color:var(--text-secondary);margin-top:1px}
.adm-strong{font-weight:600;color:var(--text-primary)}
.adm-table td.adm-when{white-space:nowrap;color:var(--text-secondary);font-size:13px}
.adm-table th.adm-actions,.adm-table td.adm-actions{width:1%;white-space:nowrap;text-align:right;
  position:sticky;right:0;background:var(--surface);box-shadow:-10px 0 10px -10px rgba(15,23,42,.18)}
.adm-table tbody tr:hover td.adm-actions{background:var(--surface-hover)}
.adm-actions .row-actions{justify-content:flex-end;align-items:center;gap:4px}
.adm-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px}
.adm-trunc{display:inline-block;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
.adm-bar{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.adm-bar i{display:block;width:44px;height:6px;border-radius:999px;background:var(--surface-hover);overflow:hidden}
.adm-bar i b{display:block;height:100%;border-radius:inherit;background:var(--accent)}
.adm-bar.is-good i b{background:var(--success)}
.adm-bar.is-low i b{background:var(--warning)}
.adm-flag{display:inline-flex;align-items:center;font-size:11px;font-weight:600;line-height:1.6;padding:0 7px;border-radius:999px;background:var(--surface-hover);color:var(--text-secondary);white-space:nowrap}
.adm-flag.is-warn{background:var(--warning-bg);color:var(--warning)}
.adm-flag.is-bad{background:var(--destructive-bg);color:var(--destructive)}
.adm-flag.is-good{background:var(--success-bg);color:var(--success)}
.adm-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px}
.adm-tabs a{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--border);
  background:var(--surface);color:var(--text-secondary);font-size:13px;font-weight:500;text-decoration:none}
.adm-tabs a:hover{border-color:var(--border-strong);color:var(--text-primary)}
.adm-tabs a[aria-current="true"]{background:var(--accent);border-color:var(--accent);color:#fff}
.adm-tabs a span{font-size:11.5px;opacity:.8}
.adm-head-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
@media (max-width:760px){
  .adm-card .table-wrap{overflow:visible;padding:0}
  .adm-table thead{display:none}
  .adm-table,.adm-table tbody{display:block}
  .adm-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px;row-gap:5px;padding:12px 14px;border-top:1px solid var(--border)}
  .adm-table tbody tr:first-child{border-top:0}
  .adm-table tbody tr:hover{background:transparent}
  .adm-table td{grid-column:1 / -1;display:flex;justify-content:space-between;align-items:center;gap:12px;min-width:0;padding:0;border:0;font-size:13px;text-align:right}
  .adm-table td[data-label]::before{content:attr(data-label);flex-shrink:0;font-size:12px;color:var(--text-muted);text-align:left}
  .adm-table td.adm-main{grid-column:1;grid-row:1;display:block;text-align:left;margin-bottom:4px}
  .adm-table td.adm-actions{grid-column:2;grid-row:1;align-self:start;width:auto;position:static;box-shadow:none;background:transparent}
  .adm-table tbody tr:hover td.adm-actions{background:transparent}
  .adm-table td.adm-hide-sm{display:none}
  .adm-trunc{max-width:180px}
  .adm-toolbar input[type="date"]{flex:1 1 calc(50% - 4px)}
}

/* Admin → Applications */
.ap-table td.adm-main{min-width:200px}
.ap-table .adm-who{max-width:260px}
.ap-jobtext{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0}
.ap-jobtitle{color:var(--text-primary);text-decoration:none}
.ap-jobtitle:hover{text-decoration:underline;text-underline-offset:2px}
.ap-table td.ap-job{min-width:220px;max-width:320px}
.ap-closed{color:var(--text-muted)}
.ap-open{color:var(--warning)}
.ap-how{margin-top:3px}
.ap-table td.ap-cv{max-width:240px;color:var(--text-secondary);font-size:13px}
.ap-cvname{display:inline}
@media (max-width:1360px){
  .ap-table td.ap-cv,.ap-table th:nth-child(3),.ap-table td:nth-child(6),.ap-table th:nth-child(6){display:none}
  .ap-table .adm-who{max-width:210px}
  .ap-table td.adm-main{min-width:0}
}
@media (max-width:1100px){
  .ap-table .adm-who{max-width:180px}
  .ap-table .adm-bar i{display:none}
}
@media (max-width:760px){
  .ap-table td.ap-cv{display:flex}
  .ap-table td:nth-child(6){display:flex}
  .ap-table td.ap-job{max-width:none}
  .ap-jobtext{align-items:flex-end;text-align:right}
  .ap-how{display:none}
}

/* Admin → Transactions */
.tx-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.tx-refunds{margin-bottom:14px}
.tx-refunds > summary.card-head{cursor:pointer;list-style:none}
.tx-refunds > summary::-webkit-details-marker{display:none}
.tx-refund-form{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.tx-refund-form input[type="file"]{flex:1 1 260px;min-width:0}
.tx-ref{display:flex;flex-direction:column;align-items:flex-start;min-width:0}
.tx-ref .link-button{padding:0;text-align:left}
.tx-table .adm-who{max-width:260px}
@media (max-width:1360px){ .tx-table .adm-trunc{max-width:140px} .tx-table .adm-who{max-width:220px} }
@media (max-width:1100px){ .tx-table .adm-who{max-width:190px} }
@media (max-width:760px){
  .tx-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tx-ref{align-items:flex-end}
}

/* Admin → One-off purchases */
.pu-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.pu-of{font-size:14px;font-weight:500;color:var(--text-muted)}
.pu-revenue{font-size:18px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pu-table .adm-who{max-width:250px}
@media (max-width:1360px){ .pu-table td:nth-child(3),.pu-table th:nth-child(3){display:none} .pu-table .adm-who{max-width:210px} }
@media (max-width:1100px){ .pu-table .adm-who{max-width:180px} .pu-table .adm-bar i{display:none} }
@media (max-width:760px){ .pu-stats{grid-template-columns:repeat(2,minmax(0,1fr))} .pu-table td:nth-child(3){display:flex} }

/* Phones: list pages share these. */
@media (max-width:760px){
  .stats.adm-stats.tx-stats,.stats.adm-stats.pu-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .adm-table td.is-empty{display:none!important}
  .adm-toolbar .adm-field{flex:1 1 calc(50% - 4px);min-width:0}
  .adm-toolbar .adm-field input[type="date"]{flex:1 1 auto;width:100%;min-width:0}
  .ap-table td.ap-job{display:block;text-align:left}
  .ap-table td.ap-job::before{display:none}
  .ap-jobtext{align-items:flex-start;text-align:left}
  .ap-table td.ap-cv{font-size:12.5px}
}

/* Admin → Plans: one card per plan, features lined up to compare. */
.pl-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.pl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px;align-items:stretch}
.pl-card{display:flex;flex-direction:column;padding:0}
.pl-card.is-off{opacity:.75}
.pl-top{padding:16px 16px 12px;border-bottom:1px solid var(--border)}
.pl-name{display:flex;align-items:center;justify-content:space-between;gap:8px}
.pl-name h2{font-size:16px;margin:0}
.pl-desc{margin:4px 0 0;font-size:12.5px;color:var(--text-secondary);min-height:2.6em}
.pl-price{margin:10px 0 8px;font-size:26px;font-weight:700;letter-spacing:-.01em;color:var(--text-primary)}
.pl-price span{font-size:13px;font-weight:500;color:var(--text-muted)}
.pl-subs{display:flex;justify-content:space-between;font-size:12.5px;color:var(--text-secondary)}
.pl-subs strong{color:var(--text-primary)}
.pl-share{height:6px;border-radius:999px;background:var(--surface-hover);overflow:hidden;margin-top:6px}
.pl-share b{display:block;height:100%;background:var(--accent);border-radius:inherit}
.pl-features{list-style:none;margin:0;padding:12px 16px;display:flex;flex-direction:column;gap:7px;flex:1}
.pl-features li{display:flex;gap:8px;font-size:13px;color:var(--text-primary)}
.pl-features li span[aria-hidden]{width:14px;flex-shrink:0;text-align:center;font-weight:700;color:var(--success)}
.pl-features li.is-off{color:var(--text-muted)}
.pl-features li.is-off span[aria-hidden]{color:var(--text-muted)}
.pl-where{margin:0;padding:0 16px 12px;font-size:12px;color:var(--text-muted)}
.pl-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 16px;border-top:1px solid var(--border)}
.adm-menu-note{display:block;padding:8px 10px;font-size:12.5px;color:var(--text-muted)}
@media (max-width:760px){ .stats.adm-stats.pl-stats{grid-template-columns:repeat(2,minmax(0,1fr))} }

/* Admin → Coupons */
.cp-code{font-size:13px;letter-spacing:.04em}
.cp-empty .empty-state .desc{max-width:460px;margin-left:auto;margin-right:auto}

/* Admin → Data deletion requests */
.dd-req{border-top:1px solid var(--border);padding:12px 0}
.dd-req:first-child{border-top:0;padding-top:0}
.dd-matches{display:grid;gap:6px;margin-top:8px}
.dd-matches label{display:flex;gap:8px;align-items:flex-start;font-size:14px}
.dd-row{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;align-items:center}
.dd-what{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
.dd-meta{margin-top:14px}
.dd-meta > summary{cursor:pointer;list-style:none}
.dd-meta > summary::-webkit-details-marker{display:none}
.dd-urls{margin:0;display:grid;gap:10px}
.dd-urls dt{font-size:12.5px;color:var(--text-secondary);margin-bottom:3px}
.dd-urls dd{margin:0;display:flex;align-items:center;gap:6px;min-width:0}
.dd-urls code{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.pg-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:760px){ .stats.adm-stats.pg-stats{grid-template-columns:repeat(2,minmax(0,1fr))} }

/* Admin → Activity */
.act-keep{margin:4px 0 0;font-size:12px;color:var(--text-muted)}
.act-toolbar .act-country{width:130px;flex:0 0 auto;text-transform:uppercase}
.act-toolbar .act-country::placeholder{text-transform:none}
.act-clear{margin-left:4px;font-size:13px}
.act-bars.is-labelled{height:140px;gap:8px;padding-top:18px}
.act-bars.is-labelled .act-bar{position:relative}
.act-bar em{position:absolute;left:0;right:0;top:-17px;text-align:center;font-style:normal;font-size:11.5px;font-weight:600;color:var(--text-secondary);font-variant-numeric:tabular-nums}
.act-bars-days{display:flex;gap:8px;margin-top:6px}
.act-bars-days span{flex:1;min-width:0;text-align:center;font-size:11.5px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.act-grid{align-items:start}
@media (max-width:760px){
  .act-toolbar .act-country{width:auto;flex:1 1 calc(50% - 4px)}
  .act-bars.is-labelled{gap:4px}
  .act-bars-days{gap:4px}
  .act-bars-days span{font-size:10.5px}
}

/* ── Admin → Dashboard (views/admin/dashboard.ejs) ───────────────────────── */
.dash-stats .dash-trend{display:block}
.dash .card-head .adm-flag{flex-shrink:0}
.dash-head-actions{gap:8px;flex-wrap:nowrap}
.dash-refresh{display:inline-flex;align-items:center;gap:5px}
.dash-refresh svg{width:13px;height:13px}
.dash-refresh.is-loading{pointer-events:none;opacity:.7}
.dash-refresh.is-loading svg{animation:dash-spin .8s linear infinite}
@keyframes dash-spin{to{transform:rotate(360deg)}}
.dot-status.is-down{background:var(--destructive);box-shadow:0 0 0 3px var(--destructive-bg)}
.dot-status.is-ok{box-shadow:0 0 0 3px var(--success-bg)}
.dash-health .dash-row{padding:8px 10px}
.dash-todo .dash-row-label{gap:12px;font-weight:500}
.dash-todo-n{min-width:38px;justify-content:center;font-variant-numeric:tabular-nums;font-size:12px;line-height:1.8}
.dash-go{display:inline-flex;align-items:center;gap:2px;font-size:12.5px;font-weight:600;color:var(--accent);opacity:.75;transition:opacity .12s}
.dash-go svg{width:14px;height:14px}
.dash-todo:hover .dash-go{opacity:1}
.dash-clear{display:flex;align-items:center;gap:14px;padding:22px 10px}
.dash-clear strong{display:block;font-size:14px}
.dash-clear p{margin:2px 0 0;font-size:13px;color:var(--text-secondary)}
.dash-clear-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:40px;height:40px;border-radius:50%;background:var(--success-bg);color:var(--success)}
.dash-clear-icon svg{width:20px;height:20px}
.dash-meta strong{color:var(--text-primary);font-weight:700}
.dash-chart{position:relative;padding-top:18px}
.dash-chart-max{position:absolute;top:0;left:0;font-size:11px;color:var(--text-muted);font-variant-numeric:tabular-nums}
.dash-bars{display:flex;align-items:flex-end;gap:3px;height:150px;border-top:1px dashed var(--border);border-bottom:1px solid var(--border)}
.dash-col{flex:1;min-width:0;height:100%;display:flex;align-items:flex-end;border-radius:3px 3px 0 0;cursor:default}
.dash-col:hover{background:var(--surface-hover)}
.dash-bar-fill{display:block;width:100%;background:var(--bar);opacity:.7;border-radius:3px 3px 0 0;transition:opacity .12s}
.dash-col:hover .dash-bar-fill,.dash-col.is-today .dash-bar-fill{opacity:1}
.dash-days{display:flex;gap:3px;margin-top:6px;height:15px}
.dash-days span{flex:1;min-width:0;position:relative;font-size:11px;color:var(--text-muted)}
.dash-days span:not(:empty)::before{content:'';position:absolute;top:-6px;left:50%;width:1px;height:4px;background:var(--border)}
.dash-days span{white-space:nowrap;display:flex;justify-content:center;overflow:visible}
.dash-days span:last-child{justify-content:flex-end}
.dash-days span:last-child::before{left:auto;right:calc(50% - 1px)}
.dash-note{margin:10px 0 0;font-size:12px;color:var(--text-muted)}
.dash .adm-av{width:34px;height:34px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center}
a.dash-person{text-decoration:none;color:inherit}
.dash-person .adm-who{max-width:none;flex:1}
.dash-person:hover .adm-name .truncate,.dash-person:hover .dash-two > .td-strong{text-decoration:underline;text-underline-offset:2px}
.dash-when{flex-shrink:0;white-space:nowrap}
.dash-amount .adm-flag{font-size:10.5px}
.dash-todo.is-zero{min-height:38px;padding-top:7px;padding-bottom:7px}
.dash-todo.is-zero .dash-row-label{font-weight:400;color:var(--text-secondary)}
.dash-todo-ok{display:inline-flex;align-items:center;justify-content:center;color:var(--success);opacity:.8}
.dash-todo-ok svg{width:15px;height:15px}
.dash-none{font-size:12px;color:var(--text-muted)}
.dash-todo.is-zero:hover .dash-none{color:var(--text-secondary)}
@media (max-width:1100px){
  .dash-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:760px){
  .stats.adm-stats.dash-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dash-bars{height:120px;gap:2px}
  .dash-days{gap:2px}
  .dash-days span{font-size:10px}
  .dash-head-actions .dash-refresh span{display:none}
  .dash-go{font-size:0}
  .dash-go svg{width:16px;height:16px}
}

/* ── Admin → User detail (views/admin/user-detail.ejs) ───────────────────── */
.ud .breadcrumb{margin-bottom:12px}
.card.ud-head{display:flex;flex-direction:row;align-items:flex-start;gap:16px;padding:18px 20px;margin-bottom:14px}
.ud .adm-av.ud-av{width:60px;height:60px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:20px}
.ud-id{flex:1;min-width:0}
.ud-title{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px}
.ud-title h1{margin:0;font-size:22px;line-height:1.25;overflow-wrap:anywhere}
.ud-email{display:flex;align-items:center;gap:2px;margin-top:3px;min-width:0;font-size:14px}
.ud-email a{color:var(--text-secondary);text-decoration:none;min-width:0}
.ud-email a:hover{color:var(--accent);text-decoration:underline}
.ud-copy{padding:3px 5px;color:var(--text-muted)}
.ud-copy svg{width:14px;height:14px}
.ud-meta{display:flex;flex-wrap:wrap;gap:4px 0;margin:8px 0 0;font-size:12.5px;color:var(--text-muted)}
.ud-meta span:not(:last-child)::after{content:'·';margin:0 8px;color:var(--border-strong,var(--text-muted))}
.ud-meta .ud-2fa-on{color:var(--success)}
.ud-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.ud-actions form{margin:0}
.ud-actions .adm-menu summary svg{width:16px;height:16px}
.ud-stats .stat-card{min-width:0}
.ud-stats .stat-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ud-tabs{margin:4px 0 0}
.ud-tabs .ud-tab-danger{color:var(--destructive)}
.ud .tab-panel{margin-top:14px}
.ud-access,.ud-channels{align-items:start}
.ud-link-form{display:flex;gap:8px;flex-wrap:wrap}
.ud-link-form > input,.ud-link-form > select{flex:1 1 200px;min-width:0;width:auto}
.ud-link-form > .btn{flex-shrink:0}
.ud-howto{margin:10px 0 0;padding-left:18px;font-size:12.5px;line-height:1.6;color:var(--text-muted)}
.ud-ch{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;margin-right:8px;border-radius:6px;vertical-align:-5px}
.ud-ch svg{width:14px;height:14px}
.ud-ch-tg{background:#e8f4fb;color:#229ed9}
.ud-ch-wa{background:#e9f9ef;color:#1faa53}
.ud .card-head .adm-flag{flex-shrink:0}
.ud-table .td-strong{color:var(--text-primary)}
.ud-table a.td-strong{text-decoration:none}
.ud-table a.td-strong:hover{text-decoration:underline;text-underline-offset:2px}
.ud-sub{display:block;margin-top:2px;font-size:12px;color:var(--text-muted)}
.ud-table .adm-actions form{margin:0}
.ud-empty{padding:28px 20px;text-align:center}
.ud-empty p{margin:0;font-size:13.5px;color:var(--text-muted)}
.ud-timeline{padding:16px 20px 18px 44px}
.ud-danger{border-color:var(--destructive-border)}
.ud-danger .card-head h2{color:var(--destructive)}
@media (max-width:1100px){
  .ud-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:760px){
  .ud-head{flex-wrap:wrap;padding:16px}
  .ud .adm-av.ud-av{width:48px;height:48px;font-size:17px}
  .ud-title h1{font-size:19px}
  .ud-actions{width:100%;order:3}
  .ud-actions form{flex:1}
  .ud-actions form .btn{width:100%}
  .stats.adm-stats.ud-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ud-tabs{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}
  .ud-tabs .tab{flex-shrink:0}
  .ud-timeline{padding-left:36px}
}

/* Compact export menu shared by admin users and transactions. */
.adm-export { position:relative;display:inline-block; }
.adm-export>summary { display:inline-flex;align-items:center;gap:7px;list-style:none;cursor:pointer; }
.adm-export>summary::-webkit-details-marker { display:none; }
.adm-export-list { position:absolute;right:0;top:calc(100% + 5px);z-index:80;min-width:155px;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);
  box-shadow:var(--shadow-lg);padding:5px; }
.adm-export-list a { display:block;padding:9px 12px;font-size:13px;color:var(--text-primary);text-decoration:none;border-radius:var(--radius-sm); }
.adm-export-list a:hover,.adm-export-list a:focus-visible { background:var(--surface-hover); }
.adm-weekly-panel { margin:0 0 16px; }
.adm-weekly-panel .card-head { padding:12px 16px 0; }
.adm-weekly-values { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:12px 16px 16px; }
.adm-weekly-values>div { min-width:0;display:flex;flex-direction:column;gap:5px; }
.adm-weekly-values strong { font-size:21px;font-weight:650; }
@media(max-width:700px) { .adm-weekly-values { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Balanced, equal-size metric tiles: no variable-width orphaned cards. */
.stats.adm-stats.adm-balanced-users,
.stats.adm-stats.tx-stats.adm-balanced-transactions {
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;
}
.stats.adm-stats.adm-balanced-users .stat-card,
.stats.adm-stats.tx-stats.adm-balanced-transactions .stat-card {
  min-width:0;height:100%;box-sizing:border-box;
}
.adm-weekly-values { grid-template-columns:repeat(5,minmax(0,1fr)); }
@media(max-width:1100px) {
  .stats.adm-stats.adm-balanced-users,
  .stats.adm-stats.tx-stats.adm-balanced-transactions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .stats.adm-stats.tx-stats.adm-balanced-transactions>.stat-card:last-child { grid-column:1/-1; }
  .adm-weekly-values { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .adm-weekly-values>div:last-child { grid-column:1/-1; }
}
@media(max-width:600px) {
  .stats.adm-stats.adm-balanced-users,
  .stats.adm-stats.tx-stats.adm-balanced-transactions { grid-template-columns:minmax(0,1fr); }
  .stats.adm-stats.tx-stats.adm-balanced-transactions>.stat-card:last-child { grid-column:auto; }
  .adm-weekly-values { grid-template-columns:minmax(0,1fr); }
  .adm-weekly-values>div:last-child { grid-column:auto; }
}

/* Users overview: six equal metrics in a wide row, one persistent collapsible group. */
.stats.adm-stats.adm-balanced-users{grid-template-columns:repeat(6,minmax(0,1fr))}
.adm-metrics-collapse{margin:0 0 16px;min-width:0}
.adm-metrics-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;
  padding:10px 14px;margin-bottom:10px;cursor:pointer;background:var(--surface);
  border:1px solid var(--border);border-radius:var(--radius-md)}
.adm-metrics-summary::-webkit-details-marker{display:none}
.adm-metrics-summary strong{display:block;font-size:13px}
.adm-metrics-summary small{display:block;margin-top:2px;font-size:11px;color:var(--text-muted)}
.adm-metrics-summary>span:last-child{font-size:20px;color:var(--text-secondary);transition:transform .15s}
.adm-metrics-collapse[open] .adm-metrics-summary>span:last-child{transform:rotate(180deg)}
.adm-metrics-content>.adm-weekly-panel{margin-bottom:0}
.adm-users-toolbar .adm-search{flex:1 1 240px;max-width:none}
.adm-range-select{position:relative;display:inline-block}
.adm-range-select>summary{display:inline-flex;gap:8px;align-items:center;cursor:pointer;list-style:none}
.adm-range-select>summary::-webkit-details-marker{display:none}
.adm-range-content{display:grid;gap:10px;position:absolute;right:0;top:calc(100% + 5px);
  min-width:250px;padding:14px;z-index:65;background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-md);box-shadow:var(--shadow-lg)}
.adm-range-content strong{font-size:13px}
.adm-range-content label{display:grid;gap:5px;font-size:12px;color:var(--text-secondary)}
.adm-range-content input{width:100%;box-sizing:border-box}
.adm-user-dialog{width:min(560px,calc(100vw - 32px));max-height:85vh;overflow:auto;padding:0;
  background:var(--surface);color:var(--text-primary);border:1px solid var(--border);
  border-radius:var(--radius-lg);box-shadow:var(--shadow-lg)}
.adm-user-dialog::backdrop{background:rgba(5,12,29,.65)}
.adm-user-dialog-head,.adm-user-dialog-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px}
.adm-user-dialog-head{border-bottom:1px solid var(--border)}
.adm-user-dialog-head h2{font-size:18px;margin:0}
.adm-user-dialog-head p{font-size:12px;color:var(--text-secondary);margin:5px 0 0}
.adm-user-dialog-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:18px 20px}
.adm-user-dialog-fields label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--text-secondary)}
.adm-user-dialog-fields select{width:100%;min-width:0}
.adm-user-dialog-foot{border-top:1px solid var(--border);justify-content:flex-end}
@media(max-width:1450px){.stats.adm-stats.adm-balanced-users{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:800px){.stats.adm-stats.adm-balanced-users{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:550px){
  .stats.adm-stats.adm-balanced-users{grid-template-columns:minmax(0,1fr)}
  .adm-user-dialog-fields{grid-template-columns:minmax(0,1fr)}
  .adm-range-content{right:auto;left:0}
}

/* Center the native filter dialog in the browser's modal top layer. */
dialog.adm-user-dialog[open] {
  position:fixed;
  inset:0;
  margin:auto;
  box-sizing:border-box;
  width:min(560px,calc(100vw - 32px));
  max-height:min(85vh,760px);
  overflow:auto;
}
dialog.adm-user-dialog:not([open]) { display:none; }
@media(max-width:550px) {
  dialog.adm-user-dialog[open] {
    width:calc(100vw - 24px);
    max-height:calc(100dvh - 24px);
  }
}

/* Weekly activity: readable metric cards at every viewport, especially mobile. */
.adm-weekly-panel .adm-weekly-values {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
  padding:12px 14px 16px;
}
.adm-weekly-panel .adm-weekly-values>div {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  min-width:0;
  padding:12px;
  border-radius:var(--radius-md);
  background:var(--surface-alt);
  border:1px solid var(--border);
  box-sizing:border-box;
}
.adm-weekly-panel .adm-weekly-values .stat-label {
  font-size:12px;
  line-height:1.45;
  white-space:normal;
  overflow-wrap:anywhere;
}
.adm-weekly-panel .adm-weekly-values strong {
  display:block;
  font-size:clamp(17px,2vw,22px);
  line-height:1.25;
  font-variant-numeric:tabular-nums;
  max-width:100%;
  overflow-wrap:anywhere;
}
.adm-metrics-content .adm-weekly-panel .card-head {
  padding:13px 14px 8px;
}
.adm-metrics-content .adm-weekly-panel .card-head .card-title {
  line-height:1.35;
}
@media(max-width:1100px) {
  .adm-weekly-panel .adm-weekly-values {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .adm-weekly-panel .adm-weekly-values>div:last-child {grid-column:auto;}
}
@media(max-width:650px) {
  .adm-weekly-panel .adm-weekly-values {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    padding:8px 10px 12px;
  }
  .adm-weekly-panel .adm-weekly-values>div {
    min-height:84px;
    padding:11px;
  }
  .adm-weekly-panel .adm-weekly-values>div:last-child {
    grid-column:1/-1;
    min-height:72px;
  }
  .adm-weekly-panel .adm-weekly-values strong {font-size:19px;}
  .adm-metrics-content .adm-weekly-panel .card-head {padding:12px 12px 8px;}
  /* Keep the transaction overview compact rather than one tall metric per line. */
  .stats.adm-stats.tx-stats.adm-balanced-transactions {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .stats.adm-stats.tx-stats.adm-balanced-transactions>.stat-card:last-child {
    grid-column:1/-1;
  }
}

/* Job page: the positions of a multi-role advert, in the header card */
.job-roles{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;margin-top:12px;padding-top:10px;border-top:1px solid var(--border)}
.job-roles-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);white-space:nowrap}
.job-roles-chips{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0 0;padding:0;list-style:none;flex:1 1 100%;min-width:0}
.job-roles-chips .chip{white-space:normal}
.job-roles-note{font-size:12px;color:var(--text-muted)}

/* Quick apply: an advert with several positions */
.qa-role{cursor:pointer}
.qa-role-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.qa-role-top input{width:18px;height:18px;margin:0;flex-shrink:0;accent-color:var(--accent)}
.qa-role-title{flex:1 1 auto;min-width:0}
.qa-role-score{margin-left:auto;font-size:.82rem;font-weight:600;color:var(--accent);white-space:nowrap}
.qa-role-score.is-none{color:var(--text-muted);font-weight:500}
.qa-role-brief{padding-left:26px}
.qa-role.is-selected{border-color:var(--accent);background:var(--accent-light)}
.qa-role.is-disabled{opacity:.55;cursor:not-allowed}
.qa-role.is-disabled:hover{border-color:var(--border);background:var(--surface)}
.qa-roles{display:flex;align-items:flex-start;gap:10px;margin:0 0 12px;padding:8px 10px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface-alt)}
.qa-roles-label{font-size:.75rem;font-weight:600;color:var(--text-secondary);white-space:nowrap;padding-top:8px}
.qa-roles-list{display:flex;flex-wrap:wrap;gap:6px;flex:1 1 auto;min-width:0}
.qa-role-tab{display:inline-flex;align-items:center;gap:6px;max-width:100%;min-width:0;padding:6px 10px;border:1px solid var(--border-strong);border-radius:var(--radius-md);background:var(--surface);font:inherit;font-size:.8rem;color:var(--text-primary);cursor:pointer;flex:0 1 auto}
.qa-role-tab:hover{border-color:var(--accent)}
.qa-role-tab:disabled{opacity:.6;cursor:wait}
.qa-role-tab.is-active{border-color:var(--accent);background:var(--accent-light);font-weight:600}
.qa-role-tab-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.qa-role-tab-status{flex-shrink:0;font-size:.7rem;font-weight:600;color:var(--text-secondary);white-space:nowrap}
.qa-role-tab-status.is-ready,.qa-role-tab-status.is-sent{color:var(--success)}
.qa-role-tab-status.is-failed{color:var(--danger,#b91c1c)}
@media (max-width:640px){.qa-roles{flex-direction:column;align-items:stretch;gap:6px}}
.btn.is-waiting{opacity:.6;cursor:progress}

/* After an application: rating, follow, further services */
.qa-after{margin-top:18px;display:grid;gap:10px;text-align:left}
.qa-after-card{border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);padding:12px 14px}
.qa-after-title{margin:0}
.qa-after-sub{margin:2px 0 0}
.qa-after-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.qa-after-note{margin:6px 0 0;min-height:1em}
.qa-after-more{display:flex;gap:8px;align-items:flex-end;margin-top:8px}
.qa-after-text{flex:1 1 auto;min-width:0;resize:vertical;padding:8px 10px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:inherit;font:inherit}
.qa-stars{display:flex;gap:2px;margin-top:8px}
.qa-star{border:0;background:none;padding:2px 4px;font-size:28px;line-height:1;color:var(--border);cursor:pointer;border-radius:var(--radius-sm)}
.qa-star.is-on{color:#f59e0b}
.qa-star:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
@media (max-width:640px){.qa-after-more{flex-direction:column;align-items:stretch}.qa-star{font-size:32px;padding:4px 6px}}

/* An uploaded file shown page under page (the apply flow): no pager, no inner scroll */
.doc-viewer[data-continuous] .doc-viewer-bar{display:none}
.doc-viewer[data-continuous] .doc-viewer-stage{max-height:none;overflow:visible;min-height:0}
/* After an application: the popup (rating, then follow) */
.qa-pop-overlay{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(15,23,42,.55)}
.qa-pop{position:relative;width:100%;max-width:440px;max-height:calc(100vh - 32px);overflow:auto;background:var(--surface);border-radius:var(--radius-lg);box-shadow:0 20px 50px rgba(15,23,42,.35);padding:22px 22px 16px;text-align:left}
.qa-pop-x{position:absolute;top:8px;right:10px;border:0;background:none;font-size:24px;line-height:1;color:var(--text-secondary);cursor:pointer;padding:4px 8px;border-radius:var(--radius-sm)}
.qa-pop-x:hover{color:var(--text-primary)}
.qa-pop-title{margin:0 28px 2px 0;font-size:1.1rem}
.qa-pop-sub{margin:0}
.qa-pop-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:16px;padding-top:12px;border-top:1px solid var(--border)}
.qa-pop .qa-stars{justify-content:center;margin:16px 0 4px;gap:6px}
.qa-pop .qa-star{font-size:40px}
.qa-pop .qa-after-note{text-align:center}
.qa-pop .qa-after-more{flex-direction:column;align-items:stretch}
.qa-follow-list{display:grid;gap:10px;margin-top:14px}
.qa-follow-btn{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:var(--radius-lg);color:#fff;text-decoration:none;transition:transform .12s ease,box-shadow .12s ease,filter .12s ease}
.qa-follow-btn:hover{color:#fff;transform:translateY(-1px);box-shadow:0 6px 16px rgba(15,23,42,.18);filter:brightness(1.05)}
.qa-follow-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.qa-follow-btn.is-facebook{background:#1877f2}
.qa-follow-btn.is-telegram{background:#229ed9}
.qa-follow-btn.is-done{filter:saturate(.6)}
.qa-follow-icon{flex:0 0 40px;width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center}
.qa-follow-icon svg{width:22px;height:22px}
.qa-follow-text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}
.qa-follow-name{font-weight:700;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qa-follow-action{font-size:.8rem;opacity:.92}
.qa-follow-go{font-size:22px;line-height:1;opacity:.9}
.qa-follow-already{display:block;margin:10px auto 0}
@media (max-width:480px){.qa-pop{padding:18px 16px 12px}.qa-pop .qa-star{font-size:36px}}

/* "Send application": the ways it can go out */
.qa-send-pop{max-width:480px}
.qa-send-option{border:1px solid var(--border);border-radius:var(--radius-lg);padding:14px;margin-top:12px}
.qa-send-option.is-recommended{border-color:var(--accent);background:var(--accent-light)}
.qa-send-option-title{margin:0 0 2px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.qa-send-pill{font-size:.68rem}
.qa-send-option .btn-block{margin-top:10px}
.qa-send-where{margin-top:12px;padding-top:10px;border-top:1px solid var(--border)}
.qa-send-where-row{display:flex;align-items:center;gap:8px;padding:6px 0;min-width:0}
.qa-send-where-kind{flex:0 0 86px}
.qa-send-where-value{flex:1 1 auto;min-width:0;overflow-wrap:anywhere;font-weight:600}
.qa-send-marked{margin-top:10px}
.qa-flash{animation:qa-flash 1.1s ease 2}
@keyframes qa-flash{0%,100%{box-shadow:0 0 0 0 rgba(37,99,235,0)}50%{box-shadow:0 0 0 4px rgba(37,99,235,.35)}}
#qa-next{white-space:nowrap}

/* ── Breathing room between stacked highlights ──
   Nav and menu items sat flush, so an item's hover background ran straight
   into the next item's active one (e.g. hovering "Activity" under "Program
   applications"). A 2px gap separates them everywhere these lists are used:
   the console sidebar, the public nav drawer, dropdowns and row menus. */
.sb-item + .sb-item,.sb-item + .sb-parent,.sb-parent + .sb-item,.sb-parent + .sb-parent,
.sb-parent + .sb-children,.sb-children + .sb-item,.sb-children + .sb-parent{margin-top:2px}
.dropdown-content > .dropdown-item + .dropdown-item{margin-top:2px}
.adm-menu-list{gap:2px}
/* Status chips right under a card had no space above them. */
.card + .adm-tabs{margin-top:18px}

/* ── Admin → Programs → Affiliates ── */
.aff-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;margin:0 0 14px}
.aff-toolbar .adm-tabs{margin:0}
.aff-terms{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.aff-term{font-size:12.5px;color:var(--text-secondary);background:var(--surface-hover);border:1px solid var(--border);
  border-radius:999px;padding:4px 10px;white-space:nowrap}
.aff-term strong{color:var(--text-primary);font-weight:600}
.aff-terms .btn{gap:6px}
.aff-list{display:flex;flex-direction:column;gap:2px;padding:4px 8px 8px}
.aff-row{display:grid;grid-template-columns:28px minmax(0,2.4fr) repeat(4,minmax(72px,1fr)) 64px 16px;align-items:center;gap:12px;
  width:100%;padding:10px;border:0;border-radius:var(--radius-md);background:transparent;text-align:left;font:inherit;
  color:var(--text-primary);cursor:pointer;transition:background .12s ease}
.aff-row:hover,.aff-row.is-open{background:var(--surface-hover)}
.aff-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.aff-row-head{cursor:default;padding:4px 10px 8px;margin-bottom:2px;border-bottom:1px solid var(--border);border-radius:0;
  font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--text-muted)}
.aff-row-head:hover{background:transparent}
.aff-who{display:flex;flex-direction:column;min-width:0;gap:1px}
.aff-name{font-weight:600;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.aff-name .pill{margin-left:4px;vertical-align:1px}
.aff-email{font-size:12px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.aff-num{text-align:right;font-variant-numeric:tabular-nums;font-size:13px}
.aff-req{display:block;width:max-content;margin:3px 0 0 auto;font-size:10.5px}
.aff-rate{display:inline-block;font-size:12px;font-weight:600;padding:2px 8px;border-radius:999px;background:var(--accent-light);color:var(--accent)}
.aff-rate.is-default{background:var(--surface-hover);color:var(--text-secondary)}
.aff-chev{width:16px;height:16px;color:var(--text-muted)}
@media (max-width:860px){
  .aff-row{grid-template-columns:28px minmax(0,1fr) auto 16px}
  .aff-row > :nth-child(3),.aff-row > :nth-child(4),.aff-row > :nth-child(5),.aff-row > :nth-child(7){display:none}
  .aff-row-head{display:none}
  .aff-terms .aff-term{display:none}
}
.aff-drawer{width:min(540px,94vw)}
.aff-d-heading{display:flex;flex-direction:column;min-width:0}
.aff-d-heading strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.aff-loading{display:flex;align-items:center;gap:10px;padding:24px 4px;color:var(--text-muted);font-size:13.5px}
.aff-d-meta{align-items:center;margin-bottom:12px}
.aff-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.aff-stat{display:flex;flex-direction:column;gap:2px;min-width:0;padding:8px 10px;border:1px solid var(--border);border-radius:var(--radius-md)}
.aff-stat-label{font-size:11px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em}
.aff-stat strong{font-size:14.5px;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:480px){.aff-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
.aff-section{margin-top:18px;padding-top:14px;border-top:1px solid var(--border)}
.aff-section h3{margin:0 0 8px;font-size:12px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--text-muted)}
.aff-mini{font-size:12.5px}
.aff-mini th,.aff-mini td{padding:6px 8px}
.aff-drawer-foot{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 16px;border-top:1px solid var(--border);flex-shrink:0}
.aff-danger{color:var(--destructive)}
.aff-danger:hover{border-color:var(--destructive);color:var(--destructive)}

/* Spacing utilities, repeated last: a component rule declared later in this
   file (e.g. `.adm-tabs{margin:0 0 12px}`) used to cancel an `mt-3` written
   on the same element, at equal specificity. Utilities are meant to win. */
.mt-0{margin-top:0}.mt-1{margin-top:6px}.mt-2{margin-top:12px}.mt-3{margin-top:18px}.mt-4{margin-top:24px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:6px}.mb-2{margin-bottom:12px}.mb-3{margin-bottom:18px}.mb-4{margin-bottom:24px}

/* ── Resizable side drawers (public/js/side-drawer-size.js) ──
   The apply drawer's behaviour for any `.side-drawer[data-drawer-size]`:
   drag the left edge (--drawer-w, remembered per drawer) or go full screen. */
.side-drawer[data-drawer-size]{width:min(var(--drawer-w,560px),100vw);max-width:100vw}
.side-drawer[data-drawer-size].is-expanded{width:100vw}
.side-drawer.is-resizing{transition:none;user-select:none}
.drawer-tools{margin-left:auto;display:flex;align-items:center;gap:2px;flex-shrink:0}
.drawer-tools .close{margin-left:0}
.drawer-expand svg{width:18px;height:18px}
.drawer-expand .when-expanded,.side-drawer.is-expanded .drawer-expand .when-collapsed{display:none}
.side-drawer.is-expanded .drawer-expand .when-expanded{display:block}
.drawer-resize{position:absolute;left:-5px;top:0;bottom:0;width:10px;z-index:3;cursor:ew-resize;touch-action:none;outline:none}
.drawer-resize::after{content:"";position:absolute;left:4px;top:50%;width:3px;height:44px;margin-top:-22px;border-radius:3px;
  background:var(--border-strong,var(--border));opacity:0;transition:opacity .15s ease,background .15s ease}
.side-drawer:hover .drawer-resize::after,.side-drawer.is-resizing .drawer-resize::after{opacity:1}
.drawer-resize:hover::after,.drawer-resize:focus-visible::after,.side-drawer.is-resizing .drawer-resize::after{background:var(--accent);opacity:1}
.side-drawer.is-expanded .drawer-resize{display:none}
@media (max-width:640px){.side-drawer[data-drawer-size]{width:100vw}.drawer-resize,.drawer-expand{display:none}}

/* Affiliate drawer: tabs, paged lists, account details. */
.aff-d-tabs{margin-bottom:12px}
.aff-d-tabs .tab{cursor:pointer}
.aff-list-body{position:relative;min-height:48px;transition:opacity .15s ease}
.aff-list-body[aria-busy="true"]{opacity:.45;pointer-events:none}
.aff-list-body[aria-busy="true"]::after{content:"";position:absolute;top:50%;left:50%;width:22px;height:22px;margin:-11px 0 0 -11px;
  border:2px solid var(--border-strong);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite}
.aff-empty{padding:12px 2px}
.aff-panel{min-height:120px}
.aff-pager{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px}
.aff-dl{display:grid;grid-template-columns:minmax(140px,max-content) 1fr;gap:8px 16px;margin:0;font-size:13.5px}
.aff-dl dt{color:var(--text-muted)}
.aff-dl dd{margin:0;font-weight:500;overflow-wrap:anywhere}
.side-drawer.is-expanded .aff-stats{grid-template-columns:repeat(8,minmax(0,1fr))}
@media (max-width:480px){.aff-dl{grid-template-columns:1fr;gap:2px}.aff-dl dd{margin-bottom:8px}}

/* Affiliate → Payouts: the saved Mobile Money number. */
.pay-to{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:40px;padding:6px 6px 6px 12px;
  border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface-hover)}
.pay-to > span{display:flex;flex-direction:column;min-width:0;line-height:1.3}
.pay-label{display:block;margin-bottom:6px;font-size:13px;font-weight:600;color:var(--text-primary)}
.pay-dl{display:grid;grid-template-columns:minmax(160px,max-content) 1fr;gap:10px 20px;margin:0;font-size:14px}
.pay-dl dt{color:var(--text-muted)}
.pay-dl dd{margin:0;font-weight:600}
@media (max-width:480px){.pay-dl{grid-template-columns:1fr;gap:2px}.pay-dl dd{margin-bottom:10px}}
.tab .count.pay-missing{background:var(--warning-bg,#fef3c7);color:var(--warning,#b45309);font-weight:700}

/* Affiliate → Payouts: payout details (the Mobile Money checkout's look) and the request breakdown. */
.pd-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px 16px}
@media (max-width:640px){.pd-top{grid-template-columns:1fr}}
.pd-country{position:relative}
.pd-country-btn{width:100%;justify-content:flex-start;gap:8px;background:var(--surface);font:inherit;font-size:14px;color:var(--text-primary);cursor:pointer}
.pd-country-btn .pb-cc-chev{margin-left:auto}
.pd-methods{margin-top:0;height:40px;align-items:stretch}
.pd-methods .segmented-btn[hidden]{display:none}
.pd-country .mm-country-menu,.mm-phone-row .mm-country-menu{min-width:260px}
.mm-phone-row{position:relative}
.loading-inline{display:inline-flex;align-items:center;gap:8px;margin:0 0 12px}
.loading-inline .spinner{width:14px;height:14px}
.pay-quote{margin-top:14px;padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface-alt,var(--surface-hover));
  transition:opacity .15s ease}
.pay-quote[aria-busy="true"]{opacity:.5}
.pay-quote-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:4px 0;font-size:13.5px;color:var(--text-secondary)}
.pay-quote-row > span:last-child{font-variant-numeric:tabular-nums;text-align:right;display:flex;flex-direction:column;align-items:flex-end}
.pay-quote-row.is-total{margin-top:6px;padding-top:10px;border-top:1px solid var(--border);color:var(--text-primary);font-weight:600}
.pay-quote-row.is-total strong{font-size:17px}

/* Admin → Payout countries. */
.pc-row.aff-row{grid-template-columns:28px minmax(0,1.6fr) 64px minmax(0,1.4fr) minmax(0,1.2fr) minmax(0,1.2fr) 70px 16px}
.pc-flag{font-size:20px;line-height:1;width:28px;text-align:center}
.pc-methods{display:flex;flex-wrap:wrap;gap:4px}
.pc-line{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:860px){
  .pc-row.aff-row{grid-template-columns:28px minmax(0,1fr) auto 16px}
  .pc-row.aff-row > :nth-child(3),.pc-row.aff-row > :nth-child(5),.pc-row.aff-row > :nth-child(6),.pc-row.aff-row > :nth-child(7){display:none}
}
.pc-drawer .side-drawer-head .pc-flag{width:auto}
.pc-switch{font-weight:600;font-size:14px}
.pc-method{padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius-md);margin-bottom:10px}
.pc-method .form-grid{margin-top:8px}
.pc-save{display:flex;justify-content:flex-end;margin-top:16px}
.pc-bank-add{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:10px}
.pc-bank-add input[type="text"]{flex:1 1 140px;min-width:0;height:34px}
.pc-bank-line{display:flex;align-items:center;justify-content:space-between;gap:10px}
.pd-methods .segmented-btn[disabled]{opacity:.45;cursor:not-allowed}

/* CV previews (user and admin): each page its own sheet, numbered above it. */
#cv-preview-container.cv-preview-pages{margin-inline:auto}
.cv-preview-pages .cv-render-pages{counter-reset:cvpage;gap:34px;padding-top:6px}
.cv-preview-pages .cv-render-page{counter-increment:cvpage;overflow:visible}
.cv-preview-pages .cv-render-page>svg{border-radius:8px}
.cv-preview-pages .cv-render-page::before{content:"Page " counter(cvpage);position:absolute;top:-22px;left:2px;
  font-size:11.5px;font-weight:600;letter-spacing:.02em;color:var(--text-muted)}
.cv-preview-pages .cv-render-page:only-child::before{display:none}

/* A pager after a list sits clear of the list's last row. */
:where(.stack,.list,.aff-list) + .pagination,
:where(.stack,.list,.aff-list) + :where([hidden]) + .pagination{margin-top:12px}

/* Four consoles (an admin's Account, Admin, Partner, Affiliate) share the switch. */
.mode-switch:has(> .mode-btn:nth-child(4)) .mode-btn{font-size:11.5px;padding:0 2px;letter-spacing:-.01em}

/* An emoji flag (no SVG for the country) at text size instead of squashed into 18x12. */
.mm-flag.is-emoji{width:auto;height:auto;overflow:visible;border-radius:0;font-size:15px;line-height:1;align-items:center}

/* Feature previews (views/partials/feature-preview.ejs) */
.feature-preview .feature-lead{font-size:17px;line-height:1.55;color:var(--text-secondary)}
.feature-benefits{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.feature-benefits li{position:relative;padding-left:26px}
.feature-benefits li::before{content:'';position:absolute;left:4px;top:7px;width:10px;height:6px;border-left:2px solid var(--success);border-bottom:2px solid var(--success);transform:rotate(-45deg)}

/* ── Admin → Marketing → Email (views/admin/marketing.ejs) ─────────────── */
.mk-row{grid-template-columns:minmax(0,2.6fr) minmax(96px,1fr) minmax(88px,.9fr) 64px 64px 92px 16px}
.mk-when{display:block;margin-top:2px}
@media (max-width:760px){
  .mk-row{grid-template-columns:minmax(0,1fr) auto 16px}
  .mk-row > :nth-child(3),.mk-row > :nth-child(4),.mk-row > :nth-child(5),.mk-row > :nth-child(6){display:none}
}
.mk-health{display:flex;flex-direction:column;gap:6px;padding:10px 14px;font-size:13px}
.mk-health-row{display:flex;align-items:center;gap:8px}
.mk-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;background:var(--text-muted)}
.mk-dot.ok{background:var(--success,#16a34a)}
.mk-dot.warn{background:var(--warning,#d97706)}
.mk-autos{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px}
.mk-auto-stats{display:flex;gap:14px;flex-wrap:wrap;font-size:12.5px;color:var(--text-secondary)}
.mk-auto-stats strong{color:var(--text-primary);font-variant-numeric:tabular-nums}
.mk-drawer{width:min(760px,96vw)}
.mk-reach{display:flex;align-items:center;gap:8px;margin-top:10px;padding:8px 10px;border-radius:var(--radius-md);background:var(--surface-hover);font-size:13px}
.mk-preview-frame{border:1px solid var(--border);border-radius:var(--radius-md);overflow:hidden;background:#fff}
.mk-preview-frame iframe{display:block;width:100%;height:560px;border:0}
.mk-p-text{white-space:pre-wrap;font-size:12px;max-height:320px;overflow:auto;padding:10px;border:1px solid var(--border);border-radius:var(--radius-md)}
.mk-foot{flex-wrap:wrap}
.mk-foot input[type="datetime-local"]{width:200px}
#mk-fields:disabled{opacity:.85}
.spinner.spinner-sm{width:12px;height:12px;border-width:2px;vertical-align:-2px}
.mk-test{gap:8px;align-items:center;margin-bottom:6px}

/* Admin → Email log (views/admin/email-log.ejs) */
.el-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.el-stats > .card + .card { margin-top: 0; }
.el-stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-decoration: none; color: inherit; }
.el-stat-label { font-size: 12px; color: var(--muted-foreground, #6b7280); }
.el-stat-num { font-size: 22px; font-weight: 600; }
.el-stat-num small { font-size: 12px; font-weight: 400; }
.el-filters { flex-wrap: wrap; gap: 8px; }
.el-filters input[type=search] { min-width: 220px; flex: 1; }
.el-filters select, .el-filters input[type=date] { width: auto; }
.aff-row.el-row { grid-template-columns: 150px minmax(0, 2.4fr) 130px 120px 130px 110px; }
.aff-row.el-row-ev { grid-template-columns: 150px 140px minmax(0, 1.6fr) 120px minmax(0, 1.6fr); }
.el-event > summary { list-style: none; cursor: pointer; }
.el-event > summary::-webkit-details-marker { display: none; }
.el-pre { background: rgba(127, 127, 127, .1); color: inherit; border-radius: 8px; padding: 10px 12px; font-size: 12px; overflow: auto; max-height: 360px; white-space: pre-wrap; word-break: break-word; margin: 6px 0 12px; }
.el-kvs { display: grid; gap: 6px; margin-bottom: 12px; }
.el-kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.el-h { font-size: 14px; font-weight: 600; margin: 14px 0 4px; }
.el-pager { display: flex; align-items: center; gap: 12px; justify-content: center; }
.el-err { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-block { display: block; }
@media (max-width: 860px) { .aff-row.el-row, .aff-row.el-row-ev { grid-template-columns: 1fr 1fr; } .el-row.aff-row-head { display: none; } }
