/* KDP Press Check — Microsoft Copilot Aesthetic Design Tokens
   Deep obsidian navy canvas (#0b0f19), elevated slate cards (#111726),
   vibrant Copilot electric blue & cyan accents (#4f75ff & #38bdf8),
   and clean modern Segoe UI Variable / Plus Jakarta Sans typography. */

:root {
  --pc-canvas: #0b0f19;
  --pc-card: #111726;
  --pc-raise: #161e31;
  --pc-warm: #1c263d;
  --pc-ink: #f8fafc;
  --pc-strong: #ffffff;
  --pc-muted: #94a3b8;
  --pc-faint: #64748b;
  --pc-rule: rgba(255, 255, 255, 0.08);
  --pc-rule-soft: rgba(255, 255, 255, 0.05);
  --pc-cta: #4f75ff;
  --pc-cta-text: #ffffff;
  --pc-ok: #10b981;
  --pc-ok-bg: rgba(16, 185, 129, 0.12);
  --pc-note: #94a3b8;
  --pc-note-bg: rgba(255, 255, 255, 0.06);
  --pc-issue: #f59e0b;
  --pc-issue-bg: rgba(245, 158, 11, 0.12);
  --pc-fail: #ef4444;
  --pc-fail-bg: rgba(239, 68, 68, 0.12);
  --pc-coral: #4f75ff;
  --pc-coral-soft: rgba(79, 117, 255, 0.5);
  --pc-blue: #38bdf8;
  --pc-band: #080c14;
  --pc-band-dark: #05080e;
  --pc-tick: rgba(255, 255, 255, 0.15);
  --pc-focus: #4f75ff;

  /* Aliased semantic tokens */
  --paper: var(--pc-canvas);
  --paper-raised: var(--pc-card);
  --ink: var(--pc-ink);
  --ink-muted: var(--pc-muted);
  --line: var(--pc-rule);
  --line-strong: var(--pc-rule);
  --accent: var(--pc-coral);
  --accent-ink: var(--pc-coral);
  --accent-fill: var(--pc-coral);
  --accent-fill-text: #ffffff;
  --accent-bg: rgba(79, 117, 255, 0.14);
  --pass: var(--pc-ok);
  --pass-bg: var(--pc-ok-bg);
  --fail: var(--pc-fail);
  --fail-bg: var(--pc-fail-bg);
  --warn: var(--pc-issue);
  --warn-bg: var(--pc-issue-bg);
  --focus: var(--pc-focus);

  --font-display: "Segoe UI Variable", "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "Space Mono", "SFMono-Regular", Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --container: 1200px;
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-soft-dark: 0 8px 32px rgba(0, 0, 0, 0.45);
  --theme-transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --pc-canvas: #0b0f19;
    --pc-card: #111726;
    --pc-raise: #161e31;
    --pc-warm: #1c263d;
    --pc-ink: #f8fafc;
    --pc-strong: #ffffff;
    --pc-muted: #94a3b8;
    --pc-faint: #64748b;
    --pc-rule: rgba(255, 255, 255, 0.08);
    --pc-rule-soft: rgba(255, 255, 255, 0.05);
    --pc-cta: #4f75ff;
    --pc-cta-text: #ffffff;
    --pc-ok: #10b981;
    --pc-ok-bg: rgba(16, 185, 129, 0.12);
    --pc-note: #94a3b8;
    --pc-note-bg: rgba(255, 255, 255, 0.06);
    --pc-issue: #f59e0b;
    --pc-issue-bg: rgba(245, 158, 11, 0.12);
    --pc-fail: #ef4444;
    --pc-fail-bg: rgba(239, 68, 68, 0.12);
    --pc-coral-soft: rgba(79, 117, 255, 0.5);
    --pc-blue: #38bdf8;
    --pc-band: #080c14;
    --pc-band-dark: #05080e;
    --pc-tick: rgba(255, 255, 255, 0.15);

    --accent-fill-text: #ffffff;
    --accent-bg: rgba(79, 117, 255, 0.14);
  }
}

:root[data-theme="light"] {
  --pc-canvas: #f8fafc;
  --pc-card: #ffffff;
  --pc-raise: #f1f5f9;
  --pc-warm: #e2e8f0;
  --pc-ink: #0f172a;
  --pc-strong: #020617;
  --pc-muted: #64748b;
  --pc-faint: #94a3b8;
  --pc-rule: #e2e8f0;
  --pc-rule-soft: #f1f5f9;
  --pc-cta: #3b82f6;
  --pc-cta-text: #ffffff;
  --pc-ok: #10b981;
  --pc-ok-bg: rgba(16, 185, 129, 0.08);
  --pc-note: #64748b;
  --pc-note-bg: rgba(100, 116, 139, 0.08);
  --pc-issue: #d97706;
  --pc-issue-bg: rgba(217, 119, 6, 0.10);
  --pc-fail: #dc2626;
  --pc-fail-bg: rgba(220, 38, 38, 0.08);
  --pc-coral: #3b82f6;
  --pc-coral-soft: #93c5fd;
  --pc-blue: #0284c7;
  --pc-band: #0f172a;
  --pc-band-dark: #020617;
  --pc-tick: #cbd5e1;

  --accent-fill-text: #ffffff;
  --accent-bg: rgba(59, 130, 246, 0.10);
}

:root[data-theme="dark"] {
  --pc-canvas: #0b0f19;
  --pc-card: #111726;
  --pc-raise: #161e31;
  --pc-warm: #1c263d;
  --pc-ink: #f8fafc;
  --pc-strong: #ffffff;
  --pc-muted: #94a3b8;
  --pc-faint: #64748b;
  --pc-rule: rgba(255, 255, 255, 0.08);
  --pc-rule-soft: rgba(255, 255, 255, 0.05);
  --pc-cta: #4f75ff;
  --pc-cta-text: #ffffff;
  --pc-ok: #10b981;
  --pc-ok-bg: rgba(16, 185, 129, 0.12);
  --pc-note: #94a3b8;
  --pc-note-bg: rgba(255, 255, 255, 0.06);
  --pc-issue: #f59e0b;
  --pc-issue-bg: rgba(245, 158, 11, 0.12);
  --pc-fail: #ef4444;
  --pc-fail-bg: rgba(239, 68, 68, 0.12);
  --pc-coral-soft: rgba(79, 117, 255, 0.5);
  --pc-blue: #38bdf8;
  --pc-band: #080c14;
  --pc-band-dark: #05080e;
  --pc-tick: rgba(255, 255, 255, 0.15);

  --accent-fill-text: #ffffff;
  --accent-bg: rgba(79, 117, 255, 0.14);
}

* { box-sizing: border-box; }

.masthead, .dropzone, .result-row, .result-fix, .result-chip, .result-banner,
a.button, .field select, .field input, .filename-display, .flash,
.mode-nav a, .theme-toggle {
  transition: var(--theme-transition);
}
@media (prefers-reduced-motion: reduce) {
  .masthead, .dropzone, .result-row, .result-fix, .result-chip, .result-banner,
  a.button, .field select, .field input, .filename-display, .flash,
  .mode-nav a, .theme-toggle, body {
    transition: none;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overflow-x: hidden;
  max-width: 100vw;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  transition: var(--theme-transition);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

a { color: var(--accent-ink); }

/* faint, fixed crop-mark ticks pinned to the viewport corners —
   the page itself is framed like a printer's press sheet */
.crop-tick {
  position: fixed;
  width: 14px;
  height: 14px;
  border: 1px solid var(--pc-tick);
  pointer-events: none;
  z-index: 1;
}
.crop-tick.tl { top: 14px; left: 14px; border-right: none; border-bottom: none; }
.crop-tick.tr { top: 14px; right: 14px; border-left: none; border-bottom: none; }
.crop-tick.bl { bottom: 14px; left: 14px; border-right: none; border-top: none; }
.crop-tick.br { bottom: 14px; right: 14px; border-left: none; border-top: none; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 24px 80px;
  position: relative;
  z-index: 2;
}

/* ---------- header ---------- */
.announce-bar {
  background: #000000;
  color: rgba(255,255,255,0.85);
  text-align: center;
  padding: 9px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

/* ---------- prose (About / Privacy) ---------- */
.prose { max-width: 680px; margin-top: 8px; }
.prose h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 22px; letter-spacing: -0.3px; color: var(--pc-strong);
  margin: 32px 0 10px;
}
.prose p { font-size: 16px; line-height: 1.65; color: var(--pc-ink); margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 20px; }
.prose li { font-size: 16px; line-height: 1.6; color: var(--pc-ink); margin-bottom: 6px; }
.prose a { color: var(--pc-blue); }

/* ---------- app shell + sidebar ---------- */
.app-shell { display: flex; align-items: stretch; position: relative; z-index: 2; }

.sidebar {
  flex: none;
  width: 256px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  background: var(--pc-canvas);
  border-right: 1px solid var(--pc-rule-soft);
  padding: 14px 10px 0 !important;
  box-sizing: border-box;
  transition: width 0.2s ease;
  z-index: 50;
}
.sidebar-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 4px 6px 14px;
}
.sidebar .mark {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 17px; letter-spacing: -0.3px;
  color: var(--pc-strong); white-space: nowrap; overflow: hidden;
}
.mark-logo { width: 26px; height: 26px; flex: none; display: block; }
.sidebar-toggle {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid var(--pc-coral);
  background: rgba(79, 117, 255, 0.1);
  color: var(--pc-coral);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 180ms ease;
  position: relative;
  box-shadow: 0 1px 4px rgba(79, 117, 255, 0.15);
}

.sidebar-toggle:hover {
  color: #ffffff !important;
  border-color: var(--pc-blue);
  background: var(--pc-coral);
  box-shadow: 0 3px 12px rgba(79, 117, 255, 0.4);
  transform: scale(1.05);
}

.sidebar-toggle:active {
  transform: scale(0.95);
}

.sidebar-toggle svg,
.sidebar-toggle .toggle-arrow-svg,
.sidebar-toggle svg polyline,
.sidebar-toggle svg path {
  width: 18px;
  height: 18px;
  stroke: currentColor !important;
  stroke-width: 2.8px !important;
  fill: none !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Sidebar Pro CTA Banner ──────────────────────────────────── */
.sidebar-pro-banner {
  margin-bottom: 12px;
  padding: 0 2px;
}
.sidebar-pro-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(79, 117, 255, 0.15) 0%, rgba(56, 189, 248, 0.08) 100%);
  border: 1px solid rgba(79, 117, 255, 0.35);
  border-radius: 12px;
  text-decoration: none;
  color: var(--pc-strong) !important;
  transition: all 0.18s ease;
}
.sidebar-pro-btn:hover {
  background: linear-gradient(135deg, rgba(79, 117, 255, 0.25) 0%, rgba(56, 189, 248, 0.15) 100%);
  border-color: var(--pc-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 117, 255, 0.25);
}
.pro-btn-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pro-bolt {
  font-size: 16px;
  color: var(--pc-coral);
  flex-shrink: 0;
}
.pro-btn-texts {
  display: flex;
  flex-direction: column;
}
.pro-btn-title {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--pc-strong);
  display: flex;
  align-items: center;
  gap: 6px;
}
.badge-new {
  font-size: 9px;
  font-weight: 800;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, #4f75ff 0%, #38bdf8 100%);
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.pro-btn-sub {
  font-size: 11px;
  color: var(--pc-muted);
}
.pro-btn-arrow {
  color: var(--pc-coral);
  font-weight: 700;
  font-size: 13px;
}
.mobile-pro-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: linear-gradient(135deg, #4f75ff 0%, #38bdf8 100%);
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
}
.side-pro-highlight {
  color: var(--pc-coral) !important;
  font-weight: 600;
}
.side-pro-highlight svg {
  color: var(--pc-coral);
}

.sidebar-nav {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px;
  padding-right: 2px;
  padding-bottom: 24px !important;
  -webkit-overflow-scrolling: touch;
}
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--pc-rule); border-radius: 3px; }
.sidebar-group {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--pc-faint); margin: 16px 10px 4px;
}
.sidebar-nav .sidebar-group:first-child { margin-top: 4px; }

.side-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: 9px;
  color: var(--pc-muted); text-decoration: none;
  font-size: 14px; white-space: nowrap;
  border: none; background: none; cursor: pointer;
  width: 100%; box-sizing: border-box; font-family: var(--font-body);
  transition: background 0.12s ease, color 0.12s ease;
}
.side-link svg { width: 23px; height: 23px; flex: none; }
.side-link:hover { background: var(--pc-warm); color: var(--pc-strong); text-decoration: none; }
.side-link.is-active { background: var(--pc-issue-bg); color: var(--pc-strong); font-weight: 500; }
.side-link.is-active svg { color: var(--pc-coral); }
.side-pro { color: var(--pc-coral); font-weight: 500; }
.side-pro svg { color: var(--pc-coral); }
.side-pro:not(.is-active):hover { background: var(--pc-issue-bg); }

.pro-badge {
  display: inline-block; margin-left: 8px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px;
  background: var(--pc-coral); color: #ffffff;
  border-radius: 20px; padding: 2px 8px; vertical-align: middle;
}
.button.pro-locked { opacity: 0.85; }
.button.pro-locked:hover { opacity: 1; }

.sidebar-foot {
  flex: 0 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  padding: 10px 0 max(12px, env(safe-area-inset-bottom)) !important;
  margin-top: auto !important;
  border-top: 1px solid var(--pc-rule-soft) !important;
  background: var(--pc-canvas) !important;
  position: sticky !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  z-index: 30 !important;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.16) !important;
}
.sidebar-foot .side-link,
.sidebar-foot button.side-link,
.sidebar-foot a.side-link {
  transform: none !important;
  transition: background 0.12s ease, color 0.12s ease !important;
  font-family: var(--font-body);
}
.sidebar-foot .side-link:hover,
.sidebar-foot button.side-link:hover,
.sidebar-foot a.side-link:hover {
  transform: none !important;
  box-shadow: none !important;
}
.sidebar-foot form {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}
.side-theme { text-align: left; }
.side-theme .theme-toggle {
  position: relative; width: 20px; height: 20px;
  border: none; background: none; flex: none; overflow: visible;
}
.side-theme .theme-toggle:hover { background: none; }

/* collapsed rail */
.app-shell.is-collapsed .sidebar {
  width: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
  padding: 16px 8px !important;
}
.app-shell.is-collapsed .sidebar-label { display: none !important; }
.app-shell.is-collapsed .sidebar-head {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 4px 0 16px;
}
.app-shell.is-collapsed .sidebar-toggle svg,
.app-shell.is-collapsed .sidebar-toggle .toggle-arrow-svg {
  transform: rotate(180deg) !important;
}
.app-shell.is-collapsed .side-link {
  justify-content: center !important;
  padding: 10px 0 !important;
}
.app-shell.is-collapsed .sidebar-group {
  height: 1px !important;
  padding: 0 !important;
  margin: 10px 8px !important;
  background: var(--pc-rule-soft) !important;
  border: none !important;
  overflow: hidden !important;
}
.app-shell.is-collapsed .sidebar-pro-banner {
  padding: 0 !important;
  margin-bottom: 12px !important;
}
.app-shell.is-collapsed .sidebar-pro-btn {
  justify-content: center !important;
  padding: 10px 0 !important;
}
.app-shell.is-collapsed .sidebar-pro-btn .pro-btn-texts,
.app-shell.is-collapsed .sidebar-pro-btn .pro-btn-arrow {
  display: none !important;
}


/* fixed light/dark toggle in the top-right corner.
   Uses .theme-toggle.theme-fab (higher specificity) so it beats the base
   .theme-toggle { position: relative } rule defined later in this file. */
/* Sits at the top-right and scrolls away with the page (absolute, not fixed),
   so it doesn't follow the reader down the page. */
.theme-toggle.theme-fab {
  position: absolute;
  top: 46px;
  right: 24px;
  z-index: 45;
  background: var(--pc-canvas);
  box-shadow: var(--shadow-soft);
}

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-main-inner {
  flex: 1; width: 100%; max-width: 1040px; margin: 0 auto;
  padding: 40px 32px 72px; box-sizing: border-box;
}

/* mobile top bar + drawer */
.mobile-bar { display: none; }
.sidebar-backdrop { display: none; }
@media (max-width: 860px) {
  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px; border-bottom: 1px solid var(--pc-rule-soft);
    position: sticky; top: 0; background: var(--pc-canvas); z-index: 40;
  }
  .hamburger { border: none; background: none; color: var(--pc-strong); cursor: pointer; padding: 4px; display: inline-flex; }
  .mobile-mark { display: flex; align-items: center; gap: 8px; flex: 1; font-family: var(--font-display); font-size: 16px; color: var(--pc-strong); text-decoration: none; }
  .mobile-back-arrow { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: var(--pc-strong); text-decoration: none; cursor: pointer; padding: 4px; flex-shrink: 0; }
  .mobile-back-arrow:hover { color: var(--pc-ink); }
  .theme-toggle.theme-fab { display: none !important; }
  .app-shell.is-open .mobile-mark { display: none; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh;
    z-index: 60; width: 260px;
    display: flex; flex-direction: column; overflow: hidden;
    transform: translateX(-100%); transition: transform 0.25s ease;
    box-shadow: 6px 0 30px rgba(0,0,0,0.22);
    padding: 14px 10px 0;
  }
  .app-shell.is-open .sidebar { transform: none; }
  /* collapse state is ignored on mobile: always full labels in the drawer */
  .app-shell.is-collapsed .sidebar { width: 260px; }
  .app-shell.is-collapsed .sidebar-label { display: inline; }
  .app-shell.is-collapsed .side-link { justify-content: flex-start; padding: 9px 10px; }
  .app-shell.is-collapsed .sidebar-group { height: auto; padding: 0; margin: 16px 10px 4px; border-top: none; }
  .sidebar-toggle { display: none; }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 55; }
  .app-shell.is-open .sidebar-backdrop { display: block; }
  .app-main-inner { padding: 24px 16px 56px; }
}

/* ---------- site footer (every page, theme-aware) ---------- */
.site-footer {
  background: var(--pc-warm);
  color: var(--pc-ink);
  border-top: 1px solid var(--pc-rule-soft);
  position: relative;
  z-index: 2;
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 3rem 24px 2rem;
}

/* ── Brand Mission Section ── */
.footer-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-hero {
  align-items: start;
}
.footer-brand { flex: 1; }
.footer-tagline { max-width: 500px; }
.footer-newsletter {
  display: flex;
  flex-direction: column;
}
.footer-newsletter-form {
  display: flex;
  gap: 8px;
  margin: 0;
}
.footer-newsletter-input {
  flex: 1;
  background: var(--pc-card);
  border: 1px solid var(--pc-rule);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--pc-ink);
  font-size: 14px;
  font-family: var(--font-body);
}
.footer-newsletter-input::placeholder { color: var(--pc-faint); }
.footer-newsletter-input:focus-visible { outline: 2px solid var(--pc-coral); outline-offset: 1px; }
.footer-newsletter-btn {
  flex: none;
  background: var(--pc-coral);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.footer-newsletter-btn:hover {
  background: #ff6845;
  transform: translateY(-1px);
}

/* ── Navigation Grid ── */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-column-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--pc-strong);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-column a {
  color: var(--pc-ink);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.footer-column a:hover {
  color: var(--pc-coral);
  text-decoration: underline;
}
.footer-column ul li {
  margin-bottom: 0.5rem;
}

/* ── Social Links ── */
.footer-social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--pc-raise);
  border-radius: 6px;
  color: var(--pc-ink);
  transition: all 0.2s ease;
  text-decoration: none;
}
.footer-social-link:hover {
  background: var(--pc-coral);
  color: white;
  transform: translateY(-2px);
}

/* ── Footer Bottom ── */
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--pc-rule-soft);
}

@media (max-width: 900px) {
  .footer-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .footer-inner {
    padding: 2rem 16px 1.5rem;
  }
  .footer-section {
    gap: 1.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-newsletter-form {
    flex-direction: column;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--pc-canvas);
  margin-bottom: 40px;
}
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0 12px;
  flex-wrap: wrap;
}
.masthead .mark {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--pc-strong);
}
.mark-dot {
  width: 9px;
  height: 9px;
  background: var(--pc-coral);
  display: inline-block;
  flex-shrink: 0;
}

.masthead-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.mode-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-family: var(--font-body);
  font-size: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--pc-rule-soft);
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--pc-rule);
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  color: var(--pc-ink);
  flex-shrink: 0;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.25s ease, transform 0.2s ease;
}
.theme-toggle:hover { border-color: var(--pc-strong); background: var(--pc-warm); }
.theme-toggle:active { transform: scale(0.92); }

/* both icons stacked; opacity + rotate crossfade so exactly one shows per theme */
.theme-toggle svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.theme-icon-moon { transform: translate(-50%, -50%) rotate(0deg) scale(1); opacity: 1; }
.theme-icon-sun  { transform: translate(-50%, -50%) rotate(-90deg) scale(0.3); opacity: 0; }
:root[data-theme="dark"] .theme-toggle { color: #ffffff; }
:root[data-theme="dark"] .theme-icon-moon { transform: translate(-50%, -50%) rotate(90deg) scale(0.3); opacity: 0; }
:root[data-theme="dark"] .theme-icon-sun  { transform: translate(-50%, -50%) rotate(0deg) scale(1); opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .theme-toggle svg, .theme-toggle { transition: none; }
}

.cta-pill {
  display: inline-flex;
  align-items: center;
  background: var(--pc-cta);
  color: var(--pc-cta-text);
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.cta-pill:hover { opacity: 0.85; }

.mode-nav a {
  color: var(--pc-muted);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease;
}
.mode-nav a:hover { color: var(--pc-strong); }
.mode-nav a.is-active {
  color: var(--pc-strong);
  border-bottom-color: var(--pc-strong);
}

/* ---------- form fields (cover-check inputs) ---------- */
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 28px 0;
}
.field-grid .field-full { grid-column: 1 / -1; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--pc-muted);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 8px;
}
.field select,
.field input[type=number] {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--pc-ink);
  background: var(--pc-card);
  border: 1px solid var(--pc-rule);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-height: 46px;
  box-sizing: border-box;
}
.field select:focus-visible,
.field input:focus-visible {
  outline: 2px solid var(--pc-focus);
  outline-offset: 1px;
}
.field .hint {
  font-size: 12px;
  color: var(--pc-faint);
  margin: 6px 0 0;
}

/* ---------- side-by-side upload + spec panel (Cover) ---------- */
.split-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(260px, 380px);
  gap: 40px;
  align-items: start;
}
@media (max-width: 780px) {
  .split-layout { grid-template-columns: 1fr; gap: 28px; }
}
.spec-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.spec-readout {
  border: 1px solid var(--pc-rule-soft);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: var(--pc-raise);
}
.spec-readout-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--pc-muted);
  margin: 0 0 6px;
}
.spec-readout-value {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--pc-strong);
}
.spec-readout-note {
  font-size: 12px;
  color: var(--pc-faint);
  margin: 4px 0 0;
}

/* ---------- two-column page layout ---------- */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.page-layout .col-hero {
  position: sticky;
  top: 32px;
}

@media (max-width: 860px) {
  .page-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .page-layout .col-hero { position: static; }
}

/* ---------- info card ---------- */
.info-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 24px 28px;
  box-shadow: var(--shadow-soft);
}
[data-theme="dark"] .info-card { box-shadow: var(--shadow-soft-dark); }

.info-card + .info-card { margin-top: 16px; }

.info-card h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.info-card ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-muted);
  font-size: 0.88rem;
  line-height: 1.75;
}

/* ---------- hero copy ---------- */
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.hero p {
  color: var(--ink-muted);
  max-width: 56ch;
  margin: 0 0 36px;
  font-size: 1.02rem;
}
.hero p strong { color: var(--ink); }

/* ---------- single-column hero (Home) ---------- */
.hero-single { padding-top: 32px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--pc-coral);
  margin-bottom: 20px;
}
.hero-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 6.5vw, 76px);
  line-height: 1.03;
  letter-spacing: -1.4px;
  color: var(--pc-strong);
  margin: 0 0 24px;
  max-width: 820px;
}
.hero-lead {
  font-size: 18px;
  line-height: 1.5;
  color: var(--pc-muted);
  max-width: 580px;
  margin: 0 0 48px;
}
.upload-form-lg { max-width: 100%; width: 100%; }

.check-strip {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 48px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--pc-faint);
}

/* ---------- Book Preview: two-slot uploader ---------- */
.preview-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 100%;
  width: 100%;
}
@media (max-width: 620px) {
  .preview-slots { grid-template-columns: 1fr; }
}
.pv-slot {
  display: block;
  cursor: pointer;
  border: 1.5px dashed var(--pc-rule);
  border-radius: 16px;
  padding: 36px 20px;
  text-align: center;
  background: var(--pc-card);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pv-slot:hover { border-color: var(--pc-strong); }
.pv-slot.is-optional { border-color: var(--pc-rule-soft); }
.pv-slot.drag-over { border-color: var(--pc-coral); background: var(--pc-issue-bg); }
.pv-slot.has-file { border-style: solid; border-color: var(--pc-ok); }
.pv-slot-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--pc-strong);
  margin-bottom: 8px;
}
.pv-slot.is-optional .pv-slot-kicker { color: var(--pc-muted); }
.pv-slot-sub { font-size: 13px; color: var(--pc-muted); }
.pv-slot-sub.faint { color: var(--pc-faint); }
.pv-slot-name {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--pc-strong);
  margin-bottom: 6px;
  word-break: break-all;
}
.pv-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: inherit; color: var(--pc-blue); text-decoration: underline;
}

/* ---------- Royalty calculator ---------- */
.seg-toggle {
  display: inline-flex;
  border: 1px solid var(--pc-rule);
  border-radius: 32px;
  padding: 4px;
  margin-bottom: 40px;
}
.seg-btn {
  border: none;
  border-radius: 32px;
  padding: 9px 24px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  background: none;
  color: var(--pc-muted);
}
.seg-btn.is-active { background: var(--pc-cta); color: var(--pc-cta-text); }
.calc-grid {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(300px, 1fr);
  gap: 48px;
  align-items: start;
}
@media (max-width: 780px) { .calc-grid { grid-template-columns: 1fr; gap: 32px; } }
.calc-inputs { display: flex; flex-direction: column; gap: 18px; }
.ink-toggle { display: flex; gap: 8px; }
.ink-toggle button {
  flex: 1;
  border: 1px solid var(--pc-rule);
  border-radius: var(--radius-sm);
  padding: 11px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--pc-card);
  color: var(--pc-ink);
}
.ink-toggle button.is-active { border-color: var(--pc-strong); background: var(--pc-warm); }
.big-number {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 64px);
  letter-spacing: -1.2px;
  color: var(--pc-strong);
  line-height: 1;
}
.big-number-row { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.big-number-cap { font-size: 14px; color: var(--pc-muted); }
.cost-bar {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  margin: 28px 0 10px;
  background: var(--pc-rule-soft);
}
.cost-bar-seg { transition: width 0.3s ease; }
.bar-legend {
  display: flex; gap: 24px; flex-wrap: wrap;
  font-size: 13px; color: var(--pc-muted); margin-bottom: 32px;
}
.bar-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }
.breakeven-box {
  border: 1px solid var(--pc-rule-soft);
  border-radius: 12px;
  padding: 18px 20px;
  background: var(--pc-raise);
  margin-bottom: 32px;
  font-size: 15px;
}
.proj-label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--pc-muted); margin: 0 0 12px;
}
.proj-row {
  display: flex; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--pc-rule-soft);
  font-size: 15px;
}
.proj-row .proj-copies { color: var(--pc-muted); }
.proj-row .proj-earn { font-family: var(--font-mono); color: var(--pc-strong); }
.kd-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0; }
.kd-card { border: 1px solid var(--pc-rule); border-radius: 12px; padding: 18px 20px; }
.kd-card.is-best { border-color: var(--pc-ok); }
.kd-card-label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--pc-muted); margin-bottom: 6px;
}
.kd-card-value { font-family: var(--font-mono); font-size: 22px; color: var(--pc-strong); }
.kd-card-note { font-size: 12px; color: var(--pc-faint); margin-top: 4px; }
.kd-warn {
  border: 1px solid var(--pc-issue);
  border-radius: 12px;
  padding: 14px 18px;
  background: var(--pc-issue-bg);
  font-size: 14px;
  color: var(--pc-ink);
}

/* ---------- Page estimator ---------- */
.est-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(280px, 420px);
  gap: 40px;
  align-items: start;
}
@media (max-width: 800px) { .est-grid { grid-template-columns: 1fr; gap: 28px; } }
.est-selects { display: flex; gap: 18px; margin-top: 20px; flex-wrap: wrap; }
.est-selects .field { flex: 1; min-width: 160px; }
.est-card {
  border: 1px solid var(--pc-rule-soft);
  border-radius: 22px;
  padding: 32px;
  background: var(--pc-raise);
}
.est-card-label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--pc-muted); margin-bottom: 16px;
}
.est-big {
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 72px); line-height: 1; letter-spacing: -1.4px;
  color: var(--pc-strong);
}
.est-big-cap { font-size: 14px; color: var(--pc-muted); margin: 6px 0 28px; }
.est-rows { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.est-row { display: flex; justify-content: space-between; }
.est-row.ruled { border-bottom: 1px solid var(--pc-rule-soft); padding-bottom: 12px; }
.est-row .est-k { color: var(--pc-muted); }
.est-row .est-v { font-family: var(--font-mono); color: var(--pc-strong); }
.est-placeholder {
  border: 1px dashed var(--pc-rule-soft);
  border-radius: 22px;
  padding: 32px;
  color: var(--pc-faint);
  font-size: 14px;
  line-height: 1.6;
}
.est-note {
  margin: 20px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--pc-muted);
  border-top: 1px solid var(--pc-rule-soft);
  padding-top: 16px;
}

/* ---------- Error decoder ---------- */
.decoder-wrap { max-width: 760px; }
.decoder-input {
  width: 100%;
  min-height: 120px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--pc-ink);
  background: var(--pc-card);
  border: 1px solid var(--pc-rule);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-sizing: border-box;
  resize: vertical;
}
.decoder-input:focus-visible { outline: 2px solid var(--pc-focus); outline-offset: 1px; }
.decoder-examples {
  display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 4px;
}
.decoder-example {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.4px;
  border: 1px solid var(--pc-rule); border-radius: 20px;
  padding: 6px 12px; cursor: pointer; background: var(--pc-card); color: var(--pc-muted);
}
.decoder-example:hover { border-color: var(--pc-strong); color: var(--pc-ink); }
.decoder-results { margin-top: 32px; display: flex; flex-direction: column; gap: 18px; }
.decoder-card {
  border: 1px solid var(--pc-rule-soft); border-radius: 16px;
  padding: 24px; background: var(--pc-card);
  border-left: 3px solid var(--pc-coral);
}
.decoder-card.is-general { border-left-color: var(--pc-note); }
.decoder-card-title {
  font-family: var(--font-display); font-size: 19px; letter-spacing: -0.3px;
  color: var(--pc-strong); margin: 0 0 14px;
}
.decoder-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--pc-muted); margin: 0 0 6px;
}
.decoder-cause { font-size: 15px; line-height: 1.55; color: var(--pc-ink); margin: 0 0 16px; }
.decoder-fix { font-size: 15px; line-height: 1.6; color: var(--pc-ink); margin: 0 0 16px; }
.decoder-fix ol { margin: 6px 0 0; padding-left: 20px; }
.decoder-fix li { margin-bottom: 6px; }
.decoder-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; color: var(--pc-cta-text);
  background: var(--pc-cta); border-radius: 32px; padding: 9px 18px; text-decoration: none;
}
.decoder-link:hover { text-decoration: none; opacity: 0.9; }
.decoder-empty {
  border: 1px dashed var(--pc-rule-soft); border-radius: 16px;
  padding: 28px; color: var(--pc-faint); font-size: 14px; line-height: 1.6;
}

/* ---------- Keyword & metadata linter ---------- */
.lint-grid {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(300px, 1fr);
  gap: 44px;
  align-items: start;
}
@media (max-width: 820px) { .lint-grid { grid-template-columns: 1fr; gap: 32px; } }
.lint-inputs { display: flex; flex-direction: column; gap: 16px; }
.lint-kw-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--pc-muted); margin: 8px 0 2px;
}
.lint-kw-count { color: var(--pc-faint); }
.lint-kw-row { display: flex; align-items: center; gap: 10px; }
.lint-kw-num {
  font-family: var(--font-mono); font-size: 12px; color: var(--pc-faint);
  width: 16px; flex: none; text-align: right;
}
.lint-kw-row input {
  flex: 1; width: 100%;
  font-family: var(--font-body); font-size: 15px; color: var(--pc-ink);
  background: var(--pc-card); border: 1px solid var(--pc-rule);
  border-radius: var(--radius-sm); padding: 10px 12px; box-sizing: border-box;
}
.lint-kw-row input:focus-visible { outline: 2px solid var(--pc-focus); outline-offset: 1px; }

.lint-summary {
  border: 1px solid var(--pc-rule-soft); border-radius: 16px;
  padding: 20px 22px; background: var(--pc-raise); margin-bottom: 20px;
}
.lint-summary-big {
  font-family: var(--font-display); font-size: 28px; letter-spacing: -0.5px;
  color: var(--pc-strong);
}
.lint-summary-sub { font-size: 14px; color: var(--pc-muted); margin-top: 4px; }
.lint-findings { display: flex; flex-direction: column; gap: 12px; }
.lint-finding {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--pc-rule-soft); border-radius: 12px; padding: 14px 16px;
  background: var(--pc-card);
}
.lint-sev {
  flex: none; font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px;
  text-transform: uppercase; padding: 4px 9px; border-radius: 20px; margin-top: 1px;
}
.lint-sev.issue { background: var(--pc-issue-bg); color: var(--pc-issue); }
.lint-sev.note  { background: var(--pc-note-bg);  color: var(--pc-note); }
.lint-sev.ok    { background: var(--pc-ok-bg);    color: var(--pc-ok); }
.lint-finding-body { flex: 1; }
.lint-finding-field {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.4px;
  color: var(--pc-faint); margin-bottom: 3px;
}
.lint-finding-msg { font-size: 14px; line-height: 1.5; color: var(--pc-ink); }
.lint-placeholder {
  border: 1px dashed var(--pc-rule-soft); border-radius: 16px;
  padding: 28px; color: var(--pc-faint); font-size: 14px; line-height: 1.6;
}

/* ---------- Launch readiness checklist ---------- */
.lr-top {
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.lr-ring-wrap { position: relative; width: 120px; height: 120px; flex: none; }
.lr-ring { width: 120px; height: 120px; transform: rotate(-90deg); }
.lr-ring-bg { fill: none; stroke: var(--pc-rule-soft); stroke-width: 9; }
.lr-ring-fg {
  fill: none; stroke: var(--pc-ok); stroke-width: 9; stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s ease;
}
.lr-ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.lr-score-num { font-family: var(--font-display); font-size: 30px; letter-spacing: -1px; color: var(--pc-strong); line-height: 1; }
.lr-score-lbl { font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--pc-muted); margin-top: 2px; }
.lr-top-text { flex: 1; min-width: 240px; }
.lr-top-head { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.4px; color: var(--pc-strong); margin: 0 0 6px; }
.lr-top-sub { font-size: 14px; color: var(--pc-muted); margin: 0 0 14px; }
.lr-reset { background: none; border: none; padding: 0; cursor: pointer; font-size: 13px; color: var(--pc-blue); text-decoration: underline; }

.lr-section { margin-top: 36px; }
.lr-section-title {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--pc-coral); margin: 0 0 12px;
}
.lr-section-count { color: var(--pc-faint); letter-spacing: 0.5px; }
.lr-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 15px 4px; border-bottom: 1px solid var(--pc-rule-soft); cursor: pointer;
}
.lr-item input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--pc-ok); flex: none; }
.lr-item-body { flex: 1; }
.lr-item-text { font-size: 15px; line-height: 1.45; color: var(--pc-ink); }
.lr-item input:checked ~ .lr-item-body .lr-item-text { color: var(--pc-faint); text-decoration: line-through; }
.lr-item-tool {
  display: inline-block; margin-top: 4px; font-size: 13px; color: var(--pc-blue); text-decoration: none;
}
.lr-item-tool:hover { text-decoration: underline; }
.lr-done {
  margin-top: 28px; border: 1px solid var(--pc-ok); border-radius: 14px;
  padding: 20px 22px; background: var(--pc-ok-bg);
}
.lr-done-head { font-family: var(--font-display); font-size: 20px; color: var(--pc-strong); margin: 0 0 6px; }
.lr-done-sub { font-size: 14px; color: var(--pc-ink); margin: 0; }

/* ---------- Margin advisor ---------- */
.margin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(300px, 1fr);
  gap: 44px;
  align-items: start;
}
@media (max-width: 820px) { .margin-grid { grid-template-columns: 1fr; gap: 32px; } }
.margin-inputs { display: flex; flex-direction: column; gap: 18px; }

/* page diagram */
.page-diagram {
  position: relative;
  width: 190px;
  aspect-ratio: 2 / 3;
  background: var(--pc-card);
  border: 1px solid var(--pc-rule);
  border-radius: 2px 8px 8px 2px;
  box-shadow: var(--shadow-soft);
  margin: 4px 0 8px;
  transition: box-shadow 0.25s ease;
}
.page-spine {
  position: absolute; top: 0; bottom: 0; left: 0;
  background: repeating-linear-gradient(45deg, var(--pc-rule-soft) 0 4px, transparent 4px 8px);
  border-right: 1px solid var(--pc-rule);
}
.page-textblock {
  position: absolute;
  border: 1.5px dashed var(--pc-coral);
  background: var(--pc-issue-bg);
  transition: inset 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.page-diagram-cap {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.4px;
  color: var(--pc-faint);
}

.margin-note {
  border: 1px solid var(--pc-issue); border-radius: 10px;
  padding: 12px 16px; background: var(--pc-issue-bg);
  font-size: 14px; color: var(--pc-ink); margin-top: 4px;
}

/* tier table */
.tier-table { margin-top: 28px; }
.tier-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border: 1px solid var(--pc-rule-soft);
  border-radius: 10px; margin-bottom: 8px; font-size: 15px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.tier-row.is-active {
  border-color: var(--pc-coral);
  background: var(--pc-issue-bg);
}
.tier-range { color: var(--pc-muted); }
.tier-row.is-active .tier-range { color: var(--pc-ink); }
.tier-val { font-family: var(--font-mono); color: var(--pc-strong); }
.tier-badge {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--pc-issue);
  background: var(--pc-card); border: 1px solid var(--pc-coral);
  border-radius: 20px; padding: 2px 8px; margin-left: 10px;
}

/* ---------- Launch-readiness checklist ---------- */
.lr-top {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  border: 1px solid var(--pc-rule-soft); border-radius: 20px;
  padding: 24px 30px; background: var(--pc-raise); margin-bottom: 32px;
}
.lr-ring-wrap { position: relative; width: 120px; height: 120px; flex: none; }
.lr-ring { width: 120px; height: 120px; transform: rotate(-90deg); }
.lr-ring-bg { fill: none; stroke: var(--pc-rule-soft); stroke-width: 8; }
.lr-ring-fg {
  fill: none; stroke: var(--pc-coral); stroke-width: 8; stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.4s ease;
}
.lr-ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.lr-score-num { font-family: var(--font-display); font-size: 26px; letter-spacing: -0.6px; color: var(--pc-strong); }
.lr-score-lbl {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--pc-faint);
}
.lr-top-text { flex: 1; min-width: 200px; }
.lr-top-head { font-family: var(--font-display); font-size: 23px; letter-spacing: -0.4px; color: var(--pc-strong); margin: 0 0 4px; }
.lr-top-sub { font-size: 14px; color: var(--pc-muted); margin: 0 0 12px; }
.lr-reset {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 13px; color: var(--pc-blue); text-decoration: underline;
}

.lr-section { margin-bottom: 28px; }
.lr-section-title {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--pc-coral); margin: 0 0 6px;
}
.lr-section-count { color: var(--pc-faint); }
.lr-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 15px 4px; border-bottom: 1px solid var(--pc-rule-soft); cursor: pointer;
}
.lr-item input { width: 19px; height: 19px; margin-top: 1px; accent-color: var(--pc-ok); flex: none; }
.lr-item-body { flex: 1; }
.lr-item-text { font-size: 15px; line-height: 1.5; color: var(--pc-ink); }
.lr-item input:checked + .lr-item-body .lr-item-text { color: var(--pc-faint); text-decoration: line-through; }
.lr-item-tool { display: inline-block; margin-top: 5px; font-size: 13px; color: var(--pc-blue); text-decoration: none; }
.lr-item-tool:hover { text-decoration: underline; }
.lr-done {
  border: 1px solid var(--pc-ok); border-radius: 14px;
  padding: 18px 22px; background: var(--pc-ok-bg); margin-top: 4px;
  animation: pcIn 0.4s ease;
}
.lr-done-head { font-family: var(--font-display); font-size: 20px; color: var(--pc-strong); margin: 0 0 4px; }
.lr-done-sub { font-size: 14px; color: var(--pc-muted); margin: 0; }
@keyframes pcIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Digital products / templates ---------- */
/* ---------- Pro landing page ---------- */
.pro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 32px 0;
}
.pro-feature {
  border: 1px solid var(--pc-rule-soft);
  border-left: 3px solid var(--pc-coral);
  border-radius: 14px;
  padding: 22px 24px;
  background: var(--pc-card);
}
.pro-feature-kicker {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--pc-coral); margin-bottom: 8px;
}
.pro-feature h3 {
  font-family: var(--font-display); font-weight: 400; font-size: 19px;
  letter-spacing: -0.2px; color: var(--pc-strong); margin: 0 0 8px;
}
.pro-feature p { font-size: 14px; line-height: 1.55; color: var(--pc-muted); margin: 0; }

.pro-ice {
  display: flex; flex-wrap: wrap; gap: 20px;
  border: 1px solid var(--pc-rule-soft); border-radius: 14px;
  padding: 20px 24px; background: var(--pc-raise); margin-bottom: 28px;
}
.pro-ice-item { flex: 1; min-width: 200px; font-size: 14px; line-height: 1.5; color: var(--pc-ink); }
.pro-ice-item strong { color: var(--pc-strong); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.product-card {
  position: relative;
  display: flex; flex-direction: column;
  border: 1px solid var(--pc-rule-soft); border-radius: 18px;
  padding: 26px; background: var(--pc-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); border-color: var(--pc-rule); }
.product-badge {
  position: absolute; top: 18px; right: 18px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.2px;
  text-transform: uppercase; background: var(--pc-coral); color: #17171c;
  padding: 4px 10px; border-radius: 20px;
}
.product-price {
  font-family: var(--font-display); font-size: 34px; letter-spacing: -0.6px;
  color: var(--pc-strong); margin-bottom: 6px;
}
.product-name {
  font-family: var(--font-display); font-size: 19px; letter-spacing: -0.3px;
  color: var(--pc-strong); margin: 0 0 10px;
}
.product-blurb { font-size: 14px; line-height: 1.55; color: var(--pc-muted); margin: 0 0 16px; }
.product-includes { list-style: none; padding: 0; margin: 0 0 22px; }
.product-includes li {
  position: relative; padding-left: 22px; margin-bottom: 8px;
  font-size: 14px; line-height: 1.45; color: var(--pc-ink);
}
.product-includes li::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 12px; height: 7px; border-left: 2px solid var(--pc-ok);
  border-bottom: 2px solid var(--pc-ok); transform: rotate(-45deg);
}
.product-cta { margin-top: auto; }
.product-buy {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; box-sizing: border-box;
  background: var(--pc-cta); color: var(--pc-cta-text);
  border: none; border-radius: var(--radius-pill); padding: 12px 20px;
  font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer;
}
.product-buy:hover { opacity: 0.9; text-decoration: none; }
.product-soon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; box-sizing: border-box;
  background: none; color: var(--pc-faint);
  border: 1px dashed var(--pc-rule); border-radius: var(--radius-pill);
  padding: 12px 20px; font-size: 14px;
}

/* ---------- recommended tools (affiliate box) ---------- */
.rec-tools { margin: 48px 0 8px; }
.rec-tools-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--pc-muted); margin: 0 0 14px;
}
.rec-tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.rec-tool {
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--pc-rule-soft); border-radius: 14px;
  padding: 20px; background: var(--pc-card); text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.rec-tool:hover { transform: translateY(-2px); border-color: var(--pc-rule); box-shadow: var(--shadow-soft); text-decoration: none; }
.rec-tool-name { font-family: var(--font-display); font-size: 17px; color: var(--pc-strong); }
.rec-tool-blurb { font-size: 13.5px; line-height: 1.5; color: var(--pc-muted); }
.rec-tool-cta { margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--pc-blue); }
.rec-tools-note { font-size: 12px; color: var(--pc-faint); margin: 14px 0 0; }

/* ---------- Genre guide ---------- */
.genre-wrap { max-width: 760px; }
.genre-top {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 32px;
}
.genre-top select {
  padding: 12px 40px 12px 14px;
  font-size: 16px;
  font-family: var(--font-display);
  color: var(--pc-ink);
  background: var(--pc-card);
  border: 1px solid var(--pc-rule);
  border-radius: var(--radius-sm);
}
.genre-progress-wrap { flex: 1; min-width: 220px; }
.genre-progress-head {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--pc-muted); margin-bottom: 8px;
}
.genre-bar { height: 6px; border-radius: 3px; background: var(--pc-rule-soft); overflow: hidden; }
.genre-bar-fill { height: 100%; width: 0; background: var(--pc-ok); transition: width 0.3s ease; }
.genre-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 4px; border-bottom: 1px solid var(--pc-rule-soft); cursor: pointer;
}
.genre-item input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--pc-ok); flex: none; }
.genre-item-text { flex: 1; font-size: 15px; line-height: 1.5; color: var(--pc-ink); }
.genre-item input:checked ~ .genre-item-text { color: var(--pc-faint); text-decoration: line-through; }
.genre-chip {
  flex: none; font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px;
  text-transform: uppercase; padding: 3px 10px; border-radius: 20px;
  background: var(--pc-note-bg); color: var(--pc-muted);
}
.genre-chip.is-critical { background: var(--pc-issue-bg); color: var(--pc-issue); }
.genre-done-box {
  margin-top: 24px; border: 1px solid var(--pc-ok); border-radius: 12px;
  padding: 16px 20px; background: var(--pc-ok-bg); font-size: 15px;
}
.genre-empty {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 48px 20px; text-align: center; color: var(--pc-faint);
}

/* ---------- Problem solvers ---------- */
.solver-ctx {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--pc-rule); border-radius: 32px;
  padding: 8px 16px; font-size: 13px; color: var(--pc-muted); margin-bottom: 8px;
}
.solver-ctx strong { color: var(--pc-ink); font-weight: 500; }
.solver-filter { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 40px; }
.filter-chip {
  font-family: var(--font-body); font-size: 14px;
  border: 1px solid var(--pc-rule); border-radius: 32px;
  padding: 9px 18px; cursor: pointer; text-decoration: none;
  background: var(--pc-card); color: var(--pc-ink);
}
.filter-chip:hover { border-color: var(--pc-strong); text-decoration: none; }
.filter-chip.is-active { background: var(--pc-cta); color: var(--pc-cta-text); border-color: var(--pc-cta); }
.solver-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.solver-card {
  border: 1px solid var(--pc-rule-soft); border-radius: 16px;
  padding: 26px; background: var(--pc-card);
  display: flex; flex-direction: column; gap: 14px; position: relative;
}
.solver-featured {
  position: absolute; top: 18px; right: 18px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.2px;
  text-transform: uppercase; background: var(--pc-coral); color: #17171c;
  padding: 4px 10px; border-radius: 20px;
}
.solver-head { display: flex; align-items: center; gap: 14px; }
.solver-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 17px; color: #fff; flex: none;
}
.solver-name { font-size: 17px; color: var(--pc-strong); }
.solver-role {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--pc-issue); margin-top: 2px;
}
.solver-blurb { font-size: 14px; line-height: 1.5; color: var(--pc-muted); margin: 0; flex: 1; }
.solver-plats { display: flex; gap: 8px; flex-wrap: wrap; }
.solver-plat {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px;
  text-transform: uppercase; border: 1px solid var(--pc-rule); border-radius: 20px;
  padding: 5px 12px; color: var(--pc-ink); text-decoration: none;
}
.solver-plat:hover { border-color: var(--pc-strong); text-decoration: none; }
.solver-turnaround { font-family: var(--font-mono); font-size: 11px; color: var(--pc-faint); }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 40px;
  margin-top: 88px;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  border: 1.5px solid rgba(240, 240, 243, 0.12);
  border-radius: 12px;
  padding: 32px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(135deg, rgba(31, 31, 38, 0.3), rgba(31, 31, 38, 0.15));
  backdrop-filter: blur(8px);
  transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  transition: left 500ms ease;
  pointer-events: none;
}

.tool-card:hover {
  border-color: rgba(240, 240, 243, 0.25);
  background: linear-gradient(135deg, rgba(31, 31, 38, 0.5), rgba(31, 31, 38, 0.3));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(-4px);
}

.tool-card:hover::before {
  left: 100%;
}

.tool-card-primary {
  border-color: rgba(255, 119, 89, 0.2);
  background: linear-gradient(135deg, rgba(255, 119, 89, 0.08), rgba(255, 119, 89, 0.04));
}

.tool-card-primary:hover {
  border-color: rgba(255, 119, 89, 0.4);
  background: linear-gradient(135deg, rgba(255, 119, 89, 0.15), rgba(255, 119, 89, 0.08));
  box-shadow: 0 12px 40px rgba(255, 119, 89, 0.1);
}

.tool-card-feature {
  border-color: rgba(51, 102, 153, 0.15);
  background: linear-gradient(135deg, rgba(51, 102, 153, 0.05), rgba(51, 102, 153, 0.02));
}

.tool-card-feature:hover {
  border-color: rgba(51, 102, 153, 0.3);
  background: linear-gradient(135deg, rgba(51, 102, 153, 0.12), rgba(51, 102, 153, 0.06));
}

.tool-card-new {
  border-color: rgba(34, 197, 94, 0.3);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.06));
}

.tool-card-new:hover {
  border-color: rgba(34, 197, 94, 0.5);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.1));
  box-shadow: 0 12px 40px rgba(34, 197, 94, 0.12);
}

.tool-card-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: inline-block;
}

.tool-card-icon-new {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.tool-card-title {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.3px;
  color: var(--pc-strong);
  margin-bottom: 12px;
}

.tool-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--pc-muted);
  margin: 0 0 16px;
  flex: 1;
}

.tool-card-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--pc-ok);
  background: rgba(34, 197, 94, 0.15);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.tool-card-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pc-coral);
  text-decoration: none;
  transition: all 300ms ease;
  display: inline-block;
}
.tool-card:hover .tool-card-link { color: var(--pc-blue); }

/* ---------- upload frame (crop-mark bracket) ---------- */
.dropzone {
  position: relative;
  border: 1.5px dashed var(--pc-rule);
  border-radius: var(--radius-lg);
  padding: 56px 32px;
  text-align: center;
  background: transparent;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.dropzone::before, .dropzone::after,
.dropzone .bracket-r::before, .dropzone .bracket-r::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--pc-strong);
}
.dropzone::before { top: 14px; left: 14px; border-right: none; border-bottom: none; }
.dropzone::after { bottom: 14px; left: 14px; border-right: none; border-top: none; }
.dropzone .bracket-r::before { top: 14px; right: 14px; border-left: none; border-bottom: none; }
.dropzone .bracket-r::after { bottom: 14px; right: 14px; border-left: none; border-top: none; }

.dropzone.is-dragover {
  border-color: var(--pc-coral);
  background: var(--pc-issue-bg);
}

.dropzone .icon {
  width: 38px;
  height: 38px;
  margin: 0 auto 16px;
  color: var(--pc-muted);
  display: block;
}

.dropzone .instructions {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--pc-strong);
  margin: 0 0 12px;
}
.dropzone .instructions .browse {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: normal;
  color: var(--pc-blue);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 14px;
  padding: 0;
}
.dropzone .filehint {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.2px;
  color: var(--pc-faint);
  margin-top: 20px;
}

/* ═══════════════════════════════════════════════════════════
   Modern Premium Dropzone (5 Methods UX)
═══════════════════════════════════════════════════════════ */
.dropzone-modern {
  position: relative;
  border: 2px solid rgba(240, 240, 243, 0.15);
  border-radius: 16px;
  padding: 64px 40px;
  text-align: center;
  background: linear-gradient(135deg, rgba(31, 31, 38, 0.3), rgba(31, 31, 38, 0.15));
  backdrop-filter: blur(12px);
  transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  overflow: hidden;
}

.dropzone-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 600ms ease;
  pointer-events: none;
}

.dropzone-modern:hover {
  border-color: rgba(240, 240, 243, 0.3);
  background: linear-gradient(135deg, rgba(31, 31, 38, 0.5), rgba(31, 31, 38, 0.3));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.dropzone-modern:hover::before {
  left: 100%;
}

.dropzone-modern.is-dragover {
  border-color: var(--pc-coral);
  background: linear-gradient(135deg, rgba(79, 117, 255, 0.18), rgba(56, 189, 248, 0.10));
  box-shadow: 0 16px 48px rgba(79, 117, 255, 0.2);
  transform: scale(1.01);
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, rgba(79, 117, 255, 0.2), rgba(56, 189, 248, 0.15));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pc-coral);
  animation: float-icon 4s ease-in-out infinite;
  transition: all 300ms ease;
  box-shadow: 0 4px 16px rgba(79, 117, 255, 0.15);
}

@keyframes float-icon {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-3px) scale(1.02); }
}

.dropzone-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.dropzone-title {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pc-strong);
}

.dropzone-subtitle {
  display: block;
  font-size: 1rem;
  color: var(--pc-muted);
  line-height: 1.5;
}

.browse-link {
  background: none;
  border: none;
  color: var(--pc-blue);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  transition: color 300ms ease;
  padding: 0;
}

.browse-link:hover {
  color: #ffffff;
}

.dropzone-hint {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--pc-faint);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.filename-display {
  margin-top: 24px;
  background: linear-gradient(135deg, rgba(17, 23, 38, 0.9), rgba(22, 30, 49, 0.9));
  border: 1.5px solid rgba(79, 117, 255, 0.35);
  border-radius: 12px;
  padding: 14px 18px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  backdrop-filter: blur(8px);
  animation: slide-in 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filename-display.show { display: flex; }

.filename-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.filename-info svg {
  flex-shrink: 0;
  color: var(--pc-coral);
}

#file-name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--pc-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-file {
  background: rgba(79, 117, 255, 0.1);
  border: 1px solid rgba(79, 117, 255, 0.25);
  color: var(--pc-coral);
  cursor: pointer;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 300ms ease;
  flex-shrink: 0;
}

.remove-file:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  transform: rotate(90deg);
}

.filename-display .remove {
  background: none;
  border: none;
  color: var(--pc-blue);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-body);
  text-decoration: underline;
  padding: 4px;
}

input[type=file] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
}

.actions { margin-top: 28px; text-align: center; }
.actions-inline {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footnote-inline { font-size: 12px; color: var(--pc-faint); }

button.primary {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #4f75ff 0%, #38bdf8 100%);
  border: none;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  min-height: 50px;
  box-shadow: 0 4px 18px rgba(79, 117, 255, 0.35);
  transition: opacity 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
button.primary:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(79, 117, 255, 0.45);
}
button.primary:disabled,
button.primary-btn:disabled,
.primary:disabled,
.primary-btn:disabled {
  background: var(--pc-rule);
  color: var(--pc-faint);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

button.primary .spinner,
button.primary-btn .spinner,
.primary .spinner,
.primary-btn .spinner,
.btn .spinner,
#submit-btn .spinner {
  display: none !important;
}

button.primary.is-loading .label,
button.primary-btn.is-loading .label,
.primary.is-loading .label,
.primary-btn.is-loading .label,
.btn.is-loading .label,
#submit-btn.is-loading .label {
  display: none !important;
}

button.primary.is-loading .spinner,
button.primary-btn.is-loading .spinner,
.primary.is-loading .spinner,
.primary-btn.is-loading .spinner,
.btn.is-loading .spinner,
#submit-btn.is-loading .spinner {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
}
.spinner-dash {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .spinner-dash { animation: none; border-top-color: rgba(255,255,255,0.7); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Modern Horizontal Dropzone & Responsive Handling */
.dropzone-modern.dropzone-horizontal {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 28px 32px;
  text-align: left;
  min-height: 120px;
  height: auto;
}

.dropzone-modern.dropzone-horizontal .dropzone-icon {
  margin: 0;
  flex-shrink: 0;
}

.dropzone-modern.dropzone-horizontal .dropzone-label {
  align-items: flex-start;
  text-align: left;
  gap: 6px;
}

.dropzone-modern.dropzone-horizontal .dropzone-title {
  font-size: 1.25rem;
}

.dropzone-modern.dropzone-horizontal .dropzone-subtitle {
  font-size: 0.95rem;
}

.dropzone-modern.dropzone-horizontal .dropzone-hint {
  margin-top: 8px;
}

@media (max-width: 768px) {
  .dropzone-modern.dropzone-horizontal {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 24px 16px;
  }
  .dropzone-modern.dropzone-horizontal .dropzone-icon {
    margin: 0 auto;
  }
  .dropzone-modern.dropzone-horizontal .dropzone-label {
    align-items: center;
    text-align: center;
  }
  .dropzone-modern.dropzone-horizontal .filename-display {
    width: 100%;
    margin-top: 12px;
  }
  .actions-inline {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .actions-inline .primary-btn,
  .actions-inline button.primary {
    width: 100%;
    text-align: center;
  }
  .actions-inline .footnote-inline {
    text-align: center;
  }
}

.footnote {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--ink-muted);
  text-align: center;
}

/* ---------- scan-line loading overlay on dropzone ---------- */
.scanline {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
}
.dropzone.is-scanning .scanline {
  opacity: 1;
  animation: scan 1.6s ease-in-out infinite;
}
@keyframes scan {
  0% { top: 0; }
  50% { top: 100%; }
  100% { top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dropzone.is-scanning .scanline { animation: none; opacity: 0.6; top: 50%; }
}

/* ---------- flash / error banner ---------- */
.flash {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 28px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 12px;
}
.flash svg { flex-shrink: 0; margin-top: 1px; color: #ef4444; width: 20px; height: 20px; }

html[data-theme="light"] .flash {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

/* ---------- results page ---------- */
.back-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 14px;
  color: var(--pc-muted);
  margin-bottom: 32px;
  font-family: var(--font-body);
}
.back-link:hover { color: var(--pc-strong); }

.result-banner {
  background: var(--pc-band);
  border-radius: var(--radius-lg);
  padding: 48px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}
.result-banner.is-fail { background: var(--pc-band-dark); }

.result-banner-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.result-banner-copy { max-width: 640px; }
.result-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 18px;
}
.result-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.2vw, 50px);
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.result-sub {
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255,255,255,0.72);
  margin: 0;
  max-width: 56ch;
}
.result-stamp {
  border: 2.5px solid var(--pc-ok);
  color: var(--pc-ok);
  border-radius: 6px;
  padding: 12px 22px;
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
  transform: rotate(-4deg);
  opacity: 0.92;
  flex: none;
  margin-top: 8px;
  white-space: nowrap;
}
.result-banner.is-fail .result-stamp { border-color: #ff7066; color: #ff7066; }

/* publish-readiness gauge */
.readiness-gauge { position: relative; width: 96px; height: 96px; flex: none; }
.readiness-ring { width: 96px; height: 96px; transform: rotate(-90deg); }
.readiness-track { fill: none; stroke: rgba(255, 255, 255, 0.22); stroke-width: 8; }
.readiness-fill {
  fill: none; stroke: var(--pc-ok); stroke-width: 8; stroke-linecap: round;
  transition: stroke-dashoffset 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.result-banner.is-fail .readiness-fill { stroke: var(--pc-coral); }
.readiness-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1;
}
.readiness-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: #ffffff !important;
  line-height: 1;
}
.readiness-pct {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9) !important;
}
.readiness-cap {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75) !important;
  margin-top: 3px;
}

.result-tally {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.16);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}
.result-tally .is-hot { color: #ff7066; }
.result-tally .is-ok { color: #5bcf9e; }

.result-group { margin-top: 56px; }
.result-group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  border-bottom: 1px solid var(--pc-strong);
  padding-bottom: 12px;
  margin-bottom: 4px;
}
.result-group-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--pc-strong);
}
.result-group-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--pc-faint);
}

.result-row {
  display: block;
  border-bottom: 1px solid var(--pc-rule-soft);
}
.result-row-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 4px;
  cursor: pointer;
  list-style: none;
}
.result-row-head::-webkit-details-marker { display: none; }
.result-row-flat .result-row-head { cursor: default; }
.result-chip {
  flex: none;
  width: 58px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  padding: 4px 0;
  border-radius: 4px;
  margin-top: 2px;
}
.result-chip.ok { background: var(--pc-ok-bg); color: var(--pc-ok); }
.result-chip.note { background: var(--pc-note-bg); color: var(--pc-note); }
.result-chip.issue { background: var(--pc-issue-bg); color: var(--pc-issue); }
.result-chip.fail { background: var(--pc-fail); color: #ffffff; }
.result-row-text { flex: 1; }
.result-row-title {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: var(--pc-strong);
}
.result-row-sum {
  display: block;
  font-size: 14px;
  color: var(--pc-muted);
  margin-top: 3px;
}
.result-chev {
  flex: none;
  color: var(--pc-faint);
  font-size: 13px;
  margin-top: 6px;
  transition: transform 150ms ease;
}
details[open] > .result-row-head .result-chev { transform: rotate(180deg); }

.result-row-body {
  padding: 0 4px 22px 80px;
}
.result-fix {
  background: var(--pc-warm);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
  max-width: 720px;
}
.result-fix-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--pc-issue);
  margin-bottom: 8px;
}
.result-fix p { font-size: 14px; line-height: 1.55; color: var(--pc-ink); margin: 0; }
.result-detail-text {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--pc-faint);
  margin: 0 0 12px;
  white-space: pre-wrap;
  max-width: 720px;
}

.results-actions {
  margin-top: 36px;
  display: flex;
  justify-content: center;
}
a.button {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--pc-ink);
  background: none;
  border: 1px solid var(--pc-rule);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: border-color 150ms ease, color 150ms ease;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
a.button:hover { border-color: var(--pc-strong); color: var(--pc-strong); }

.disclaimer {
  margin-top: 28px;
  font-size: 0.82rem;
  color: var(--pc-faint);
  text-align: center;
  border-top: 1px solid var(--pc-rule-soft);
  padding-top: 18px;
}

.help-band {
  margin-top: 64px;
  background: var(--pc-band);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.help-band-copy { max-width: 560px; }
.help-band-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 12px;
}
.help-band-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}
.help-band-sub { font-size: 14px; color: rgba(255,255,255,0.7); margin: 0; }
.cta-pill.invert { background: #ffffff; color: var(--pc-band); flex: none; }
.cta-pill.invert:hover { opacity: 0.9; }

/* ---------- focus states ---------- */
a:focus-visible,
button:focus-visible,
.dropzone:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- responsive ---------- */
@media (max-width: 600px) {
  .wrap { padding: 36px 16px 64px; }
  .crop-tick { width: 12px; height: 12px; }
  .dropzone { padding: 36px 16px; }
  .result-banner { padding: 28px; }
  .result-row-body { padding-left: 4px; }
  .help-band { padding: 28px; }
}

/* ═══════════════════════════════════════════════════════════
   Scanner UI (Preview page)
═══════════════════════════════════════════════════════════ */

.scanner-bed {
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-soft), 0 8px 32px rgba(59,42,24,0.10);
  overflow: hidden;
}
[data-theme="dark"] .scanner-bed {
  box-shadow: var(--shadow-soft-dark), 0 8px 32px rgba(0,0,0,0.35);
}

/* Top lid of the scanner */
.scanner-lid {
  background: linear-gradient(160deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 80%, var(--accent)) 100%);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
[data-theme="dark"] .scanner-lid {
  background: linear-gradient(160deg, #1A1208 0%, #2E1E0A 100%);
}

.scanner-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-fill);
  letter-spacing: 0.04em;
}
.scanner-model {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* LED indicator on scanner lid */
.scanner-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
  transition: background 300ms, box-shadow 300ms;
}
.scanner-led.ready {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74,222,128,0.7);
}
.scanner-led.scanning {
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251,191,36,0.7);
  animation: led-pulse 0.8s ease-in-out infinite alternate;
}
@keyframes led-pulse {
  from { opacity: 1; }
  to   { opacity: 0.4; }
}

/* Scanner light states */
.scanner-light.ready {
  opacity: 0.25;
  top: 50%;
  background: linear-gradient(90deg, transparent, #4ade80, transparent);
}
.scanner-light.scanning {
  opacity: 1;
  animation: scan-beam 1.4s ease-in-out infinite;
}

/* Platen — the glass scan bed */
.scanner-platen {
  padding: 24px;
  position: relative;
  background: var(--paper);
  border-top: 3px solid var(--line-strong);
  border-bottom: 3px solid var(--line-strong);
}

/* Subtle dot-grid texture on the platen */
.scanner-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--line) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.4;
  pointer-events: none;
  border-radius: 0;
}

/* Scan light beam */
.scanner-light {
  position: absolute;
  left: 0; right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-fill) 30%, var(--accent) 50%, var(--accent-fill) 70%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms;
}
.scanner-light.scanning {
  opacity: 1;
  animation: scan-beam 1.8s ease-in-out infinite;
}
@keyframes scan-beam {
  0%   { top: 0; }
  50%  { top: calc(100% - 3px); }
  100% { top: 0; }
}

/* Scan slots (drop zones) */
.scan-slot {
  position: relative;
  margin-bottom: 12px;
}
.scan-slot:last-of-type { margin-bottom: 0; }

.scan-slot-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.scan-slot-required {
  background: var(--accent-bg);
  color: var(--accent-ink);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.scan-slot-optional-tag {
  background: var(--pass-bg);
  color: var(--pass);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Drop zone inside the platen */
.scan-drop {
  position: relative;
  z-index: 1;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms, background 160ms;
  min-height: 140px;
}
.scan-drop-sm {
  min-height: 100px;
  padding: 20px 16px;
}

.scan-drop:hover,
.scan-drop:focus-visible {
  border-color: var(--accent);
  background: var(--accent-bg);
  outline: none;
}
.scan-drop.drag-over {
  border-color: var(--accent-fill);
  background: var(--accent-bg);
}
.scan-drop.has-file {
  border-color: var(--pass);
  border-style: solid;
  background: var(--pass-bg);
}

.scan-drop-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}
.scan-drop-hint {
  font-size: 0.78rem;
  color: var(--ink-muted);
  opacity: 0.7;
}

.scan-drop-ready {
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}

.scan-clear {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 2px 6px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.scan-clear:hover { color: var(--fail); }

.scan-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.scan-divider::before,
.scan-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

/* Scanner base with the big green button */
.scanner-base {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--line);
  border-top: 1px solid var(--line-strong);
}

.scanner-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: var(--accent-fill-text);
  background: var(--accent-fill);
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 28px;
  min-height: 48px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--accent-ink), var(--shadow-soft);
  transition: background 160ms, transform 80ms, box-shadow 80ms;
  flex-shrink: 0;
}
.scanner-btn:hover:not(:disabled) {
  background: var(--accent-ink);
  color: var(--paper-raised);
  box-shadow: 0 2px 0 rgba(0,0,0,0.3);
  transform: translateY(1px);
}
.scanner-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 0px 0 var(--accent-ink);
}
.scanner-btn:disabled {
  background: var(--line-strong);
  color: var(--ink-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.scanner-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════
   Book Previewer
═══════════════════════════════════════════════════════════ */

.book-viewer {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* Cover panel */
.bv-panel {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.bv-panel-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.bv-cover-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow:
    4px 4px 0 0 var(--line-strong),
    8px 8px 18px rgba(0,0,0,0.22),
    0 0 0 1px var(--line);
  line-height: 0;
}

.bv-cover-img {
  display: block;
  max-width: 280px;
  max-height: 400px;
  width: auto;
  height: auto;
}

.bv-panel-caption {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-family: var(--font-mono);
}

/* Spread shell */
.bv-spread-shell {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.bv-spread {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 860px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft), 0 8px 32px rgba(0,0,0,0.10);
  overflow: hidden;
  min-height: 420px;
}

.bv-page {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #fff;
}

[data-theme="dark"] .bv-page {
  background: #2a2016;
}

.bv-page-left {
  border-right: none;
}

.bv-page-right {
  border-left: none;
}

.bv-page-inner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  overflow: hidden;
}

.bv-page-inner img {
  max-width: 100%;
  max-height: 560px;
  object-fit: contain;
  display: block;
  border-radius: 1px;
}

.bv-page-num {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  padding: 4px 0 6px;
  min-height: 1.4em;
}

/* Center gutter — the shadow between left and right pages */
.bv-gutter {
  width: 2px;
  flex-shrink: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.12) 0%,
    rgba(0,0,0,0.06) 40%,
    rgba(0,0,0,0.06) 60%,
    rgba(0,0,0,0.12) 100%
  );
  box-shadow: 0 0 8px rgba(0,0,0,0.08);
}

/* Controls */
.bv-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
}

.bv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--paper-raised);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 140ms, border-color 140ms, opacity 140ms;
  text-decoration: none;
}

.bv-btn:hover:not(:disabled) {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.bv-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.bv-page-indicator {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-muted);
  min-width: 160px;
  text-align: center;
}

.bv-hint {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin: 0;
  font-family: var(--font-mono);
  opacity: 0.7;
}

/* Preview result page header */
.bv-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.bv-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 4px;
}
.bv-subtitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin: 0;
}
.bv-mono { opacity: 0.75; }
.bv-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Page skeleton loader */
.bv-page-skeleton {
  width: 80%;
  height: 90%;
  background: linear-gradient(
    90deg,
    var(--line) 25%,
    var(--line-strong) 50%,
    var(--line) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
  margin: auto;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bv-page-skeleton { animation: none; background: var(--line); }
}

/* Jump-to-page row */
.bv-jump-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.bv-jump-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
}
.bv-jump-input {
  width: 70px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  text-align: center;
}
.bv-jump-input:focus { outline: 2px solid var(--focus); outline-offset: 1px; }

@media (max-width: 640px) {
  .bv-spread { min-height: 280px; }
  .bv-page-indicator { min-width: auto; font-size: 0.75rem; }
  .bv-cover-img { max-width: 200px; max-height: 300px; }
  .bv-controls { gap: 6px; }
  .bv-btn { padding: 0.35rem 0.65rem; font-size: 0.8rem; }
}

/* ── Guide-line toggle button ── */
.bv-btn-guide {
  border-color: #3b82f6;
  color: #3b82f6;
}
.bv-btn-guide:hover { background: rgba(59,130,246,0.08); border-color: #2563eb; color: #2563eb; }

/* ── Guide legend strip ── */
.guide-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-bottom: 10px;
  padding: 6px 12px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.guide-legend-item { display: flex; align-items: center; gap: 6px; }
.guide-swatch {
  width: 24px; height: 0;
  border-top: 2px dashed;
  flex-shrink: 0;
}
.guide-swatch-safety { border-color: rgba(59,130,246,0.8); }
.guide-legend-sep { color: var(--line-strong); }

/* ── Page image wrapper & guides ── */
.bv-img-wrapper {
  position: relative;
  width: 100%;
  max-height: 560px;
  display: flex;
  align-items: stretch;
}

.bv-page-img {
  width: 100%;
  height: 100%;
  object-fit: fill; /* aspect-ratio set on wrapper → no letterbox */
  display: block;
  border-radius: 1px;
}

/* Safety-margin guide overlay */
.page-guide-safety {
  position: absolute;
  border: 1.5px dashed rgba(59,130,246,0.75);
  pointer-events: none;
  z-index: 2;
  border-radius: 0;
}

/* Page flag badge for margin violations */
.page-flag-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--fail-bg);
  border: 1px solid var(--fail);
  color: var(--fail);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  pointer-events: none;
  z-index: 3;
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════
   Scan Report panel
═══════════════════════════════════════════════════════════ */
.scan-report {
  margin-top: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
[data-theme="dark"] .scan-report { box-shadow: var(--shadow-soft-dark); }

.scan-report-header {
  padding: 20px 24px;
  background: var(--paper-raised);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.scan-report-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scan-verdict {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.4;
}
.scan-verdict-pass {
  background: var(--pass-bg);
  border: 1px solid var(--pass);
  color: var(--pass);
}
.scan-verdict-fail {
  background: var(--fail-bg);
  border: 1px solid var(--fail);
  color: var(--fail);
}
.scan-verdict-emoji { font-size: 1.5rem; }
.scan-verdict strong { display: block; font-size: 0.95rem; }
.scan-verdict span { color: var(--ink-muted); }

.scan-section {
  border-top: 1px solid var(--line);
}
.scan-section-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 10px 24px;
  margin: 0;
  background: var(--paper);
}

.scan-issue {
  display: flex;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}
.scan-issue:last-child { border-bottom: none; }

.scan-issue-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.scan-issue-fail .scan-issue-icon { background: var(--fail-bg); color: var(--fail); }
.scan-issue-warn .scan-issue-icon { background: var(--warn-bg); color: var(--warn); }
.scan-issue-pass .scan-issue-icon { background: var(--pass-bg); color: var(--pass); }

.scan-issue-body { flex: 1; min-width: 0; }

.scan-issue-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.97rem;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.scan-issue-desc {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin: 0 0 10px;
  line-height: 1.55;
}
.scan-fix-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fail);
  margin: 10px 0 3px;
}
.scan-fix-text {
  font-size: 0.85rem;
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.55;
}
.scan-note-chip {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  letter-spacing: 0.04em;
}

/* Clickable page chips */
.scan-page-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}
.scan-page-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--fail-bg);
  color: var(--fail);
  border: 1px solid var(--fail);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  cursor: pointer;
  transition: background 120ms, color 120ms;
}
.scan-page-chip:hover {
  background: var(--fail);
  color: #fff;
}
.scan-page-more {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  padding: 3px 6px;
  align-self: center;
}

/* Inline solver suggestion */
.scan-solver {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-top: 6px;
}
.scan-solver-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}
.scan-solver-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 100px;
}
.scan-solver-name { font-weight: 600; font-size: 0.88rem; }
.scan-solver-spec { font-size: 0.78rem; color: var(--accent-ink); }
.scan-solver-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.scan-solver-btn {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink);
  text-decoration: none;
  transition: background 130ms, border-color 130ms;
  white-space: nowrap;
}
.scan-solver-btn:hover { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-ink); }
.scan-solver-btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-muted);
}
.scan-solver-btn-ghost:hover { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-bg); }

/* ═══════════════════════════════════════════════════════════
   Status Navigation Buttons (interactive issue filters)
═══════════════════════════════════════════════════════════ */
.status-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--paper-raised);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  min-height: 100px;
  position: relative;
  overflow: hidden;
}

/* Modern button background effect */
.status-nav-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: left 300ms ease;
  z-index: 1;
}

.status-nav-btn:hover::before {
  left: 100%;
}

.status-nav-btn:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.status-nav-count {
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 800;
  line-height: 1;
  z-index: 2;
  position: relative;
}

.status-nav-label {
  font-size: clamp(0.7rem, 2vw, 0.85rem);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 700;
  z-index: 2;
  position: relative;
}

/* Status button color variants - Modern gradients */
.status-nav-btn-fail {
  border-color: rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
  color: #ef4444;
  font-weight: 800;
}
.status-nav-btn-fail:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
  border-color: #ef4444;
  box-shadow: 0 12px 32px rgba(239, 68, 68, 0.2);
}

.status-nav-btn-warn {
  border-color: rgba(249, 115, 22, 0.3);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.05));
  color: #f97316;
  font-weight: 800;
}
.status-nav-btn-warn:hover {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(249, 115, 22, 0.1));
  border-color: #f97316;
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.2);
}

.status-nav-btn-pass {
  border-color: rgba(34, 197, 94, 0.3);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
  color: #22c55e;
  font-weight: 800;
}
.status-nav-btn-pass:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
  border-color: #22c55e;
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.2);
}

/* Animation on click/active state */
.status-nav-btn:active {
  transform: translateY(-3px);
}

/* ═══════════════════════════════════════════════════════════
   Find-help link on result rows
═══════════════════════════════════════════════════════════ */

.find-help-link {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--pc-blue);
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.find-help-link:hover { opacity: 0.8; }

/* ═══════════════════════════════════════════════════════════
   Problem Solvers directory
═══════════════════════════════════════════════════════════ */

.ps-join-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent-ink);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  text-decoration: none;
  transition: background 140ms, color 140ms;
}
.ps-join-btn:hover {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--accent-fill-text);
}

/* Filter tabs */
.ps-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.ps-tab {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--ink-muted);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  transition: background 140ms, color 140ms, border-color 140ms;
}
.ps-tab:hover { color: var(--ink); border-color: var(--ink-muted); }
.ps-tab.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Card grid */
.ps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Individual card */
.ps-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 160ms, border-color 160ms;
}
.ps-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft), 0 4px 16px rgba(59,42,24,0.10);
}
[data-theme="dark"] .ps-card { box-shadow: var(--shadow-soft-dark); }

.ps-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.ps-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.ps-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}
.ps-specialty {
  font-size: 0.83rem;
  color: var(--accent-ink);
  font-weight: 500;
}
.ps-turnaround {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.ps-bio {
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.6;
  margin: 0 0 12px;
}

.ps-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.ps-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}

.ps-platforms {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ps-platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1.5px solid var(--line-strong);
  color: var(--ink);
  background: var(--paper);
  transition: background 140ms, border-color 140ms, color 140ms;
}
.ps-platform-btn:hover { border-color: var(--ink-muted); background: var(--paper-raised); }

.ps-platform-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: #fff;
  flex-shrink: 0;
}
.ps-platform-fiverr       .ps-platform-icon { background: #1DBF73; }
.ps-platform-upwork       .ps-platform-icon { background: #14A800; }
.ps-platform-kwork        .ps-platform-icon { background: #FF6B35; }
.ps-platform-protalentshub .ps-platform-icon { background: #2563EB; }

/* Featured card */
.ps-card-featured {
  border-color: var(--accent);
  background: var(--accent-bg);
  position: relative;
}
.ps-featured-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--paper);
  border: 1.5px solid var(--accent);
  border-radius: 20px;
  padding: 2px 10px;
  margin-bottom: 10px;
}

/* View Gig button */
.ps-view-gig-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  text-decoration: none;
  transition: opacity 140ms;
}
.ps-view-gig-btn:hover { opacity: 0.88; }

/* ── Cover thumbnail panel ──────────────────────────────────────────────── */
.cover-thumb-panel {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  background: var(--paper-raised);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 28px;
}
.cover-thumb-wrap { flex-shrink: 0; text-align: center; }
.cover-thumb-img  {
  display: block;
  width: 160px;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.cover-thumb-label {
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-top: 6px;
  font-family: var(--font-mono);
}
.cover-thumb-notes { flex: 1; }
.cover-thumb-heading {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
}
.cover-thumb-notes p { font-size: 0.88rem; color: var(--ink-muted); line-height: 1.65; margin: 0; }
@media (max-width: 560px) {
  .cover-thumb-panel { flex-direction: column; }
  .cover-thumb-img { width: 120px; }
}

/* ── Royalty Calculator ─────────────────────────────────────────────────── */
.calc-card {
  background: var(--paper-raised);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.calc-tabs {
  display: flex;
  border-bottom: 1.5px solid var(--line);
  background: var(--paper);
}
.calc-tab {
  flex: 1;
  padding: 12px 0;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  color: var(--ink-muted);
  transition: color 140ms, border-color 140ms;
}
.calc-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.calc-panel { padding: 24px; }

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}
.calc-field label {
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--ink-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.calc-input {
  padding: 9px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  font-family: var(--font-mono);
  transition: border-color 140ms;
}
.calc-input:focus { outline: none; border-color: var(--accent); }
.calc-hint { font-size: 0.75rem; color: var(--ink-muted); line-height: 1.5; }

.calc-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
.calc-result-item {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.calc-result-royalty {
  background: var(--accent-bg);
  border-color: var(--accent);
  grid-column: 1 / -1;
}
.calc-result-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  font-family: var(--font-display);
}
.calc-result-value {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--ink);
}
.calc-result-royalty .calc-result-value { font-size: 1.7rem; color: var(--accent); }

/* Bar chart */
.calc-earnings-bar {
  display: flex;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  margin: 4px 0 8px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.calc-bar-segment { transition: width 300ms ease; height: 100%; }
.calc-bar-print { background: #ef4444; }
.calc-bar-kdp   { background: var(--ink-muted); opacity: 0.4; }
.calc-bar-you   { background: #22c55e; }
.calc-bar-legend {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-bottom: 16px;
}
.calc-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* Breakeven box */
.calc-breakeven-box {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.calc-breakeven-box strong { color: var(--ink); }

/* Projections table */
.calc-table-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  font-family: var(--font-display);
  margin-bottom: 6px;
}
.calc-earnings-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.calc-earnings-table th {
  text-align: left;
  padding: 6px 10px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  border-bottom: 1.5px solid var(--line);
}
.calc-earnings-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
}
.calc-earnings-table tr:last-child td { border-bottom: none; }

/* ── Nav group labels & dividers ─────────────────────────────────────────── */
.nav-group-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  opacity: 0.55;
  padding: 0 2px;
  align-self: center;
  pointer-events: none;
  user-select: none;
}
/* ── Page Count Estimator ────────────────────────────────────────────────── */
.est-result-panel {
  background: var(--paper-raised);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
}
.est-headline {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1.5px solid var(--line);
  margin-bottom: 20px;
}
.est-big-number {
  font-size: 4rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--accent);
  line-height: 1;
}
.est-big-label {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--ink-muted);
  margin-top: 4px;
}
.est-sub {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  margin-top: 6px;
}
.est-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.est-stat {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.est-stat-val {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--ink);
}
.est-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  font-family: var(--font-display);
}
.est-cost-section {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}
.est-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  font-family: var(--font-display);
  margin: 0 0 12px;
}
.est-cost-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.est-cost-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.est-cost-label {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-family: var(--font-display);
}
.est-cost-val {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--ink);
}
.est-cost-note {
  font-size: 0.72rem;
  color: var(--ink-muted);
}
.est-cost-divider {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 600;
  padding: 0 4px;
}
.est-tips {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}
.est-tips p { margin: 0; }
.est-cta-link {
  display: block;
  text-align: center;
  padding: 10px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 140ms;
}
.est-cta-link:hover { background: var(--accent-bg); }

/* ── Genre Checklist ─────────────────────────────────────────────────────── */
.genre-selector { margin-bottom: 4px; }
.genre-select-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  font-family: var(--font-body);
  cursor: pointer;
}
.genre-select-input:focus { outline: none; border-color: var(--accent); }

.genre-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.genre-header { margin-bottom: 16px; }
.genre-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}
.genre-desc {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 0;
}

.genre-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.genre-progress-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.genre-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 250ms ease;
  min-width: 0;
  flex: 1;
}
.genre-progress { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.genre-progress-label { font-size: 0.78rem; color: var(--ink-muted); font-family: var(--font-mono); white-space: nowrap; }

.genre-category { margin-bottom: 20px; }
.genre-cat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-family: var(--font-display);
  margin-bottom: 8px;
}
.genre-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 120ms;
  position: relative;
  border: 1px solid transparent;
}
.genre-item:hover { background: var(--paper-raised); }
.genre-item-critical { border-color: var(--line); background: var(--paper); }
.genre-item-critical:hover { background: var(--accent-bg); }
.genre-checkbox { position: absolute; opacity: 0; width: 0; height: 0; }
.genre-check-box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line-strong);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 120ms, border-color 120ms;
  position: relative;
}
.genre-checkbox:checked + .genre-check-box {
  background: var(--accent);
  border-color: var(--accent);
}
.genre-checkbox:checked + .genre-check-box::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 6px; height: 10px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}
.genre-item-text {
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--ink);
  flex: 1;
}
.genre-checkbox:checked ~ .genre-item-text { color: var(--ink-muted); text-decoration: line-through; }
.genre-badge-required {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ef4444;
  background: rgba(239,68,68,0.1);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.genre-tools-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1.5px solid var(--line);
}
.genre-btn-secondary {
  padding: 8px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms;
}
.genre-btn-secondary:hover { border-color: var(--ink-muted); color: var(--ink); }
.genre-btn-primary {
  margin-left: auto;
  padding: 9px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  transition: opacity 140ms;
}
.genre-btn-primary:hover { opacity: 0.88; }
.calc-earnings-table tr:last-child td { border-bottom: none; }

/* ──────────────────────────────────────────────────────────────────────────────
   ANIMATIONS & MICRO-INTERACTIONS — Make the app feel alive
   ────────────────────────────────────────────────────────────────────────────── */

/* Page fade-in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subtle slide-in from left */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Button press effect */
@keyframes buttonPress {
  0% { transform: scale(1); }
  50% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

/* Glow effect */
@keyframes glow {
  0% { box-shadow: 0 0 0 0 rgba(255, 119, 89, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(255, 119, 89, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 119, 89, 0); }
}

/* Apply fade-in to main sections */
section {
  animation: fadeInUp 0.6s ease-out;
}

/* Sidebar animation */
.sidebar {
  animation: slideInLeft 0.4s ease-out;
}

/* ──────────────────────────────────────────────────────────────────────────────
   IMPROVED INPUT FIELDS — Better UX & Visual Feedback
   ────────────────────────────────────────────────────────────────────────────── */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  transition: all 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Input focus state — better visual feedback */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #ff7759;
  box-shadow: 0 0 0 3px rgba(255, 119, 89, 0.1);
  transform: translateY(-2px);
}

/* Input hover state */
input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
textarea:hover,
select:hover {
  border-color: var(--pc-muted);
}

/* ──────────────────────────────────────────────────────────────────────────────
   BUTTON ANIMATIONS — Polished Interactions
   ────────────────────────────────────────────────────────────────────────────── */

button, .btn, a[role="button"],
input[type="button"], input[type="submit"] {
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Button hover lift effect */
button:hover, .btn:hover, a[role="button"]:hover,
input[type="button"]:hover, input[type="submit"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Button active/press effect */
button:active, .btn:active,
input[type="button"]:active, input[type="submit"]:active {
  animation: buttonPress 0.3s ease-out;
}

/* ──────────────────────────────────────────────────────────────────────────────
   CARD ANIMATIONS — Staggered Entrance
   ────────────────────────────────────────────────────────────────────────────── */

.est-card, .side-link, .tab-content {
  animation: fadeInUp 0.5s ease-out;
}

.est-card:nth-child(2) { animation-delay: 0.1s; }
.est-card:nth-child(3) { animation-delay: 0.2s; }
.est-card:nth-child(4) { animation-delay: 0.3s; }
.est-card:nth-child(5) { animation-delay: 0.4s; }
.est-card:nth-child(6) { animation-delay: 0.5s; }

/* Sidebar links hover animation */
.side-link {
  transition: all 180ms ease-out;
}

.side-link:hover {
  transform: translateX(4px);
  background: rgba(255, 119, 89, 0.05);
}

/* ──────────────────────────────────────────────────────────────────────────────
   HERO SECTIONS — Enhanced Landing Pages
   ────────────────────────────────────────────────────────────────────────────── */

.hero-single, .hero-display {
  animation: fadeInUp 0.8s ease-out;
}

.hero-display {
  animation-delay: 0.2s;
}

.hero-lead {
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* ──────────────────────────────────────────────────────────────────────────────
   PROGRESS & STATUS INDICATORS
   ────────────────────────────────────────────────────────────────────────────── */

.progress-bar {
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-badge {
  animation: fadeInUp 0.4s ease-out;
}

/* ──────────────────────────────────────────────────────────────────────────────
   SMOOTH SCROLLING
   ────────────────────────────────────────────────────────────────────────────── */

html {
  scroll-behavior: smooth;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   COMPREHENSIVE RESPONSIVE OVERHAUL
   Mobile-first approach with standardized breakpoints:
   - Mobile: 0-479px
   - Tablet: 480-767px
   - Desktop: 768px+
═══════════════════════════════════════════════════════════ */

/* MOBILE FIRST: Base styles for all devices */
body { font-size: clamp(14px, 2.5vw, 16px); }
button, input, select, textarea { font-size: 16px; }

/* Touch-friendly sizing */
button, a.button, .bv-btn, .scan-page-chip, .status-nav-btn {
  min-height: 44px;
  min-width: 44px;
  padding: clamp(8px, 2vw, 12px) clamp(12px, 3vw, 20px);
}

input, select, textarea {
  min-height: 44px;
  padding: clamp(10px, 2vw, 12px) clamp(12px, 2.5vw, 16px);
}

/* Mobile drawer scoped strictly to max-width: 860px */
@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 260px !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    z-index: 1000 !important;
    transform: translateX(-100%) !important;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 6px 0 30px rgba(0,0,0,0.3) !important;
    padding: 14px 10px 0 !important;
    background: var(--pc-canvas) !important;
  }
  .app-shell.is-open .sidebar {
    transform: translateX(0) !important;
  }
  .sidebar-nav {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 24px !important;
  }
  .sidebar-foot {
    flex: 0 0 auto !important;
    position: sticky !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: var(--pc-canvas) !important;
    border-top: 1px solid var(--pc-rule-soft) !important;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.16) !important;
    z-index: 30 !important;
    padding: 10px 4px max(14px, env(safe-area-inset-bottom)) !important;
  }
  .app-shell.is-open .sidebar-backdrop { display: block; }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 999;
    display: none;
  }
  .mobile-bar { display: flex; }
  .hamburger { display: block; }
}

.app-main {
  flex: 1;
  width: 100%;
  min-height: 100vh;
  min-width: 0;
}

/* Flexible grids */
.footer-grid {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.footer-section {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.footer-newsletter-form { flex-direction: column; }

/* Forms stack on mobile */
.calc-grid, .est-grid, .lint-grid, .margin-grid, .keyword-grid {
  grid-template-columns: 1fr !important;
  gap: 1.5rem !important;
}

/* Announce bar mobile */
.announce-bar {
  font-size: 12px;
  padding: 8px 12px;
}

/* Header actions wrap */
.bv-header-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.bv-header-actions .bv-btn {
  flex: 1;
  min-width: 100px;
  font-size: 13px;
  padding: 8px 10px;
}

/* Result tables scroll */
table {
  display: block;
  overflow-x: auto;
}

/* Flexible form sections */
.field, form > div {
  width: 100%;
}

/* Dropdown menus don't overflow */
select { max-width: 100%; }

/* Page numbers visible */
.bv-page-num { font-size: 12px; }

/* TABLET: 480px and up */
@media (min-width: 480px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-section { grid-template-columns: 1fr 1fr; }
  .announce-bar { font-size: 13px; padding: 10px 16px; }
  .bv-header-actions .bv-btn { flex: none; }
}

/* TABLET LARGE: 600px and up */
@media (min-width: 600px) {
  .calc-grid, .est-grid { grid-template-columns: 1fr 1fr !important; }

  .footer-newsletter-form { flex-direction: row; }
  .footer-newsletter-input { flex: 1; }
}

/* DESKTOP: 768px and up */
@media (min-width: 768px) {
  .app-shell { flex-direction: row; }
  .app-main-inner { padding: 32px; }

  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-section { grid-template-columns: 1fr 1fr; gap: 3rem; }

  .lint-grid, .margin-grid, .keyword-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* DESKTOP LARGE: 1024px and up */
@media (min-width: 1024px) {
  .lint-grid, .margin-grid, .keyword-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .footer-section { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   "IS THIS INTENTIONAL?" MODAL & TOGGLE SYSTEM
   Modern dialog for confirming optional/advisory choices
═══════════════════════════════════════════════════════════ */

.intentional-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 200ms ease;
}

.intentional-modal.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.intentional-content {
  background: var(--pc-card);
  border-radius: 16px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.intentional-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--pc-strong);
}

.intentional-description {
  font-size: 0.95rem;
  color: var(--pc-muted);
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
}

.intentional-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.intentional-btn {
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 250ms ease;
  font-size: 0.95rem;
}

.intentional-btn-yes {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border-color: #22c55e;
}

.intentional-btn-yes:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

.intentional-btn-no {
  background: transparent;
  color: var(--pc-ink);
  border-color: var(--pc-rule);
}

.intentional-btn-no:hover {
  background: var(--pc-raise);
  border-color: var(--pc-muted);
}

/* Intentional toggle indicator */
.issue-intentional-badge {
  display: inline-block;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 8px;
  letter-spacing: 0.5px;
}

/* Modern issue styling updates */
.scan-issue-warn {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(249, 115, 22, 0.04));
  border-left: 4px solid #f97316;
}

.scan-issue-fail {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.04));
  border-left: 4px solid #ef4444;
}

.scan-issue-pass {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.04));
  border-left: 4px solid #22c55e;
}

/* Modern section headers */
.scan-section-title {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--pc-strong), var(--pc-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

/* Modern solutions/help styling */
.scan-solver {
  background: linear-gradient(135deg, rgba(255, 119, 89, 0.08), rgba(255, 119, 89, 0.04));
  border: 1px solid rgba(255, 119, 89, 0.2);
  border-radius: 10px;
  padding: 14px;
  transition: all 250ms ease;
}

.scan-solver:hover {
  border-color: rgba(255, 119, 89, 0.4);
  background: linear-gradient(135deg, rgba(255, 119, 89, 0.12), rgba(255, 119, 89, 0.08));
}

/* Responsive typography */
h1 {
  font-size: clamp(24px, 5vw, 56px);
  line-height: clamp(1.1, 2vw, 1.3);
}

h2 {
  font-size: clamp(20px, 4vw, 40px);
}

h3 {
  font-size: clamp(16px, 3vw, 28px);
}

/* Responsive spacing */
.app-main-inner {
  padding: clamp(16px, 4vw, 32px);
}

.scan-report {
  padding: clamp(16px, 3vw, 24px);
}

/* Responsive footer */
.footer-inner {
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 2vw, 2rem);
}

/* Image responsiveness */
img, .bv-cover-img, .bv-img-wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Book viewer responsive */
.bv-spread {
  gap: clamp(8px, 2vw, 16px);
}

.bv-page {
  flex: 1;
  min-width: 0;
}

/* Responsive tables */
@media (max-width: 767px) {
  table {
    font-size: 12px;
  }

  th, td {
    padding: clamp(6px, 1.5vw, 10px) !important;
  }
}

/* Print cost calculator responsive */
@media (max-width: 600px) {
  .calc-input-group {
    grid-template-columns: 1fr;
  }
}

/* Keyword input responsive */
.keyword-input-row {
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 600px) {
  .keyword-input-row {
    flex-direction: row;
    gap: 0.5rem;
  }
}

/* Results area responsive */
.scan-section {
  margin-bottom: clamp(1rem, 3vw, 2rem);
}

/* Interactive buttons responsive */
.status-nav-btn {
  flex: 1;
  min-width: clamp(80px, 20vw, 140px);
}

/* Sidebar in mobile menu works */
@media (max-width: 767px) {
  .app-shell.is-open {
    position: relative;
  }
}

/* Navbar dropdown responsive */
.mode-nav {
  flex-wrap: wrap;
  gap: clamp(6px, 1vw, 12px);
}

/* File dropzone responsive */
.dropzone {
  padding: clamp(24px, 5vw, 48px);
  min-height: clamp(120px, 30vw, 200px);
}

/* Prevent horizontal scroll */
body, html {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Safe viewport for notches */
body {
  padding: max(0px, env(safe-area-inset-top)) max(0px, env(safe-area-inset-right))
           max(0px, env(safe-area-inset-bottom)) max(0px, env(safe-area-inset-left));
}

/* ═══════════════════════════════════════════════════════════
   MODERN DESIGN SYSTEM - Contemporary Aesthetic Overhaul
   Glassmorphism + Gradient accents + Modern spacing
═══════════════════════════════════════════════════════════ */

/* Modern color palette with better gradients */
:root {
  --gradient-coral: linear-gradient(135deg, #ff7759, #ff6845);
  --gradient-success: linear-gradient(135deg, #22c55e, #16a34a);
  --gradient-warn: linear-gradient(135deg, #f97316, #ea580c);
  --gradient-fail: linear-gradient(135deg, #ef4444, #dc2626);
  --blur-sm: 12px;
  --blur-md: 24px;
}

/* Modern card styling */
.scan-issue, .scan-section, .scan-verdict {
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(var(--blur-sm));
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  .scan-issue, .scan-section, .scan-verdict {
    background: rgba(27, 27, 33, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
}

.scan-issue:hover, .scan-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* Modern buttons */
button, .bv-btn, input[type="submit"] {
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

button:hover, .bv-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

button:active, .bv-btn:active {
  transform: translateY(0);
}

/* Modern form inputs */
input, select, textarea {
  border-radius: 8px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  transition: all 200ms ease;
}

@media (prefers-color-scheme: dark) {
  input, select, textarea {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(27, 27, 33, 0.6);
  }
}

input:focus, select:focus, textarea:focus {
  border-color: var(--pc-coral);
  box-shadow: 0 0 0 3px rgba(255, 119, 89, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

/* Modern typography */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--pc-strong), var(--pc-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Modern cards with depth */
.dropzone {
  border-radius: 12px;
  border: 2px dashed rgba(255, 119, 89, 0.3);
  background: linear-gradient(135deg, rgba(255, 119, 89, 0.04), rgba(255, 119, 89, 0.02));
  transition: all 300ms ease;
}

.dropzone:hover {
  border-color: var(--pc-coral);
  background: linear-gradient(135deg, rgba(255, 119, 89, 0.08), rgba(255, 119, 89, 0.04));
  transform: scale(1.01);
}

/* Modern alerts/verdicts */
.scan-verdict {
  border-radius: 16px;
  border-left: 4px solid transparent;
}

.scan-verdict-pass {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
  border-left-color: #22c55e;
}

.scan-verdict-fail, .scan-verdict {
  background: linear-gradient(135deg, rgba(255, 119, 89, 0.1), rgba(255, 119, 89, 0.05));
  border-left-color: var(--pc-coral);
}

/* ═══════════════════════════════════════════════════════════
   LOGO & BRANDING ENHANCEMENTS
═══════════════════════════════════════════════════════════ */

.mark {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}

.mark::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pc-coral), var(--pc-coral-soft));
  transition: width 300ms ease;
}

.mark:hover::after {
  width: 100%;
}

.sidebar-label {
  font-weight: 600;
  letter-spacing: -0.3px;
}

/* Logo animation on hover */
.mark-logo {
  transition: transform 200ms ease;
}

.mark:hover .mark-logo {
  transform: scale(1.05);
}



/* ═══════════════════════════════════════════════════════════
   MISSING GRID DEFINITIONS: Add CSS for grids without definitions
═══════════════════════════════════════════════════════════ */

/* Metadata Optimizer grid layout */
.meta-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(280px, 380px);
  gap: 40px;
  align-items: start;
}

@media (max-width: 900px) {
  .meta-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Essentials/info grid layout */
.essentials-grid,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

@media (max-width: 600px) {
  .essentials-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* Normal content grid */
.normal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT SYSTEM: Two-column, three-column, and responsive grids
═══════════════════════════════════════════════════════════ */

/* Two-column responsive layout: inputs left, results right */
.layout-two-column {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(320px, 1fr);
  gap: 40px;
  align-items: start;
}

@media (max-width: 800px) {
  .layout-two-column {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Three-column card grid layout */
.layout-three-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

@media (max-width: 600px) {
  .layout-three-column {
    grid-template-columns: 1fr;
  }
}

/* Side-by-side form layout: form on left, results on right */
.form-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

@media (max-width: 900px) {
  .form-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Card groups: small cards side by side */
.card-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

@media (max-width: 600px) {
  .card-group {
    grid-template-columns: 1fr;
  }
}

/* Consistent form field styling */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.form-group label {
  font-weight: 600;
  color: var(--pc-strong);
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 14px;
  border: 1.5px solid var(--pc-rule);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--pc-card);
  color: var(--pc-ink);
  transition: border-color 200ms ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--pc-coral);
  box-shadow: 0 0 0 3px var(--pc-issue-bg);
}

.form-group input::placeholder {
  color: var(--pc-faint);
}

/* Button styling improvements */
button,
a.button {
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  word-wrap: break-word;
  text-decoration: none;
  transition: all 200ms ease;
  border: none;
}

button.primary-btn,
a.button.primary-btn,
.btn.btn-primary {
  background: var(--pc-cta);
  color: var(--pc-cta-text);
}

button.primary-btn:hover,
a.button.primary-btn:hover,
.btn.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

button.secondary-btn,
a.button.secondary-btn,
.btn.btn-secondary {
  background: var(--pc-card);
  color: var(--pc-ink);
  border: 1.5px solid var(--pc-rule);
}

button.secondary-btn:hover,
a.button.secondary-btn:hover,
.btn.btn-secondary:hover {
  border-color: var(--pc-strong);
  background: var(--pc-raise);
}

/* Compact button group for multiple actions */
.button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

@media (max-width: 600px) {
  .button-group {
    flex-direction: column;
  }

  .button-group button,
  .button-group a.button {
    width: 100%;
  }
}

/* Section spacing */
section {
  margin-bottom: 60px;
}

section:last-of-type {
  margin-bottom: 40px;
}

/* ═══════════════════════════════════════════════════════════
   Floating Sticky Find Help Button (Bottom Right)
═══════════════════════════════════════════════════════════ */
.floating-help-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--pc-coral), #ff6845);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(255, 119, 89, 0.3);
  transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 50;
  border: none;
  cursor: pointer;
  overflow: hidden;
  font-weight: 600;
  font-size: 0.75rem;
}

.floating-help-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent);
  transition: left 400ms ease;
  pointer-events: none;
}

.floating-help-btn:hover {
  transform: translateY(-6px) scale(1.08);
  box-shadow: 0 16px 40px rgba(255, 119, 89, 0.4);
}

.floating-help-btn:hover::before {
  left: 100%;
}

.floating-help-btn svg {
  margin-right: 4px;
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .floating-help-btn {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }

  .floating-help-btn svg {
    margin-right: 0;
  }
}

/* ── Universal Password Visibility Toggle ────────────────────────────── */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 44px !important;
  box-sizing: border-box;
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--pc-muted, rgba(240, 240, 243, 0.5));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
  z-index: 3;
}

.password-toggle-btn:hover {
  color: var(--pc-coral, #ff7759);
  background: rgba(255, 255, 255, 0.08);
}

.password-toggle-btn:focus-visible {
  outline: 2px solid var(--pc-coral, #ff7759);
  outline-offset: 1px;
}

.password-toggle-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ---------- Upload & Processing Loading Dialogue Modal ---------- */
.loading-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.loading-modal-card {
  background: #0f172a; /* Deep obsidian slate - dark & vibrant in both light and dark modes */
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 38px 32px;
  max-width: 620px;
  width: 100%;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.75), 0 0 35px rgba(59, 130, 246, 0.15);
  color: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.loading-quote-box {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.loading-quote-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  font-weight: 700;
}

.loading-quote-content {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.loading-quote-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.6;
  font-style: italic;
  max-width: 520px;
}

.loading-quote-author {
  margin: 10px 0 0 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.loading-spinner-wrap {
  margin-bottom: 20px;
}

.loading-spinner-svg {
  margin: 0 auto;
  display: block;
}

.loading-spinner-circle {
  animation: modalSpin 1.3s linear infinite;
  transform-origin: 28px 28px;
}

@keyframes modalSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-title {
  margin: 0 0 8px 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.loading-subtitle {
  margin: 0 0 24px 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.loading-steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.loading-step-item {
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  text-align: center;
}

.loading-step-icon {
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.loading-step-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.2px;
}

@media (max-width: 580px) {
  .loading-modal-card {
    padding: 28px 20px;
  }
  .loading-quote-text {
    font-size: 1rem;
  }
  .loading-title {
    font-size: 1.15rem;
  }
  .loading-steps-grid {
    gap: 8px;
  }
  .loading-step-label {
    font-size: 0.75rem;
  }
}

