/* ============================================================================
   StockCheck — teal colours (chosen 2026-10-01) in the StockPhotoTags interface
   (2026-10-04): a sticky top bar with the menu across the top, rounded cards,
   glowing primary buttons, eyebrow pills, gradient headings and a footer band.
   Light and dark use the same tokens: the theme follows the device
   (prefers-color-scheme) unless the viewer picks Light or Dark in the footer,
   which sets data-theme on <html>.

   The font is self-hosted (the CSP allows fonts from 'self' only).
============================================================================ */

@font-face { font-family: "Nunito Sans"; src: url("../fonts/nunito-sans.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --surface: #ffffff;
    --sunk: #f8fafb;            /* inputs, wells */
    --hover: #eef2f4;
    --border: #e2e7ec;
    --border-strong: #cfd7de;
    --text: #1d2a33;
    --muted: #5f6f7c;
    --faint: #8794a0;

    --accent: #0f766e;          /* teal: buttons, active items, links */
    --accent-hover: #0b5f58;
    --accent-text: #0f766e;
    --accent-soft: #e6f4f2;
    --on-accent: #ffffff;

    --reject: #cf222e;  --reject-bg: #ffebe9;
    --review: #9a6700;  --review-bg: #fff8c5;
    --ready: #1a7f37;   --ready-bg: #dafbe1;
    --info: #4d5d6b;    --info-bg: #eef2f5;
    --on-status: #ffffff;       /* digits on a filled status circle */

    --shadow: 0 1px 3px rgba(29, 42, 51, 0.06);
    --shadow-pop: 0 12px 30px -14px rgba(29, 42, 51, 0.3);
    --grad: linear-gradient(92deg, #0f766e, #0891b2);   /* brand mark, progress, headline words */
    --glow: 0 4px 14px rgba(15, 118, 110, 0.28);          /* under primary buttons */
    --topbar-bg: rgba(255, 255, 255, 0.85);
    --page-glow: rgba(15, 118, 110, 0.07);
    --r: 8px;
    --r-card: 16px;
    --font: "Nunito Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
    --page-max: 1280px;
    --gutter: clamp(16px, 3vw, 32px);
}

/* The dark set — used when the device is dark (unless the viewer chose Light) or when Dark is chosen. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #111417; --surface: #1a1f23; --sunk: #151a1d; --hover: #232a2f;
        --border: #2a3137; --border-strong: #39424a;
        --text: #e3e8ec; --muted: #98a4ad; --faint: #75818b;
        --accent: #14b8a6; --accent-hover: #2dd4bf; --accent-text: #5eead4; --accent-soft: rgba(20, 184, 166, 0.14); --on-accent: #062420;
        --reject: #ff7b72; --reject-bg: rgba(248, 81, 73, 0.15);
        --review: #e3b341; --review-bg: rgba(187, 128, 9, 0.18);
        --ready: #3fb950;  --ready-bg: rgba(46, 160, 67, 0.16);
        --info: #a9b6c1;   --info-bg: rgba(169, 182, 193, 0.10);
        --on-status: #111417;
        --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        --shadow-pop: 0 14px 34px -12px rgba(0, 0, 0, 0.7);
        --grad: linear-gradient(92deg, #14b8a6, #22d3ee);
        --glow: 0 4px 14px rgba(20, 184, 166, 0.28);
        --topbar-bg: rgba(17, 20, 23, 0.8);
        --page-glow: rgba(20, 184, 166, 0.10);
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111417; --surface: #1a1f23; --sunk: #151a1d; --hover: #232a2f;
    --border: #2a3137; --border-strong: #39424a;
    --text: #e3e8ec; --muted: #98a4ad; --faint: #75818b;
    --accent: #14b8a6; --accent-hover: #2dd4bf; --accent-text: #5eead4; --accent-soft: rgba(20, 184, 166, 0.14); --on-accent: #062420;
    --reject: #ff7b72; --reject-bg: rgba(248, 81, 73, 0.15);
    --review: #e3b341; --review-bg: rgba(187, 128, 9, 0.18);
    --ready: #3fb950;  --ready-bg: rgba(46, 160, 67, 0.16);
    --info: #a9b6c1;   --info-bg: rgba(169, 182, 193, 0.10);
    --on-status: #111417;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-pop: 0 14px 34px -12px rgba(0, 0, 0, 0.7);
    --grad: linear-gradient(92deg, #14b8a6, #22d3ee);
    --glow: 0 4px 14px rgba(20, 184, 166, 0.28);
    --topbar-bg: rgba(17, 20, 23, 0.8);
    --page-glow: rgba(20, 184, 166, 0.10);
}

/* ============================================================ base */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(1200px 600px at 50% -10%, var(--page-glow), transparent 60%) fixed var(--bg); color: var(--text); font-family: var(--font); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { color: var(--text); line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
b, strong { font-weight: 700; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
img { max-width: 100%; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.87rem; }
.nowrap { white-space: nowrap; }
.ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.no-scroll { overflow: hidden; }
* { scrollbar-color: var(--border-strong) transparent; }

/* ============================================================ brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand-mark { width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--glow); }
.private-pill { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); background: var(--accent-soft); border-radius: 999px; padding: 2px 9px; }
.private-pill { white-space: nowrap; }
/* The longer name since 2026-10-13 leaves no room for the pill on a phone; the notice line says the same. */
@media (max-width: 440px) { .private-pill:not(.guest-pill) { display: none; } .site-notice { font-size: 0.82rem; } }

/* The early-access line under the menu (Site:Notice, 2026-10-13). */
.site-notice { background: var(--accent-soft); border-bottom: 1px solid var(--border); color: var(--text); font-size: 0.88rem; }
.site-notice-inner { max-width: var(--page-max); margin: 0 auto; padding: 8px var(--gutter); display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.site-notice-inner svg { flex: none; color: var(--accent-text); }
.as-coming { margin: 4px 0 0; }

/* "Continue with Google" (2026-10-13): Google's look — white, a thin border, the four-colour G. */
.google-form { margin: 0; }
.btn-google { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 16px; border: 1px solid var(--border-strong);
    border-radius: var(--r); background: #fff; color: #1f1f1f; font: inherit; font-weight: 700; cursor: pointer; transition: background 0.15s, box-shadow 0.15s; }
.btn-google:hover { background: #f7f8f8; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.btn-google svg { flex: none; }
.lp-actions .google-form, .cta-panel .google-form { display: inline-flex; }
.lp-actions .btn-google { width: auto; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted); font-size: 0.85rem; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.guest-form { display: inline-flex; margin: 0; }

/* ============================================================ top bar (menu across the top) */
.topbar { position: sticky; top: 0; z-index: 100; background: var(--topbar-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: var(--page-max); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 12px; }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-left: auto; }
.nav-form { display: inline-flex; margin: 0; }
.nav-link { padding: 8px 11px; border: 0; border-radius: var(--r); background: none; color: var(--muted); font: inherit; font-size: 0.95rem; font-weight: 600; text-align: left; cursor: pointer; transition: background 0.15s, color 0.15s; }
.nav-link:hover { background: var(--accent-soft); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--accent-soft); color: var(--accent-text); }
.nav-link.signin { color: var(--text); }
.nav-link.logout { color: var(--reject); }
.nav-link.logout:hover { background: var(--reject-bg); color: var(--reject); }
.nav-link.cta { margin-left: 6px; padding: 8px 14px; background: var(--accent); color: var(--on-accent); box-shadow: var(--glow); }
.nav-link.cta:hover { background: var(--accent-hover); color: var(--on-accent); }
.nav-toggle { display: none; margin-left: auto; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--r); background: none; color: var(--text); line-height: 0; cursor: pointer; }
/* Narrow screens: the menu folds behind a button. Signed-in menus are longer, so they fold earlier
   (members at 1000px, the admin's at 1180px); visitors' two links fold only on phones. */
@media (max-width: 760px) {
    .nav-toggle { display: inline-flex; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 10px var(--gutter) 16px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-pop); }
    .nav-links .nav-link { padding: 11px 13px; }
    .nav-links .nav-form, .nav-links .nav-form .nav-link { width: 100%; }
    .topbar.nav-open .nav-links { display: flex; }
    .nav-link.cta { margin-left: 0; text-align: center; }
}
@media (max-width: 1000px) {
    .topbar.member-nav .nav-toggle { display: inline-flex; }
    .topbar.member-nav .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 10px var(--gutter) 16px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-pop); }
    .topbar.member-nav .nav-links .nav-link { padding: 11px 13px; }
    .topbar.member-nav .nav-form, .topbar.member-nav .nav-form .nav-link { width: 100%; }
    .topbar.member-nav.nav-open .nav-links { display: flex; }
}
@media (max-width: 1180px) {
    .topbar.admin-nav .nav-toggle { display: inline-flex; }
    .topbar.admin-nav .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 10px var(--gutter) 16px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-pop); }
    .topbar.admin-nav .nav-links .nav-link { padding: 11px 13px; }
    .topbar.admin-nav .nav-form, .topbar.admin-nav .nav-form .nav-link { width: 100%; }
    .topbar.admin-nav.nav-open .nav-links { display: flex; }
}

/* light / dark / auto (in the footer) */
.theme-switch { display: flex; gap: 2px; width: 210px; padding: 3px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--border); }
.theme-switch button { flex: 1; padding: 4px 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ============================================================ page shell and footer */
.page-shell { flex: 1 0 auto; width: 100%; max-width: var(--page-max); margin: 0 auto; padding: clamp(22px, 3.5vw, 40px) var(--gutter); }
.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 0.88rem; }
.footer-inner { max-width: var(--page-max); margin: 0 auto; padding: 24px var(--gutter); display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; color: var(--text); }
.footer-brand .brand-mark { width: 24px; height: 24px; border-radius: 7px; box-shadow: none; }
.footer-brand .brand-mark svg { width: 13px; height: 13px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent-text); text-decoration: none; }
.footer-note { width: 100%; font-size: 0.8rem; color: var(--faint); }

/* ============================================================ shared blocks: eyebrow pills, gradient words, centred section heads */
.eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border: 1px solid var(--accent-soft); border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.section-head { margin-bottom: 32px; text-align: center; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 { margin: 0 0 10px; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.section-head p { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 1.04rem; line-height: 1.6; }

/* ============================================================ page furniture */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px 20px; margin-bottom: 22px; }
.page-head h1 { margin: 2px 0 6px; font-size: clamp(1.6rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -0.02em; }
.page-head .eyebrow { margin-bottom: 10px; }
.page-head .lead { margin: 0; max-width: 720px; color: var(--muted); }
.back-link { display: inline-block; font-size: 0.87rem; color: var(--muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px; box-shadow: var(--shadow); }
.panel-title { margin: 0 0 12px; font-size: 1.1rem; font-weight: 800; }
.panel-title .small { font-weight: 400; }
.note-panel { margin-top: 18px; background: transparent; box-shadow: none; border-style: dashed; }
.note-panel p { margin: 0; color: var(--muted); }

/* ============================================================ buttons */
.btn-primary-accent, .btn-ghost, .btn-danger {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: var(--r); border: 1px solid transparent;
    font: inherit; font-weight: 700; font-size: 0.95rem; line-height: 1.3; cursor: pointer; text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn-primary-accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: var(--glow); }
.btn-primary-accent:active { transform: translateY(1px); }
.btn-primary-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); text-decoration: none; }
.btn-primary-accent:disabled { opacity: 0.45; cursor: not-allowed; background: var(--accent); box-shadow: none; }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); text-decoration: none; }
.btn-danger { background: var(--reject); border-color: var(--reject); color: var(--on-status); }
.icon-btn { padding: 5px 12px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.icon-btn.danger:hover { color: var(--reject); border-color: var(--reject); background: var(--reject-bg); }
.icon-btn:disabled { opacity: 0.45; cursor: default; }
.link-btn { margin-top: 4px; padding: 0; border: 0; background: none; color: var(--accent-text); font: inherit; font-size: 0.87rem; font-weight: 700; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.danger-zone { margin-top: 26px; text-align: right; }
.danger-text { color: var(--reject) !important; }

/* ============================================================ forms */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"],
input[type="date"], input[type="datetime-local"], input:not([type]), select, textarea {
    width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--r);
    background: var(--sunk); color: var(--text); font: inherit; font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); }
.field { display: grid; gap: 5px; margin-bottom: 14px; }
.field label { font-size: 0.88rem; font-weight: 700; }
.summary-error { margin-bottom: 14px; padding: 10px 14px; border-radius: var(--r); background: var(--reject-bg); color: var(--reject); font-size: 0.93rem; }
.summary-error ul { margin: 0; padding-left: 18px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.choice:last-of-type { border-bottom: 0; }
.choice input { margin-top: 4px; }
code.secret { padding: 3px 9px; border: 1px dashed var(--border-strong); border-radius: 6px; background: var(--sunk); color: var(--text); font-family: var(--mono); font-size: 1rem; user-select: all; }

/* ============================================================ messages */
.banner { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; padding: 10px 14px; border-radius: var(--r); background: var(--info-bg); color: var(--text); font-size: 0.93rem; }
.banner.success { background: var(--ready-bg); }
.banner.error { background: var(--reject-bg); }
.toast { position: fixed; top: 76px; right: 24px; z-index: 2000; min-width: 240px; max-width: min(400px, calc(100vw - 48px)); padding: 13px 18px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 0.92rem; font-weight: 600; box-shadow: var(--shadow-pop); opacity: 0; transform: translateX(120%); transition: opacity 0.3s, transform 0.3s; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--reject); color: var(--on-status); }
.toast.success { background: var(--ready); color: var(--on-status); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-track { height: 8px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.progress-fill { height: 100%; background: var(--grad); transition: width 0.3s; }
.progress-fill.complete { background: var(--ready); }

/* ============================================================ sign-in pages */
.auth-wrap { max-width: 440px; margin: 24px auto; }
.auth-card { padding: 28px; }
.auth-card h1 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 800; }
.auth-card .sub { margin: 0 0 20px; color: var(--muted); font-size: 0.93rem; }

/* ============================================================ landing */
.lp-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: 40px; align-items: center; }
@media (max-width: 900px) { .lp-hero { grid-template-columns: 1fr; } }
.lp-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em; }
.lp-kicker .eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.lp-title { margin: 16px 0 14px; font-size: clamp(2.1rem, 4.4vw, 3rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.025em; }
.lp-lead { margin: 0; max-width: 540px; color: var(--muted); font-size: 1.08rem; }
.lp-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; }
.lp-sample { padding: 16px; }
.lp-sample img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r); display: block; }
.lp-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
@media (max-width: 820px) { .lp-points { grid-template-columns: 1fr; } }
.lp-point h2 { margin: 8px 0 6px; font-size: 1.08rem; font-weight: 800; }
.lp-point p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.lp-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; }

/* ============================================================ stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-label { font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.stat-value { margin: 4px 0 2px; font-size: 1.75rem; font-weight: 800; line-height: 1.2; }
.stat-value.small-values { font-size: 1.4rem; }
.stat-sub { font-size: 0.84rem; color: var(--muted); }
.stat-warn { border-color: var(--review); }
.stat-bad { border-color: var(--reject); }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
/* Grid columns may shrink below their content, so a wide table scrolls inside its panel instead of
   widening the page on a phone. */
.two-col > *, .contact-grid > * { min-width: 0; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

/* ============================================================ tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.data-table th { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); vertical-align: bottom; white-space: nowrap; }
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--sunk); }

/* ============================================================ upload */
.upload-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr); gap: 24px; align-items: start; }
@media (max-width: 960px) { .upload-grid { grid-template-columns: 1fr; } }
.dropzone { padding: 40px 24px; border: 2px dashed var(--border-strong); border-radius: var(--r-card); background: var(--sunk); color: var(--muted); text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.dropzone:hover, .dropzone:focus, .dropzone.over { outline: none; border-color: var(--accent); background: var(--accent-soft); }
.dz-icon { width: 56px; height: 56px; margin-bottom: 14px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; }
.dz-title { margin: 0 0 6px; font-size: 1.2rem; font-weight: 800; color: var(--text); }
.dz-sub { margin: 0 0 16px; font-size: 0.95rem; }
.info-list { display: grid; gap: 4px; margin: 20px 0 0; padding: 0; list-style: none; font-size: 0.87rem; text-align: left; }
.info-list li::before { content: "•"; margin-right: 8px; color: var(--accent-text); }
.side-panel h2 { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-size: 1.05rem; font-weight: 800; }
.side-stat { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 0.93rem; color: var(--muted); }
.side-stat:last-of-type { border-bottom: 0; }
.side-stat b { color: var(--text); }
.side-note { margin: 14px 0 0; font-size: 0.87rem; color: var(--muted); }
.file-list { margin-top: 14px; display: grid; max-height: 420px; overflow-y: auto; }
.up-progress { margin-top: 16px; }
.up-progress .btn-ghost { padding: 5px 12px; font-size: 0.87rem; }
.file-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 160px 150px; gap: 12px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.file-row .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .fsize, .file-row .fstate { font-size: 0.84rem; color: var(--muted); }
.file-row.bad .fstate { color: var(--reject); }
@media (max-width: 700px) { .file-row { grid-template-columns: minmax(0, 1fr) 70px; } .file-row .progress-track, .file-row .fstate { grid-column: 1 / -1; } }
.ai-option { display: flex; gap: 12px; align-items: flex-start; max-width: 780px; margin: 2px 0 18px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r); background: var(--sunk); cursor: pointer; font-size: 0.93rem; }
.ai-option input { margin-top: 4px; flex: none; }

/* ============================================================ batch report (StockPhotoTags' album layout) */
.album-back { margin-bottom: 10px; }
.album-head { margin-bottom: 20px; }
.album-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.album-banner .ab-actions { flex-basis: 100%; justify-content: flex-start; }
.ab-title { min-width: 0; }
.ab-title h1 { margin: 0 0 4px; font-size: clamp(1.35rem, 2.2vw, 1.6rem); font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.ab-meta { color: var(--muted); font-size: 0.92rem; }
.ab-status { display: flex; flex: 0 1 460px; align-items: center; justify-content: flex-end; gap: 12px; margin-left: auto; }
.ab-status .progress-line { flex: 1; margin: 0; font-size: 0.87rem; }
.album-head .progress-detail { margin-top: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: var(--hover); color: var(--muted); font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--ready-bg); color: var(--ready); }
.badge-warning { background: var(--review-bg); color: var(--review); }
.badge-warning .dot { animation: pulse 1.4s infinite; }
.badge-danger { background: var(--reject-bg); color: var(--reject); }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.gallery-panel { margin-bottom: 20px; }
.gallery-panel .summary-counts { margin: -6px 0 18px; }
.summary-counts { display: flex; flex-wrap: wrap; gap: 22px; border-bottom: 1px solid var(--border); }
.count-chip { display: inline-flex; align-items: center; gap: 7px; margin-bottom: -1px; padding: 10px 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.count-chip b { order: 2; min-width: 22px; padding: 0 7px; border-radius: 10px; background: var(--hover); color: var(--muted); font-size: 0.78rem; text-align: center; }
.count-chip:hover { color: var(--text); }
.count-chip.active { color: var(--text); font-weight: 800; border-bottom-color: var(--accent); }
.c-reject { color: var(--reject); } .c-review { color: var(--review); } .c-ready { color: var(--ready); }
.c-pending { color: var(--accent-text); } .c-failed { color: var(--faint); }
.count-chip.c-reject, .count-chip.c-review, .count-chip.c-ready, .count-chip.c-pending, .count-chip.c-failed, .count-chip.c-waiting { color: var(--muted); }
.count-chip.active.c-reject, .count-chip.active.c-review, .count-chip.active.c-ready { color: var(--text); }
.progress-line { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.progress-line .progress-track { flex: 1; }
.progress-detail { margin-top: 8px; color: var(--muted); font-size: 0.87rem; overflow-wrap: anywhere; }
.keep-tick { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); color: var(--muted); font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.keep-tick svg { opacity: 0.25; }
.keep-tick:hover { border-color: var(--ready); color: var(--text); }
.keep-tick.on { border-color: var(--ready); background: var(--ready-bg); color: var(--ready); }
.keep-tick.on svg { opacity: 1; }
/* ---- album settings */
.album-settings { margin-bottom: 20px; scroll-margin-top: 20px; }
.album-settings > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; cursor: pointer; list-style: none; }
.album-settings > summary::-webkit-details-marker { display: none; }
.album-settings > summary::before { content: "▸"; color: var(--muted); transition: transform 0.15s; }
.album-settings[open] > summary::before { transform: rotate(90deg); }
.album-settings[open] > summary { margin-bottom: 14px; }
.as-title { font-size: 1.2rem; font-weight: 800; }
.as-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 8px 28px; margin: 0; padding: 0; border: 0; min-width: 0; }
.as-fields:disabled { opacity: 0.75; }
.as-section h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 800; }
.as-section h3 .small { font-weight: 400; margin-left: 4px; }
.as-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 1.02rem; line-height: 1.5; }
.as-detail { color: var(--muted); font-size: 0.95rem; }
.as-item input { margin-top: 5px; flex: none; width: 17px; height: 17px; }
.as-fields:disabled .as-item { cursor: default; }
.as-sub { margin-left: 24px; }
.as-strict { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 10px 0 4px; font-size: 1rem; }
.as-strict label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.cost-line { margin: 16px 0 12px; padding: 10px 14px; border-radius: var(--r); background: var(--sunk); border: 1px solid var(--border); font-size: 1rem; }
@media (max-width: 520px) { .as-fields { grid-template-columns: 1fr; } }

.ai-badge { display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 0.78rem; font-weight: 700; vertical-align: 2px; }

/* The photos: one card per row (owner, 2026-10-04), the photo on the left and its report on the right,
   with a coloured left edge by verdict, in StockPhotoTags' card style. */
.check-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.check-card { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 0 24px; min-width: 0; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow); scroll-margin-top: 84px; transition: border-color 0.18s, box-shadow 0.18s; }
.check-card:hover { box-shadow: var(--shadow-pop); }
.check-card.st-reject { border-left-color: var(--reject); }
.check-card.st-review { border-left-color: var(--review); }
.check-card.st-ready { border-left-color: var(--ready); }
.check-card.st-failed { border-left-color: var(--faint); }
.check-card.st-queued, .check-card.st-processing { border-left-color: var(--accent); }
.check-body { flex: 1; min-width: 0; }
.check-media { width: 320px; aspect-ratio: 3 / 2; align-self: start; display: flex; align-items: center; justify-content: center; padding: 0; overflow: hidden; border: 0; border-radius: 10px; background: var(--hover); cursor: zoom-in; }
@media (max-width: 860px) {
    .check-card { grid-template-columns: 220px minmax(0, 1fr); gap: 0 18px; }
    .check-media { width: 220px; }
}
@media (max-width: 560px) {
    .check-card { grid-template-columns: minmax(0, 1fr); gap: 14px 0; }
    .check-media { width: 100%; }
}
.check-media:disabled { cursor: default; }
.check-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-placeholder { display: inline-flex; gap: 8px; align-items: center; font-size: 0.87rem; color: var(--muted); }
.check-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.check-title { min-width: 0; }
.check-title .fname { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.02rem; font-weight: 800; }
.check-title .fmeta { margin-top: 1px; font-size: 0.85rem; color: var(--muted); }

.verdict { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.v-reject::before, .v-review::before, .v-ready::before, .v-failed::before, .v-waiting::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.v-reject { color: var(--reject); background: var(--reject-bg); }
.v-review { color: var(--review); background: var(--review-bg); }
.v-ready { color: var(--ready); background: var(--ready-bg); }
.v-failed { color: var(--muted); background: var(--hover); }
.v-pending { color: var(--accent-text); background: var(--accent-soft); }
.v-waiting { color: var(--muted); background: var(--hover); }
/* A photo waiting in its album: a compact card, not a full report. */
.check-card.st-uploaded { grid-template-columns: 96px minmax(0, 1fr); gap: 0 14px; padding: 12px 14px; }
.check-card.st-uploaded .check-media { width: 96px; height: 96px; aspect-ratio: auto; cursor: default; }
/* ...and its Remove button sits at the right end of the same row. */
.check-card.st-uploaded { grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; }
.check-card.st-uploaded .check-actions { grid-column: 3; grid-row: 1; align-self: center; margin: 0; padding: 0; border: 0; }
@media (max-width: 860px) { .check-card.st-uploaded { grid-template-columns: 96px minmax(0, 1fr) auto; gap: 0 14px; } .check-card.st-uploaded .check-media { width: 96px; } }

.ai-summary { margin: 0 0 8px; color: var(--muted); font-size: 0.93rem; }
.all-clear { margin: 4px 0 10px; color: var(--ready); font-size: 0.93rem; }
.not-checked { margin: 4px 0 10px; padding: 8px 12px; border-radius: var(--r); background: var(--info-bg); color: var(--text); font-size: 0.9rem; line-height: 1.5; }
.check-error { margin: 4px 0 10px; color: var(--reject); }

.findings { list-style: none; margin: 8px 0 10px; padding: 0; display: grid; border-top: 1px solid var(--border); }
.finding { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.93rem; }
.finding .f-icon { margin-top: 1px; line-height: 0; }
.f-title { font-weight: 700; }
.f-group { margin-left: 6px; font-size: 0.78rem; font-weight: 600; color: var(--faint); white-space: nowrap; }
.f-detail { margin-top: 2px; color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.f-fix { margin-top: 3px; font-size: 0.9rem; color: var(--muted); }
.f-fix b { color: var(--text); }
.rel-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.rel-photo { display: block; width: 64px; height: 48px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--sunk); }
.rel-photo:hover { border-color: var(--accent); }
.rel-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.check-card:target { outline: 2px solid var(--accent); outline-offset: 3px; }
.lv-fail .f-icon { color: var(--reject); }
.lv-release .f-icon { color: var(--info); }
.lv-warn .f-icon { color: var(--review); }
.lv-info .f-icon { color: var(--faint); }
.notes { margin-top: 0; border-top: 0; }
.notes .finding { padding: 5px 0; border-bottom: 0; }
.notes .finding .f-title { font-weight: 600; font-size: 0.93rem; }
.f-num { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; margin-right: 8px; border-radius: 999px; background: var(--review); color: var(--on-status); font-size: 0.75rem; font-weight: 800; vertical-align: 1px; }
.f-num.fail { background: var(--reject); }
.possible .f-num { background: #cbd5e1; color: #0e1220; }
.notes .possible .link-btn { margin-top: 2px; }
.lv-pass, .passes .f-icon { color: var(--ready); }
.passes { margin-top: 4px; font-size: 0.9rem; color: var(--muted); }
.passes summary { cursor: pointer; font-weight: 700; color: var(--ready); }
.passes ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 5px; }
.passes li { display: flex; gap: 8px; align-items: flex-start; }
.passes .f-icon { line-height: 0; margin-top: 1px; }
/* Notes that need no action, closed, at the very bottom of a report. */
.more-notes { margin-top: 10px; font-size: 0.9rem; color: var(--muted); }
.more-notes summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.more-notes .notes { margin-top: 6px; }
.check-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }

/* ---- the member's decision per photo, and the sorting script */
.decision { display: inline-flex; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--r); }
.decision button { padding: 5px 11px; border: 0; border-left: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.decision button:first-child { border-left: 0; }
.decision button:hover { background: var(--hover); color: var(--text); }
.decision .d-approved.on { background: var(--ready-bg); color: var(--ready); }
.decision .d-rejected.on { background: var(--reject-bg); color: var(--reject); }
.decision .d-undecided.on { background: var(--hover); color: var(--text); }
.sort-panel { margin-bottom: 20px; scroll-margin-top: 20px; }

/* ---- similar shots */
.similar-panel { margin-bottom: 20px; scroll-margin-top: 20px; }
.similar-panel > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; cursor: pointer; list-style: none; }
.similar-panel > summary::-webkit-details-marker { display: none; }
.similar-panel > summary::before { content: "▸"; color: var(--muted); transition: transform 0.15s; }
.similar-panel[open] > summary::before { transform: rotate(90deg); }
.sim-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px 20px; margin: 12px 0 6px; }
.sim-top p { max-width: 700px; margin: 0; }
.sim-group { padding: 14px 0; border-top: 1px solid var(--border); scroll-margin-top: 20px; }
.sim-group:target { background: var(--accent-soft); margin: 0 -12px; padding: 14px 12px; border-radius: var(--r); }
.sim-head { margin-bottom: 10px; font-size: 0.93rem; }
.sim-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.sim-item { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.sim-item.rec { border-color: var(--ready); box-shadow: inset 0 0 0 1px var(--ready); }
.sim-thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 6px; background: var(--hover); }
.sim-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sim-name { overflow: hidden; font-size: 0.87rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.sim-badge { margin-left: 4px; padding: 0 7px; border-radius: 999px; background: var(--ready-bg); color: var(--ready); font-size: 0.72rem; font-weight: 800; }
.sim-score { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.8rem; }
.sim-score .bad { color: var(--review); font-weight: 700; }
.sim-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: auto; }
.sim-foot form { margin: 0; }
.sim-dec { padding: 1px 8px; border-radius: 999px; background: var(--hover); color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.sim-dec.d-approved { background: var(--ready-bg); color: var(--ready); }
.sim-dec.d-rejected { background: var(--reject-bg); color: var(--reject); }
.sim-line { display: inline-block; margin: 0 0 6px; padding: 2px 10px; border-radius: 999px; background: var(--review-bg); color: var(--review); font-size: 0.82rem; font-weight: 700; }
.sim-line.rec { background: var(--ready-bg); color: var(--ready); }
.sim-line.soft { background: var(--reject-bg); color: var(--reject); }
.sim-line a { color: inherit; text-decoration: underline; }
.sort-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 20px; }
.sort-head .panel-title { margin-bottom: 4px; }
.sort-head p { max-width: 700px; margin: 0; }
.sort-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 10px; }
.dchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.87rem; font-weight: 600; cursor: pointer; }
.dchip:hover { border-color: var(--border-strong); }
.dchip.d-approved b { color: var(--ready); }
.dchip.d-rejected b { color: var(--reject); }
.dchip.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sort-bulk form { display: inline; margin: 0; }
.sort-how { margin-top: 12px; }
.sort-how summary { cursor: pointer; font-weight: 700; color: var(--accent-text); }
.sort-how ul { margin-top: 8px; }

.empty-state { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty-state h2 { margin: 0 0 6px; font-size: 1.3rem; font-weight: 800; color: var(--text); }
.empty-state p { max-width: 460px; margin: 0 auto 18px; }

/* ============================================================ batch list ("My checks", as StockPhotoTags' "My albums") */
.albums-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; margin-bottom: 20px; }
.albums-head h1 { margin: 0 0 4px; font-size: clamp(1.4rem, 2.3vw, 1.6rem); font-weight: 800; letter-spacing: -0.02em; }
.albums-head p { margin: 0; max-width: 640px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.album-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow); transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s; }
.album-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-pop); }
.album-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: var(--hover); }
.album-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.album-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 2px; }
.album-name { min-width: 0; overflow: hidden; color: var(--text); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.album-name:hover { color: var(--accent-text); text-decoration: none; }
.album-count { flex: none; color: var(--muted); font-size: 0.85rem; }
.album-date { margin-top: -8px; }
.album-progress { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); }
.album-progress .progress-track { flex: 1; height: 6px; }
.album-ratio { flex: none; font-variant-numeric: tabular-nums; }
.album-card .mini-counts { margin-top: 0; }
.album-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.album-delete { margin: 0 0 0 auto; }
.icon-btn.accent { border-color: var(--accent); color: var(--accent-text); }
.mc { padding: 1px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--hover); }
.mc.c-reject { background: var(--reject-bg); } .mc.c-review { background: var(--review-bg); } .mc.c-ready { background: var(--ready-bg); }
.mini-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.link-danger { padding: 0; border: 0; background: none; color: var(--reject); font: inherit; font-weight: 700; cursor: pointer; }
.link-danger:hover { text-decoration: underline; }

/* ============================================================ photo viewer (always dark: photos are judged on a neutral dark) */
.viewer { position: fixed; inset: 0; z-index: 1600; display: flex; flex-direction: column; background: rgba(13, 16, 18, 0.96); color: #e8edf0; }
.viewer-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.viewer-name { flex: 1; min-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.viewer-toggle { display: inline-flex; gap: 8px; align-items: center; font-size: 0.9rem; cursor: pointer; }
.viewer .icon-btn { background: transparent; color: #e8edf0; border-color: rgba(255, 255, 255, 0.28); }
.viewer .icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
.viewer-stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: auto; }
.viewer-frame { position: relative; line-height: 0; }
.viewer-frame img { display: block; max-width: calc(100vw - 32px); max-height: calc(100vh - 150px); }
.viewer-frame canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.viewer-legend { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: center; padding: 10px 16px 16px; font-size: 0.86rem; }
.viewer-legend .muted { color: #9eabb4; }
.viewer-legend i { display: inline-block; width: 14px; height: 14px; margin-right: 6px; border-radius: 3px; vertical-align: -2px; }
.viewer-legend .shake-note { color: #fbbf24; font-weight: 700; }

/* ============================================================ help and prose */
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .help-grid { grid-template-columns: 1fr; } }
.help-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.help-list:last-child { margin-bottom: 0; }
.help-list li .verdict { margin-right: 8px; }
.help-list.plain { list-style: disc; padding-left: 20px; gap: 5px; }
.help-dl dt { margin-top: 12px; font-weight: 800; }
.help-dl dt:first-child { margin-top: 0; }
.help-dl dd { margin: 3px 0 0; color: var(--muted); }
.prose h2 { margin: 22px 0 6px; font-size: 1.1rem; font-weight: 800; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0; color: var(--muted); }

/* ============================================================ site pages: admin tabs, FAQ, how it works, contact, legal */
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 0.72rem; font-weight: 800; line-height: 1; vertical-align: 1px; }
.admin-tabs { flex-wrap: wrap; gap: 4px 22px; margin: -6px 0 22px; }
/* The admin sections row at the top of every admin page, and the admin sign-in page. */
.admin-subnav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -6px 0 22px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow); }
.admin-tab { padding: 7px 12px; border-radius: var(--r); color: var(--muted); font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.admin-tab:hover { background: var(--accent-soft); color: var(--text); text-decoration: none; }
.admin-tab.active { background: var(--accent-soft); color: var(--accent-text); }
.admin-session { margin-left: auto; padding: 0 8px; font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.admin-session.soon { color: var(--review); font-weight: 700; }
@media (max-width: 760px) { .admin-session { margin-left: 0; width: 100%; white-space: normal; } }
.admin-auth { margin-top: 40px; }
.admin-auth-head { text-align: center; margin-bottom: 18px; }
.admin-auth-head h1 { margin: 10px 0 6px; font-size: 1.6rem; font-weight: 800; }
.admin-auth-head .sub { margin: 0; color: var(--muted); font-size: 0.93rem; }
.admin-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--review); background: var(--review-bg); color: var(--review); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; }
.faq-group { margin-bottom: 26px; }
.faq-group > h2 { margin: 0 0 10px; font-size: 1.15rem; font-weight: 800; }
.faq-item { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); margin-bottom: 8px; }
.faq-item summary { padding: 13px 16px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--muted); font-weight: 800; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-a { padding: 0 16px 14px; color: var(--muted); }
.faq-item .faq-a p { margin: 0 0 8px; }
.faq-item .faq-a p:last-child { margin-bottom: 0; }
.steps { display: grid; gap: 16px; counter-reset: step; }
.step { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; align-items: start; }
.step-num { width: 44px; height: 44px; border-radius: 14px; background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; box-shadow: var(--glow); }
.step h2 { margin: 2px 0 6px; font-size: 1.12rem; font-weight: 800; }
.step p { margin: 0; color: var(--muted); }
.step ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.check-grid .panel { padding: 18px; }
.check-grid h3 { margin: 8px 0 4px; font-size: 1rem; font-weight: 800; }
.check-grid p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.cta-panel { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; justify-content: space-between; }
.cta-panel h2 { margin: 0 0 4px; font-size: 1.2rem; font-weight: 800; }
.cta-panel p { margin: 0; color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.field textarea, .field select { width: 100%; }
.field textarea { min-height: 150px; resize: vertical; }
.msg-list { display: grid; gap: 12px; }
.msg { padding: 16px 18px; }
.msg.unread { border-left: 4px solid var(--accent); }
.msg.handled { opacity: 0.75; }
.msg-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 12px; }
.topic-pill { padding: 1px 9px; border-radius: 999px; background: var(--hover); color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.topic-pill.password { background: var(--review-bg); color: var(--review); }
.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 0.88rem; font-weight: 700; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 8px; } }
.legal h2 { margin: 24px 0 8px; font-size: 1.1rem; font-weight: 800; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--text); line-height: 1.65; }
.legal ul { padding-left: 20px; }

/* The admin overview (StockPhotoTags' layout): what needs attention, then three 14-day trend cards.
   One series per card in the accent; the grid line and text use text tokens. */
.attention { margin: 0 0 18px; padding: 16px 18px; border: 1px solid var(--review); border-radius: var(--r-card); background: var(--review-bg); }
.attention h2 { margin: 0 0 6px; font-size: 1rem; font-weight: 800; color: var(--review); }
.attention ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.stat-link { display: block; color: inherit; }
.stat-link:hover { text-decoration: none; border-color: var(--accent); }
.stat-sub.warn { color: var(--review); font-weight: 700; }
.stat-sub.bad { color: var(--reject); font-weight: 700; }
.trend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 18px 0 22px; }
.trend-grid > * { min-width: 0; }
.trend-card { padding: 14px 16px; }
.trend-h { margin-bottom: 8px; font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.trend-h b { color: var(--text); font-size: 1.1rem; }
.trend-h span { text-transform: none; letter-spacing: 0; font-weight: 600; }
.trend-wrap { position: relative; }
.trend-chart { display: block; width: 100%; height: auto; overflow: visible; }
.trend-chart .base { stroke: var(--border); stroke-width: 1; shape-rendering: crispEdges; }
.trend-chart .bar { fill: var(--accent); pointer-events: none; }
.trend-chart .peak { fill: var(--text); font-size: 10px; font-weight: 700; pointer-events: none; }
.trend-chart .bar-hit { fill: transparent; outline: none; }
.trend-chart .bar-hit.on { fill: var(--accent-soft); }
.trend-chart .bar-hit:focus-visible { stroke: var(--accent); stroke-width: 1.5; }
.trend-foot { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.72rem; color: var(--muted); }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 150px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-pop); font-size: 0.82rem; color: var(--muted); }
.chart-tip .tip-head { color: var(--text); margin-bottom: 4px; }
.chart-tip .tip-head b { font-size: 1.05rem; }
.chart-tip b { color: var(--text); }
.chart-table { margin-top: 10px; }
.chart-table summary { cursor: pointer; color: var(--accent-text); font-size: 0.87rem; font-weight: 700; }

/* ============================================================ pricing */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 22px; }
.price-card { position: relative; display: flex; flex-direction: column; gap: 4px; }
.price-card.featured { border-color: var(--accent); box-shadow: var(--glow); }
.price-badge { position: absolute; top: -11px; left: 20px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.price-name { margin: 0; font-size: 1.05rem; font-weight: 800; }
.price-amount { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.price-amount small { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.price-credits { font-weight: 800; color: var(--accent-text); }
.price-list { list-style: none; margin: 10px 0 16px; padding: 0; display: grid; gap: 5px; color: var(--muted); font-size: 0.9rem; }
.price-card .buy { margin-top: auto; width: 100%; }
.price-card .buy[disabled] { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.price-card .buy[disabled]:hover { background: var(--accent); border-color: var(--accent); }

/* ============================================================ admin */
.tabs { display: flex; gap: 22px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.tab { margin-bottom: -1px; padding: 9px 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--text); font-weight: 800; border-bottom-color: var(--accent); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-bottom: 14px; }
.filter-bar label { display: grid; gap: 5px; min-width: 180px; font-size: 0.85rem; font-weight: 700; }
.kind-pill { padding: 1px 9px; border-radius: 999px; background: var(--hover); color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.k-action { background: var(--accent-soft); color: var(--accent-text); }
.k-admin { background: var(--review-bg); color: var(--review); }
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 18px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-of-type { border-bottom: 0; }
/* The member's Settings page: their own limits for the checks */
.settings-form .setting-row label { font-size: 1rem; }
.settings-form .setting-row .small { font-size: 0.9rem; line-height: 1.5; margin-top: 3px; }
.settings-head { margin: 26px 0 2px; }
.settings-intro { margin: 0 0 4px; font-size: 0.93rem; line-height: 1.5; }
.own-tag { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 0.75rem; font-weight: 700; vertical-align: 2px; }
.toggle-cell { display: flex; gap: 8px; align-items: center; font-weight: 700; cursor: pointer; }
.toggle-cell input { width: 18px; height: 18px; }
@media (max-width: 560px) {
    .setting-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .setting-row input[type="number"], .setting-row select { max-width: 180px; }
}
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input { flex: 1; }
.actions-cell { display: flex; flex-wrap: wrap; gap: 6px; }
.actions-cell form { margin: 0; }

@media print {
    .topbar, .site-footer, .check-actions, .danger-zone { display: none !important; }
    body { display: block; background: #fff; }
}
