/* ── Self-hosted UI fonts (no external font CDN) ─────────────────────
   Variable woff2 instances of Fraunces, Playfair Display, Inter and
   JetBrains Mono, served from static/fonts/. Subsetted latin +
   latin-ext with unicode-range so browsers fetch only what they use.
   Keep these in sync with the families referenced in --serif/--sans/
   --mono below. */
/* latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url(fonts/ui-Fraunces-italic.latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url(fonts/ui-Fraunces-italic.latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(fonts/ui-Fraunces-normal.latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(fonts/ui-Fraunces-normal.latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 500 900;
  font-display: swap;
  src: url(fonts/ui-PlayfairDisplay-italic.latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 500 900;
  font-display: swap;
  src: url(fonts/ui-PlayfairDisplay-italic.latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url(fonts/ui-PlayfairDisplay-normal.latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url(fonts/ui-PlayfairDisplay-normal.latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(fonts/ui-Inter-normal.latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(fonts/ui-Inter-normal.latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/ui-JetBrainsMono-normal.latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/ui-JetBrainsMono-normal.latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Vic Brokers · Appraisal Studio · v7
   Dark + light theme · charcoal/cream + champagne gold + navy accent
   V1 — audit fixes + visual polish */

:root {
  /* dark theme (default) */
  --bg:        #0a0d14;
  --bg-2:      #0f131c;
  --surface:   rgba(22, 27, 38, 0.55);
  --surface-2: rgba(28, 34, 47, 0.7);
  --line:      rgba(201, 169, 97, 0.14);
  --line-2:    rgba(255, 255, 255, 0.07);
  --text:      #ece8e0;
  --text-2:    #a8a29a;
  --muted:     #6b6963;
  --input-bg:  rgba(0, 0, 0, 0.28);
  --input-bg-focus: rgba(0, 0, 0, 0.4);
  --header-bg: rgba(10, 13, 20, 0.6);
  --footer-bg: rgba(0, 0, 0, 0.25);
  --table-bg:  rgba(0, 0, 0, 0.22);

  --gold:      #c9a961;
  --gold-2:    #e6c97a;
  --gold-deep: #8e7740;

  --accent:        #c9a961;
  --accent-2:      #e6c97a;
  --accent-deep:   #8e7740;
  --on-accent:     #1a140a;

  --good:      #6cc28b;
  --warn:      #e6c97a;
  --bad:       #e07b6e;

  --shadow-2:  0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 40px 80px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line);

  --serif:     "Fraunces", "Playfair Display", Georgia, serif;
  --sans:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:      "JetBrains Mono", ui-monospace, "Consolas", monospace;

  --r-sm: 10px; --r-md: 16px; --r-lg: 22px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* z-index scale — every layer should pick from these, not raw numbers. */
  --z-bg:       -2;
  --z-base:     1;
  --z-overlay:  40;   /* dropdowns, popovers, file drag states */
  --z-sticky:   50;   /* sticky header */
  --z-modal:    1000;
  --z-lock:     9999; /* pin lock screen — always on top */
}

[data-theme="light"] {
  --bg:        #f5f6fb;
  --bg-2:      #e9ecf4;
  --surface:   #ffffff;
  --surface-2: #f8faff;
  --line:      rgba(30, 58, 138, 0.18);
  --line-2:    rgba(15, 23, 42, 0.10);
  --text:      #0f172a;
  --text-2:    #475569;
  --muted:     #64748b;
  --input-bg:  #ffffff;
  --input-bg-focus: #fbfdff;
  --header-bg: rgba(245, 246, 251, 0.92);
  --footer-bg: #eef1f8;
  --table-bg:  #ffffff;
  --gold:      #a87a1c;
  --gold-2:    #d99e2c;
  --gold-deep: #6f4f12;

  /* Navy/indigo primary accent for light mode buttons + interactive */
  --accent:        #1e3a8a;
  --accent-2:      #2a4cb1;
  --accent-deep:   #122366;
  --on-accent:     #ffffff;

  --shadow-2:  0 1px 0 rgba(255, 255, 255, 0.82) inset, 0 32px 70px -32px rgba(15, 23, 42, 0.22), 0 0 0 1px var(--line-2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
a { color: inherit; }

/* ─── animated background ─────────────────────────────────────────────── */
.bg-mesh {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1400px 800px at 80% -10%, rgba(201, 169, 97, 0.12), transparent 60%),
    radial-gradient(1000px 600px at -10% 20%, rgba(106, 76, 255, 0.08), transparent 60%),
    radial-gradient(1100px 700px at 50% 110%, rgba(201, 169, 97, 0.06), transparent 60%),
    var(--bg);
  transition: background .4s var(--ease);
}
[data-theme="light"] .bg-mesh {
  background:
    radial-gradient(1400px 800px at 80% -10%, rgba(230, 189, 84, 0.18), transparent 58%),
    radial-gradient(1000px 600px at -10% 20%, rgba(59, 130, 246, 0.08), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, var(--bg-2) 100%),
    var(--bg);
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(90px);
  opacity: 0.45; mix-blend-mode: screen;
  animation: float 22s ease-in-out infinite;
  will-change: transform;
}
[data-theme="light"] .orb { opacity: 0.30; mix-blend-mode: multiply; }
.orb-1 { width: 520px; height: 520px; background: #c9a961; top: -140px; right: -100px; animation-delay: 0s; }
.orb-2 { width: 380px; height: 380px; background: #6a4cff; bottom: 8%; left: -120px; animation-delay: -7s; opacity: 0.32; }
.orb-3 { width: 560px; height: 560px; background: #e6c97a; top: 50%; left: 50%; transform: translate(-50%, -50%); animation-name: float-c; animation-delay: -14s; opacity: 0.18; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -40px) scale(1.06); }
  66% { transform: translate(-30px, 50px) scale(0.96); }
}
@keyframes float-c {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-46%, -54%) scale(1.10); }
}
.grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.5; mix-blend-mode: overlay;
}
[data-theme="light"] .grain { opacity: 0.25; }

/* ─── header (3-column: actions left · nav center · logo right) ───────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line-2);
  transition: background .4s var(--ease), box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 8px 24px -16px rgba(0,0,0,0.4); }
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 14px 28px;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 24px;
}
.header-left {
  display: flex; align-items: center; gap: 12px; justify-self: start;
}
.header-nav {
  display: flex; align-items: center; gap: 32px;
  font-family: var(--sans); font-size: 13px;
  font-weight: 600; letter-spacing: 0.04em;
  justify-self: center;
  text-transform: uppercase;
}
.header-nav a {
  color: var(--text-2); text-decoration: none;
  position: relative; padding: 6px 0;
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.header-nav a:hover { transform: translateY(-1px); }
.header-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: var(--gold);
  transform: scaleX(0); transform-origin: center;
  transition: transform .3s var(--ease);
}
.header-nav a:hover { color: var(--gold); }
.header-nav a:hover::after { transform: scaleX(1); }
.brand-link {
  display: flex; align-items: center; justify-self: end;
  transition: transform .3s var(--ease);
}
.brand-link:hover { transform: scale(1.05); }
.brand-logo { height: 53px; width: auto; }  /* +15% on +15% baseline */
/* Single-logo display via theme — high specificity */
html[data-theme="dark"] .brand-logo-light,
html:not([data-theme]) .brand-logo-light,
html[data-theme="dark"] .footer-logo-light,
html:not([data-theme]) .footer-logo-light { display: none !important; }
html[data-theme="dark"] .brand-logo-dark,
html:not([data-theme]) .brand-logo-dark { display: block; filter: drop-shadow(0 0 14px rgba(201, 169, 97, 0.18)); }
html[data-theme="dark"] .footer-logo-dark,
html:not([data-theme]) .footer-logo-dark { display: block; filter: drop-shadow(0 0 14px rgba(201, 169, 97, 0.18)); }
html[data-theme="light"] .brand-logo-dark,
html[data-theme="light"] .footer-logo-dark { display: none !important; }
html[data-theme="light"] .brand-logo-light,
html[data-theme="light"] .footer-logo-light { display: block; }

/* Header "Prepared by" picker. Shows at a glance who the Appointed Broker
   page will name; the tick means their team photo is saved and will print. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.prepared-by { display: inline-flex; align-items: center; gap: 6px; }
.prepared-by[hidden], .prepared-photo[hidden] { display: none; }
.prepared-by select {
  max-width: 168px; padding: 7px 12px;
  background: transparent; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--text-2); font-family: var(--sans); font-size: 12.5px;
  cursor: pointer; transition: all .25s var(--ease);
}
.prepared-by select:hover { border-color: rgba(201, 169, 97, 0.4); color: var(--gold); }
/* Nothing chosen = the report loses the broker block, so make it look unfinished. */
.prepared-by.unset select { border-color: rgba(230, 201, 122, 0.55); color: var(--gold); }
.prepared-photo {
  display: inline-grid; place-items: center; width: 18px; height: 18px;
  border-radius: 50%; background: rgba(108, 194, 139, 0.15); color: #4d9d6e;
}
/* Between these widths the nav and phone are still shown and the header's
   left column is tight, so the picker narrows rather than disappearing —
   knowing who the report is prepared by matters more than the nav links. */
@media (max-width: 1150px) and (min-width: 861px) { .prepared-by select { max-width: 116px; } }

.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--line-2);
  border-radius: 50%; cursor: pointer; color: var(--text-2);
  text-decoration: none;
  transition: all .25s var(--ease);
}
.icon-btn:hover {
  border-color: rgba(201, 169, 97, 0.4);
  background: rgba(201, 169, 97, 0.05);
  color: var(--gold);
  transform: translateY(-1px);
}
.icon-btn .ico-sun { display: none; }
html[data-theme="light"] .icon-btn .ico-sun { display: block; }
html[data-theme="light"] .icon-btn .ico-moon { display: none; }

.phone {
  font-family: var(--mono); color: var(--gold); white-space: nowrap;
  border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.06em;
  transition: all .25s var(--ease);
  background: rgba(201, 169, 97, 0.04);
  display: inline-flex; align-items: center; gap: 8px;
  position: relative;
}
.phone::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulseDot 2.4s ease-in-out infinite;
}
.phone:hover {
  border-color: var(--gold);
  background: rgba(201, 169, 97, 0.10);
  transform: translateY(-1px);
}

/* ─── hero ────────────────────────────────────────────────────────────── */
.hero {
  padding: 0 28px;
  position: relative;
  min-height: 240px;
  display: flex;
  align-items: center;
}
.hero-inner {
  max-width: 1080px; margin: 0 auto;
  width: 100%;
  height: 240px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-text { min-width: 0; max-width: 760px; margin: 0 auto; text-align: center; }
@media (max-width: 960px) {
  .hero { padding: 40px 20px 24px; min-height: 0; display: block; }
  .hero-inner { height: auto; flex-direction: column; gap: 28px; text-align: center; }
  .hero-text { text-align: center; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold);
  padding: 6px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: rgba(201, 169, 97, 0.05);
  margin-bottom: 20px;
  animation: fadeUp .8s var(--ease) both;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.eyebrow-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); }
}

.hero-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(31px, 3.35vw, 50px);
  line-height: 1.06;
  letter-spacing: 0;
  margin: 0 0 14px;
  white-space: nowrap;
  opacity: 0; transform: translateY(16px);
  animation: heroLine .9s var(--ease) .1s forwards;
  /* Subtle warm gradient for the bold portion — pops against the dark hero */
  background: linear-gradient(180deg, #ffffff 0%, #f4f0e6 45%, #d8c79a 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.12));
}
@media (max-width: 720px) {
  .hero-title { white-space: normal; }
}
[data-theme="light"] .hero-title {
  background: none;
  -webkit-background-clip: initial; background-clip: initial;
  color: #070b14;
  -webkit-text-fill-color: #070b14;
  filter: none;
}
.hero-title em {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(180deg, #ffe9a3 0%, var(--gold-2) 35%, var(--gold) 70%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  letter-spacing: 0;
  padding-right: 0.05em;
  filter: drop-shadow(0 2px 14px rgba(201, 169, 97, 0.20));
}
[data-theme="light"] .hero-title em {
  background: linear-gradient(180deg, #d99e2c 0%, var(--gold) 45%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(168, 122, 28, 0.18));
}
@keyframes heroLine { to { opacity: 1; transform: translateY(0); } }

/* Hero illustration (right side) — compact, floating */
.hero-art {
  display: block;
  position: absolute;
  left: calc(50% + 390px);
  top: 58px;
  width: clamp(205px, 12vw, 258px);
  max-width: 100%;
  border-radius: 18px;
  text-decoration: none;
  opacity: 0;
  animation: heroArtIn 1s var(--ease) .35s forwards;
  transform-origin: center center;
  transition: transform .55s var(--ease);
}
@keyframes heroArtIn { to { opacity: 1; } }
.hero-art-img {
  display: block; width: 100%; height: auto;
  border-radius: 10px;
  filter: brightness(0.92) contrast(1.02) saturate(0.96) drop-shadow(0 16px 32px rgba(0,0,0,0.40)) drop-shadow(0 0 16px rgba(201, 169, 97, 0.06));
  /* Continuous gentle float — pauses on hover for the lift effect */
  animation: heroFloat 9s ease-in-out infinite;
  transition: transform .6s var(--ease), filter .6s var(--ease);
  will-change: transform;
}
[data-theme="light"] .hero-art-img {
  filter: drop-shadow(0 18px 40px rgba(15, 23, 42, 0.18)) drop-shadow(0 0 22px rgba(30, 58, 138, 0.10));
}
@keyframes heroFloat {
  0%, 100% { transform: translate3d(0, 1px, 0) scale(1); }
  50%      { transform: translate3d(0, -5px, 0) scale(1.006); }
}
.hero-art:hover,
.hero-art:focus-visible {
  transform: translateY(-6px) rotate(-0.65deg) scale(1.045);
}
.hero-art:hover .hero-art-img,
.hero-art:focus-visible .hero-art-img {
  animation-play-state: paused;
  filter: brightness(0.96) contrast(1.03) saturate(0.98) drop-shadow(0 24px 52px rgba(0,0,0,0.48)) drop-shadow(0 0 24px rgba(201, 169, 97, 0.14));
}
[data-theme="light"] .hero-art:hover .hero-art-img,
[data-theme="light"] .hero-art:focus-visible .hero-art-img {
  filter: drop-shadow(0 26px 54px rgba(15, 23, 42, 0.24)) drop-shadow(0 0 30px rgba(30, 58, 138, 0.18));
}
.hero-art-glow {
  position: absolute; inset: 8%;
  z-index: -1;
  background:
    radial-gradient(60% 60% at 70% 30%, rgba(201, 169, 97, 0.30), transparent 62%),
    radial-gradient(60% 60% at 30% 70%, rgba(106, 76, 255, 0.16), transparent 66%);
  filter: blur(36px);
  opacity: 0.55;
  transition: opacity .55s var(--ease);
  animation: heroFloat 8.5s ease-in-out infinite;
}
[data-theme="light"] .hero-art-glow {
  background:
    radial-gradient(60% 60% at 70% 30%, rgba(230, 189, 84, 0.38), transparent 62%),
    radial-gradient(60% 60% at 30% 70%, rgba(30, 58, 138, 0.14), transparent 66%);
  opacity: 0.45;
}
.hero-art:hover .hero-art-glow,
.hero-art:focus-visible .hero-art-glow { opacity: 0.95; }
@media (max-width: 1760px) {
  .hero-art {
    left: calc(50% + 390px);
    right: auto;
    top: 58px;
    width: clamp(205px, 15vw, 258px);
    opacity: 0.82;
  }
  .hero-art-img {
    filter: brightness(0.88) contrast(1.01) saturate(0.92) drop-shadow(0 12px 26px rgba(0,0,0,0.34)) drop-shadow(0 0 12px rgba(201, 169, 97, 0.045));
  }
  .hero-art-glow { opacity: 0.34; }
}
@media (max-width: 1100px) {
  .hero-art {
    left: auto;
    right: 34px;
    top: 22px;
    width: clamp(142px, 16vw, 168px);
    opacity: 0.58;
  }
  .hero-art-glow { opacity: 0.18; }
}
@media (max-width: 860px) {
  .hero-art {
    right: -10px;
    top: 36px;
    width: clamp(88px, 12vw, 108px);
    opacity: 0.46;
  }
}
@media (max-width: 820px) {
  .hero-art { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-art-img, .hero-art-glow { animation: none; }
}

.hero-sub {
  font-size: 15px; color: var(--text-2);
  margin: 0 auto; max-width: 560px;
  text-align: center;
  font-weight: 400; letter-spacing: 0.005em;
  animation: fadeUp 1s var(--ease) .45s both;
}
@media (max-width: 960px) { .hero-sub { margin: 0 auto; } }

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

/* ─── main + cards ────────────────────────────────────────────────────── */
main {
  max-width: 1080px; margin: 12px auto 100px; padding: 0 28px;
  display: grid; gap: 32px;
}
.settings-main { max-width: 800px; margin: 30px auto 100px; padding: 0 28px; }
.card {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 44px;
  box-shadow: var(--shadow-2);
  overflow: hidden;
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(201, 169, 97, 0.06) 0%, transparent 40%);
  pointer-events: none;
}
.card::after {
  content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 97, 0.3), transparent);
  pointer-events: none;
}
[data-theme="light"] .card {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 23, 42, 0.10);
}
[data-theme="light"] .card::before {
  background: linear-gradient(135deg, rgba(230, 189, 84, 0.10) 0%, transparent 36%);
}
[data-theme="light"] .card::after {
  background: linear-gradient(90deg, transparent, rgba(179, 131, 34, 0.34), transparent);
}
.card-head { margin-bottom: 28px; position: relative; }
.card-head h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: 34px; line-height: 1.18; letter-spacing: -0.02em;
  margin: 0 0 8px; color: var(--text);
}
.card-head .num {
  font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--gold);
  letter-spacing: 0.14em; margin-right: 14px; vertical-align: 4px;
  padding: 4px 11px; border: 1px solid var(--line); border-radius: 6px;
  background: rgba(201, 169, 97, 0.06);
  display: inline-block;
}
.card-head p { margin: 0; font-size: 14px; }
.section-h {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--text-2);
  margin: 36px 0 14px; display: flex; align-items: center; gap: 10px;
}
.section-h .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 12px var(--gold);
}

/* ─── form ────────────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }

label { display: block; }
.lbl {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-2);
  margin-bottom: 8px;
}
.lbl em { font-style: normal; color: var(--gold); margin: 0 4px; }

input[type=text], input[type=url], input[type=password], input[type=email], textarea, select {
  width: 100%; background: var(--input-bg); border: 1px solid var(--line-2);
  color: var(--text); border-radius: var(--r-sm); padding: 14px 16px;
  font: inherit; outline: none;
  transition: border-color .2s, background .2s, box-shadow .25s var(--ease);
}
input:hover, textarea:hover, select:hover { border-color: rgba(201, 169, 97, 0.25); }
input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  background: var(--input-bg-focus);
  box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.12);
}
textarea { resize: vertical; min-height: 100px; font-family: var(--sans); }
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%23c9a961' d='M6 9L1 4h10z'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 40px; cursor: pointer;
}
[data-theme="light"] select option { background: #ffffff; color: var(--text); }
[data-theme="dark"] select option, :root:not([data-theme="light"]) select option { background: #161b22; color: var(--text); }

.hint { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; letter-spacing: 0; text-transform: none; }

/* file drop zone */
.file-drop { position: relative; }
.file-drop input[type=file] { position: absolute; inset: 26px 0 0; opacity: 0; cursor: pointer; z-index: 2; }
.drop-hint {
  display: flex; align-items: center; gap: 20px;
  padding: 30px 26px; border: 1.5px dashed rgba(201, 169, 97, 0.28);
  border-radius: var(--r-md); background: var(--input-bg);
  color: var(--text-2);
  transition: border-color .25s, background .25s, transform .25s var(--ease), box-shadow .3s var(--ease);
}
.file-drop:hover .drop-hint,
.file-drop.drag .drop-hint,
body.page-dragging .file-drop .drop-hint {
  border-color: var(--gold);
  background: rgba(201, 169, 97, 0.07);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 18px 36px -22px rgba(201, 169, 97, 0.4);
}
[data-theme="light"] .drop-hint { border-color: rgba(30, 58, 138, 0.25); }
[data-theme="light"] .file-drop:hover .drop-hint,
[data-theme="light"] .file-drop.drag .drop-hint,
[data-theme="light"] body.page-dragging .file-drop .drop-hint {
  border-color: var(--accent);
  background: rgba(30, 58, 138, 0.04);
  box-shadow: 0 18px 36px -22px rgba(30, 58, 138, 0.30);
}
.drop-hint svg { color: var(--gold); flex-shrink: 0; transition: transform .4s var(--ease); }
[data-theme="light"] .drop-hint svg { color: var(--accent); }
.file-drop:hover .drop-hint svg,
.file-drop.drag .drop-hint svg,
body.page-dragging .file-drop .drop-hint svg { transform: translateY(-3px) scale(1.06); }
.drop-hint strong { color: var(--text); font-weight: 700; display: block; margin-bottom: 4px; font-size: 15px; }
.drop-hint .hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 4; }
.file-list .file {
  position: relative;
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  background: rgba(201, 169, 97, 0.05); border: 1px solid var(--line);
  border-radius: var(--r-sm); font-size: 13px;
  animation: fadeUp .4s var(--ease) both;
  transition: border-color .2s, transform .2s var(--ease);
}
.file-list .file:hover { border-color: rgba(201, 169, 97, 0.4); transform: translateX(2px); }
.file-list .file .ext {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; color: var(--gold);
  background: rgba(201, 169, 97, 0.10); padding: 4px 10px; border-radius: 5px;
  text-transform: uppercase; letter-spacing: 0.14em;
}
[data-theme="light"] .file-list .file { background: rgba(30, 58, 138, 0.04); border-color: rgba(30, 58, 138, 0.18); }
[data-theme="light"] .file-list .file:hover { border-color: rgba(30, 58, 138, 0.36); }
[data-theme="light"] .file-list .file .ext { color: var(--accent); background: rgba(30, 58, 138, 0.08); }
.file-remove {
  position: relative; z-index: 5;
  width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--line-2);
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.04); color: var(--muted);
  font: 700 18px/1 var(--sans); cursor: pointer;
  transition: color .2s, border-color .2s, background .2s, transform .2s var(--ease);
}
.file-remove:hover {
  color: #ffb4a9; border-color: rgba(255, 120, 104, 0.45);
  background: rgba(255, 120, 104, 0.10); transform: scale(1.04);
}
[data-theme="light"] .file-remove { background: rgba(30, 58, 138, 0.04); }

/* PIN gate */
.pin-lock {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(circle at 24% 18%, rgba(201, 169, 97, 0.18), transparent 32%),
    radial-gradient(circle at 82% 14%, rgba(36, 58, 116, 0.25), transparent 34%),
    rgba(5, 8, 15, 0.88);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}
.pin-card {
  width: min(440px, 100%);
  border: 1px solid rgba(201, 169, 97, 0.28);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(25, 29, 37, 0.96), rgba(9, 13, 22, 0.96));
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42), 0 0 34px rgba(201, 169, 97, 0.10);
  padding: 34px;
  text-align: center;
}
.pin-mark {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 18px;
  display: grid; place-items: center;
  color: var(--gold); background: rgba(201, 169, 97, 0.09);
  border: 1px solid rgba(201, 169, 97, 0.25);
}
.pin-card h2 {
  margin: 0 0 8px; font-family: var(--serif); font-size: 30px; color: var(--text);
}
.pin-card p { margin: 0 0 22px; color: var(--muted); line-height: 1.6; }
.pin-form { display: grid; gap: 12px; }
.pin-form input {
  text-align: center; letter-spacing: 0.32em; font-family: var(--mono);
  font-size: 22px; padding: 15px 16px;
}
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 2px 0 4px;
}
.pin-pad button {
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(201, 169, 97, 0.22);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s var(--ease), border-color .18s, background .18s, color .18s;
}
.pin-pad button:hover,
.pin-pad button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(201, 169, 97, 0.48);
  background: rgba(201, 169, 97, 0.10);
  color: var(--gold-2);
  outline: none;
}
.pin-pad button[data-pin-action] {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-2);
}
.pin-error { min-height: 18px; color: #ff8f82; font-size: 13px; }
.pin-lock.hidden { display: none; }

/* CTA */
.form-cta {
  margin-top: 32px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.form-cta .status { margin-left: auto; max-width: 100%; }
/* Tighten export-menu buttons slightly so all 5 fit on one row */
.form-cta .export-menu-btn,
.form-cta .listing-draft-btn {
  padding: 12px 16px;
}
.form-cta #reset {
  padding: 12px 16px;
  margin-left: auto;
}
.form-cta .quick-clear {
  margin-left: auto;
  padding-inline: 16px;
  border-color: rgba(201, 169, 97, 0.28);
  background: rgba(255, 255, 255, 0.025);
}
.form-cta .quick-clear:hover {
  border-color: rgba(201, 169, 97, 0.48);
  background: rgba(201, 169, 97, 0.07);
}
.btn-primary, .btn-secondary, .btn-ghost, .btn-danger {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: var(--r-sm);
  font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .25s, background .25s, border-color .25s;
  border: 1px solid transparent; position: relative; overflow: hidden;
}
.btn-primary {
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 50%, var(--gold-deep));
  color: #1a140a;
  box-shadow: 0 8px 22px -10px rgba(201, 169, 97, 0.6),
              0 1px 0 rgba(255, 255, 255, 0.2) inset;
}
.btn-primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
  transform: translateX(-110%);
  transition: transform .8s var(--ease);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(201, 169, 97, 0.7), 0 1px 0 rgba(255, 255, 255, 0.25) inset; }
.btn-primary:hover::before { transform: translateX(110%); }
.btn-primary:disabled { opacity: 0.55; cursor: progress; transform: none; }

.btn-secondary {
  background: rgba(201, 169, 97, 0.08);
  color: var(--text);
  border-color: rgba(201, 169, 97, 0.4);
}
.btn-secondary:hover { background: rgba(201, 169, 97, 0.15); transform: translateY(-1px); border-color: var(--gold); }

.btn-ghost {
  background: transparent; color: var(--text-2);
  border-color: var(--line-2);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(201, 169, 97, 0.4); background: rgba(201, 169, 97, 0.04); }

.btn-danger {
  background: rgba(255, 111, 111, 0.10);
  color: var(--bad);
  border-color: rgba(255, 111, 111, 0.35);
}
.btn-danger:hover { background: rgba(255, 111, 111, 0.16); transform: translateY(-1px); }

[data-theme="light"] input[type=text],
[data-theme="light"] input[type=url],
[data-theme="light"] input[type=password],
[data-theme="light"] input[type=email],
[data-theme="light"] textarea,
[data-theme="light"] select {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 1px 2px rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.10);
}
[data-theme="light"] input:hover,
[data-theme="light"] textarea:hover,
[data-theme="light"] select:hover {
  border-color: rgba(30, 58, 138, 0.30);
}
[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.10);
}

/* Light mode primary = navy with gold accent text */
[data-theme="light"] .btn-primary {
  background: linear-gradient(180deg, #2447a8 0%, #1e3a8a 50%, #15296b 100%);
  color: #fff;
  border-color: rgba(15, 23, 42, 0.30);
  box-shadow:
    0 14px 30px -14px rgba(30, 58, 138, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 0 0 1px rgba(201, 169, 97, 0.35) inset;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .btn-primary:hover {
  background: linear-gradient(180deg, #2a55c2 0%, #1e3a8a 50%, #122366 100%);
  box-shadow:
    0 18px 36px -14px rgba(30, 58, 138, 0.65),
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 0 0 1px rgba(201, 169, 97, 0.55) inset;
  transform: translateY(-2px);
}
[data-theme="light"] .btn-primary svg { color: var(--gold-2); }

[data-theme="light"] .btn-secondary {
  background: #ffffff;
  color: var(--accent-deep);
  border-color: rgba(30, 58, 138, 0.30);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
[data-theme="light"] .btn-secondary:hover {
  background: #f3f6ff;
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 8px 18px -10px rgba(30, 58, 138, 0.35);
}
[data-theme="light"] .btn-ghost {
  background: rgba(255, 255, 255, 0.60);
  color: #334155;
  border-color: rgba(15, 23, 42, 0.14);
}
[data-theme="light"] .btn-ghost:hover {
  color: var(--accent);
  background: #ffffff;
  border-color: rgba(30, 58, 138, 0.30);
}
[data-theme="light"] .form-cta .quick-clear { background: rgba(255, 255, 255, 0.72); border-color: rgba(30, 58, 138, 0.20); }
[data-theme="light"] .form-cta .quick-clear:hover { background: #ffffff; border-color: rgba(30, 58, 138, 0.32); }
[data-theme="light"] .status-block,
[data-theme="light"] .progress,
[data-theme="light"] .drop-hint {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 23, 42, 0.10);
}

/* Light mode header / nav / icon polish */
[data-theme="light"] .header-nav a:hover { color: var(--accent); }
[data-theme="light"] .header-nav a::after { background: var(--accent); }
[data-theme="light"] .icon-btn { border-color: rgba(15, 23, 42, 0.14); color: #334155; }
[data-theme="light"] .icon-btn:hover {
  border-color: rgba(30, 58, 138, 0.40);
  background: rgba(30, 58, 138, 0.06);
  color: var(--accent);
}
[data-theme="light"] .phone {
  color: var(--accent);
  border-color: rgba(30, 58, 138, 0.28);
  background: rgba(255, 255, 255, 0.7);
}
[data-theme="light"] .phone::before {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
[data-theme="light"] .phone:hover { border-color: var(--accent); background: #f3f6ff; }

/* Light mode card refinement */
[data-theme="light"] .card::after {
  background: linear-gradient(90deg, transparent, rgba(30, 58, 138, 0.40), rgba(179, 131, 34, 0.35), transparent);
}
[data-theme="light"] .val-card.primary {
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.06), #ffffff);
  border-color: rgba(30, 58, 138, 0.28);
  box-shadow: 0 28px 60px -32px rgba(30, 58, 138, 0.30);
}
[data-theme="light"] .val-card.primary::after {
  background: linear-gradient(90deg, transparent, var(--accent), var(--gold), transparent);
}
[data-theme="light"] .val-number.big {
  background: linear-gradient(180deg, #0f172a 0%, var(--accent) 60%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text;
}
[data-theme="light"] .progress-fill {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent), var(--gold));
  box-shadow: 0 0 12px rgba(30, 58, 138, 0.35);
}
[data-theme="light"] .stage.active .stage-num {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #fff; border-color: var(--accent);
  box-shadow: 0 0 16px rgba(30, 58, 138, 0.45);
}
[data-theme="light"] .stage.done .stage-num {
  background: var(--accent-deep); border-color: var(--accent-deep);
}
[data-theme="light"] .stage.active .stage-label { color: var(--accent); }
[data-theme="light"] .progress-status .ps-model {
  color: var(--accent);
  border-color: rgba(30, 58, 138, 0.28);
  background: rgba(30, 58, 138, 0.04);
}
[data-theme="light"] .bar-fill {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent), var(--gold));
  box-shadow: 0 0 12px rgba(30, 58, 138, 0.30);
}
[data-theme="light"] .bar-val { color: var(--accent); }
[data-theme="light"] .insights li::before {
  background: radial-gradient(circle at 30% 30%, var(--accent-2), var(--accent-deep));
  box-shadow: 0 0 14px rgba(30, 58, 138, 0.35);
}
[data-theme="light"] .insights li:hover {
  border-color: rgba(30, 58, 138, 0.30);
  background: rgba(30, 58, 138, 0.04);
}
[data-theme="light"] thead { background: rgba(30, 58, 138, 0.04); }
[data-theme="light"] th { color: var(--accent); border-bottom-color: rgba(30, 58, 138, 0.20); }
[data-theme="light"] tbody tr:hover td { background: rgba(30, 58, 138, 0.03); }
[data-theme="light"] td a { color: var(--accent); border-bottom-color: rgba(30, 58, 138, 0.40); }

/* Light mode eyebrow + section headings */
[data-theme="light"] .eyebrow {
  color: var(--accent);
  border-color: rgba(30, 58, 138, 0.25);
  background: rgba(30, 58, 138, 0.04);
}
[data-theme="light"] .eyebrow-dot {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
[data-theme="light"] .card-head .num {
  color: var(--accent);
  border-color: rgba(30, 58, 138, 0.25);
  background: rgba(30, 58, 138, 0.04);
}
[data-theme="light"] .section-h .dot {
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
}

.status {
  font-size: 13px; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 8px; min-height: 18px;
}
.status-block {
  display: flex; margin-top: 14px; padding: 10px 14px;
  background: rgba(201, 169, 97, 0.04); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); width: 100%;
}
.status-block:empty { display: none; }

/* ─── progress stages ────────────────────────────────────────────────── */
.progress {
  margin-top: 22px; padding: 18px 18px 22px;
  background: var(--input-bg); border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  animation: fadeUp .5s var(--ease) both;
}
.progress-rail {
  height: 4px; background: rgba(0, 0, 0, 0.06); border-radius: 999px;
  overflow: hidden; margin-bottom: 18px; position: relative;
}
[data-theme="dark"] .progress-rail, :root:not([data-theme="light"]) .progress-rail { background: rgba(255, 255, 255, 0.06); }
.progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-2));
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(201, 169, 97, 0.4);
  transition: width .5s var(--ease);
  position: relative;
}
.progress-fill::after {
  content: ""; position: absolute; right: 0; top: 50%;
  width: 8px; height: 8px; transform: translate(50%, -50%);
  background: var(--gold-2); border-radius: 50%;
  box-shadow: 0 0 14px var(--gold);
  animation: pulseDot 1.4s ease-in-out infinite;
}
.progress-stages {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  margin-bottom: 14px;
}
.stage {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
  opacity: 0.4; transition: opacity .35s var(--ease);
}
.stage.active, .stage.done { opacity: 1; }
.stage-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--input-bg); border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  color: var(--text-2); transition: all .35s var(--ease);
}
.stage.active .stage-num {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1a140a; border-color: var(--gold);
  box-shadow: 0 0 16px rgba(201, 169, 97, 0.5);
  transform: scale(1.1);
}
.stage.done .stage-num {
  background: var(--gold-deep); color: white; border-color: var(--gold-deep);
}
.stage.done .stage-num { font-size: 0; }
.stage.done .stage-num::before { content: "✓"; font-size: 14px; }
.stage-label {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.04em; color: var(--text-2);
  line-height: 1.3;
}
.stage.active .stage-label { color: var(--gold); }
.progress-status {
  text-align: center; font-size: 13px; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap;
}
.progress-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); animation: pulseDot 1.4s ease-in-out infinite;
}
.progress-status .ps-stage { color: var(--text); font-weight: 500; }
.progress-status .ps-model {
  font-family: var(--mono); font-size: 11.5px;
  color: var(--gold); font-weight: 600;
  padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(201, 169, 97, 0.06);
}
.progress-status .ps-time {
  font-family: var(--mono); color: var(--text-2);
}
.progress-status .ps-sep { color: var(--muted); }
.status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
  display: none;
}
.status:not(:empty)::before { display: inline-block; animation: pulseDot 1.4s ease-in-out infinite; }
.status.error { color: var(--bad); }
.status.error::before { background: var(--bad); animation: none; }

/* ─── results ─────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.muted.small { font-size: 12.5px; }

.result-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.result-meta-mini { font-family: var(--mono); }

.valuation-block {
  display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 14px;
  margin: 22px 0 10px;
}
.val-card {
  position: relative; padding: 24px 22px; border-radius: var(--r-md);
  background: var(--input-bg); border: 1px solid var(--line-2);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.val-card:hover { transform: translateY(-2px); border-color: rgba(201, 169, 97, 0.30); }
.val-card.primary {
  background: linear-gradient(180deg, rgba(201, 169, 97, 0.14), var(--input-bg));
  border-color: rgba(201, 169, 97, 0.36);
  box-shadow: 0 30px 60px -30px rgba(201, 169, 97, 0.40);
}
.val-card.primary::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.val-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--text-2); margin-bottom: 12px;
  font-weight: 500;
}
.val-number {
  font-family: var(--serif); font-weight: 700; font-size: 38px;
  color: var(--text); letter-spacing: -0.02em; line-height: 1;
}
.val-number.big {
  font-size: 58px; font-weight: 700;
  background: linear-gradient(180deg, var(--text) 0%, var(--gold) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.val-sav { margin-top: 10px; font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); font-weight: 500; }

/* chips */
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 8px; }
.chip {
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2);
  padding: 7px 14px; border-radius: 999px;
  font-family: var(--mono); font-size: 11px; color: var(--text-2);
  letter-spacing: 0.04em;
}
[data-theme="light"] .chip { background: rgba(0, 0, 0, 0.03); }
.chip.demand[data-demand="Good"] { background: rgba(108, 194, 139, 0.10); color: #4d9d6e; border-color: rgba(108, 194, 139, 0.3); }
.chip.demand[data-demand="Fair"] { background: rgba(230, 201, 122, 0.10); color: var(--gold-deep); border-color: rgba(230, 201, 122, 0.3); }
.chip.demand[data-demand="Weak"] { background: rgba(224, 144, 110, 0.08); color: #c87b4f; border-color: rgba(224, 144, 110, 0.3); }
.chip.demand[data-demand="Poor"] { background: rgba(224, 123, 110, 0.10); color: var(--bad); border-color: rgba(224, 123, 110, 0.3); }
.chip.conf[data-conf="high"]     { background: rgba(108, 194, 139, 0.10); color: #4d9d6e; border-color: rgba(108, 194, 139, 0.3); }
.chip.conf[data-conf="medium"]   { background: rgba(230, 201, 122, 0.10); color: var(--gold-deep); border-color: rgba(230, 201, 122, 0.3); }
.chip.conf[data-conf="low"]      { background: rgba(224, 123, 110, 0.10); color: var(--bad); border-color: rgba(224, 123, 110, 0.3); }

/* unverified-comparable badge (source column of the comps table) */
.badge-unverified {
  display: inline-block; margin-left: 6px; padding: 1px 8px;
  border: 1px solid rgba(230, 201, 122, 0.35); border-radius: 999px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.05em;
  color: var(--muted); vertical-align: middle; white-space: nowrap;
  cursor: help;
}

/* listing-source health panel (Settings) */
.source-health {
  margin-top: 16px; padding: 16px; border: 1px solid var(--line-2);
  border-radius: 12px; background: rgba(255, 255, 255, 0.02);
}
[data-theme="light"] .source-health { background: rgba(0, 0, 0, 0.02); }
.sh-head { margin-bottom: 8px; }
.sh-ok, .sh-risk { font-size: 13px; margin-bottom: 12px; }
.sh-ok { color: #4d9d6e; }
.sh-risk { color: var(--gold-deep); }
.sh-list { display: grid; gap: 6px; }
.sh-row {
  display: grid; grid-template-columns: 10px minmax(0, 1.7fr) minmax(0, 1fr) auto;
  gap: 10px; align-items: center; font-size: 12px;
}
.sh-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); }
.sh-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sh-dot.ok { background: #4d9d6e; }
.sh-dot.warn { background: var(--gold); }
.sh-dot.bad { background: var(--bad); }

/* report text editor */
.text-editor {
  margin: 14px 0 4px; padding: 18px; border: 1px solid var(--line-2);
  border-radius: 14px; background: rgba(255, 255, 255, 0.02);
}
[data-theme="light"] .text-editor { background: rgba(0, 0, 0, 0.02); }
.text-editor-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 14px; }
.text-editor-field { display: block; margin-bottom: 14px; }
.text-editor-field .lbl { display: block; margin-bottom: 6px; }
/* Read first, edit on click (22 Oct 2026): a section reads as text until it is clicked. */
.text-editor-field [hidden] { display: none !important; }
.text-editor-field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.text-editor-edit {
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
  color: var(--gold, #d9ae6a); font: inherit; font-size: 13px; font-weight: 600;
}
.text-editor-edit:hover, .text-editor-edit:focus-visible { text-decoration: underline; }
.text-editor-preview {
  padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; cursor: text;
  color: var(--text); font-size: 13.5px; line-height: 1.6;
}
.text-editor-preview:hover, .text-editor-preview:focus-visible { border-color: var(--line-2); outline: none; }
.text-editor-preview p { margin: 0 0 8px; }
.text-editor-preview p:last-child { margin-bottom: 0; }
.text-editor-preview ul { margin: 0; padding-left: 18px; }
.text-editor-preview li { margin: 0 0 4px; }
.text-editor-field textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2);
  color: var(--text); font-family: var(--sans); font-size: 13.5px; line-height: 1.55;
  resize: vertical;
}
[data-theme="light"] .text-editor-field textarea { background: rgba(0, 0, 0, 0.02); }
.text-editor-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

/* "Prepared by" broker fields (Settings) */
.broker-field { border: 0; padding: 0; margin: 0; }
.broker-picker { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.broker-picker select {
  flex: 1 1 280px; max-width: 460px; padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2);
  border-radius: 10px; color: var(--text); font-family: var(--sans); font-size: 14px;
}
[data-theme="light"] .broker-picker select { background: rgba(0, 0, 0, 0.03); }
.btn-small { padding: 8px 14px; font-size: 12.5px; }
/* a notice that can act on itself (e.g. "Add operating hours") */
.notice-btn { margin-top: 12px; display: flex; width: fit-content; }
.broker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.broker-grid label { display: block; }
.broker-grid label > span {
  display: block; margin-bottom: 6px; font-size: 12px; color: var(--text-2);
  letter-spacing: 0.02em;
}

/* Results actions (Change category / Edit report text / Photos). Styled as
   real buttons: as small mono chips in the meta row they read as read-only
   labels and staff didn't notice they were clickable (feedback 19 Sep 2026). */
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 4px; }
.action-btn { padding: 11px 18px; font-size: 13.5px; }
/* "this appraisal carries edits / photos" — filled instead of outlined. */
.action-btn.is-set {
  background: rgba(230, 201, 122, 0.18); border-color: var(--gold); color: var(--text);
}
[data-theme="light"] .action-btn.is-set { background: rgba(201, 169, 97, 0.22); }

/* manual category override */
.industry-override { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 4px; }
.industry-override select {
  flex: 1 1 260px; max-width: 420px; padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2);
  border-radius: 10px; color: var(--text);
  font-family: var(--sans); font-size: 14px;
}
[data-theme="light"] .industry-override select { background: rgba(0, 0, 0, 0.03); }

/* comparable seed-category chip on the comps heading */
.seed-chip {
  display: inline-block; margin-left: 10px; padding: 2px 10px;
  border: 1px solid var(--line-2); border-radius: 999px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em;
  color: var(--muted); vertical-align: middle; cursor: help;
  text-transform: none; font-weight: 400;
}

/* "Not a comparable": a quiet remove button at the end of each comparables row */
#r-comp .col-remove { width: 40px; padding-left: 0; text-align: right; }
#r-comp .comp-remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; min-height: 0; padding: 0;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer;
  box-shadow: none; transition: color 0.15s, border-color 0.15s, background 0.15s;
}
#r-comp .comp-remove:hover, #r-comp .comp-remove:focus-visible {
  color: #e2675f; border-color: #e2675f; background: rgba(226, 103, 95, 0.1); outline: none;
}
.comp-removed { margin: 10px 2px 0; line-height: 1.7; }
.comp-removed-item { display: inline-block; margin-right: 14px; }
.comp-removed .link-btn {
  min-height: 0; padding: 0; border: 0; background: none; box-shadow: none;
  color: var(--gold, #c9a227); font: inherit; text-decoration: underline; cursor: pointer;
}

/* score bars */
.bars { display: grid; gap: 14px; }
.bar { display: grid; grid-template-columns: 200px 1fr 60px; align-items: center; gap: 14px; }
.bar-label { font-size: 13px; color: var(--text-2); }
.bar-track {
  height: 6px; background: rgba(0, 0, 0, 0.08); border-radius: 999px; overflow: hidden;
}
[data-theme="dark"] .bar-track, :root:not([data-theme="light"]) .bar-track { background: rgba(255,255,255,0.05); }
.bar-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-2));
  border-radius: 999px; box-shadow: 0 0 12px rgba(201, 169, 97, 0.4);
  transition: width 1.4s var(--ease);
}
.bar-val { font-family: var(--mono); font-size: 13px; color: var(--gold); text-align: right; }

/* insights list */
.insights { padding: 0; margin: 0; list-style: none; display: grid; gap: 10px; }
.insights li {
  position: relative; padding: 14px 16px 14px 44px;
  background: var(--input-bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font-size: 14px;
  transition: border-color .2s, transform .2s var(--ease), background .2s;
}
.insights li:hover { border-color: rgba(201, 169, 97, 0.3); transform: translateX(3px); background: rgba(201, 169, 97, 0.04); }
.insights li::before {
  content: ""; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  background: radial-gradient(circle at 30% 30%, var(--gold-2), var(--gold-deep));
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(201, 169, 97, 0.4);
}

/* tables */
.table-wrap {
  overflow-x: auto; border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--table-bg);
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead { background: rgba(201, 169, 97, 0.04); }
th {
  font-family: var(--mono); font-weight: 500; font-size: 10.5px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
  padding: 14px 16px; text-align: left;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 14px 16px; border-bottom: 1px solid var(--line-2);
  vertical-align: top; color: var(--text); transition: background .15s;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(201, 169, 97, 0.03); }
td a { color: var(--gold); text-decoration: none; border-bottom: 1px dashed rgba(201, 169, 97, 0.4); }
td a:hover { border-bottom-style: solid; }

.chart-wrap {
  margin-top: 20px; background: var(--table-bg);
  border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 20px;
  height: 320px; position: relative;
}

/* ─── Recently delisted (likely sold) section ─────────────────────────── */
#r-delisted-section { margin-top: 30px; }
.delisted-disclaimer {
  margin: -8px 0 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 12px; line-height: 1.5;
}
[data-theme="light"] .delisted-disclaimer {
  background: rgba(30, 58, 138, 0.04);
  border-left-color: var(--accent);
}
.delisted-badge {
  display: inline-block;
  font-family: var(--mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 2px 9px; border-radius: 999px;
  margin-right: 8px; margin-bottom: 4px;
  background: rgba(201, 169, 97, 0.10);
  color: var(--gold-deep);
  border: 1px solid rgba(201, 169, 97, 0.35);
  vertical-align: middle;
}
[data-theme="light"] .delisted-badge {
  background: rgba(30, 58, 138, 0.06);
  color: var(--accent);
  border-color: rgba(30, 58, 138, 0.24);
}
#r-delisted tbody tr { opacity: 0.92; }
#r-delisted tbody tr:hover { opacity: 1; }
#r-delisted thead { background: rgba(201, 169, 97, 0.02); }

.actions { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
/* Action-row report buttons: matched size for Vendor / Buyer / Draft listing */
.actions .listing-draft-btn,
.actions .export-menu-btn {
  min-width: 168px;
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 600;
  justify-content: center;
}
.actions .export-menu-btn { justify-content: space-between; }
.profile-export {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 5px;
  background: rgba(201, 169, 97, 0.05); border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
}
.export-menu { position: relative; }
.export-menu-btn {
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.export-menu-label { display: inline-flex; align-items: center; gap: 8px; }
.export-menu-btn .chev {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1;
  opacity: 0.7;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.export-menu-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  min-width: 100%;
  z-index: 40;
  display: none;
  gap: 2px;
  padding: 5px;
  background: var(--surface-2);
  border: 1px solid rgba(201, 169, 97, 0.24);
  border-radius: 10px;
  box-shadow: 0 24px 48px -20px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.03) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.export-menu.open .export-menu-panel { display: grid; animation: fadeUp .18s var(--ease); }
.export-menu.open .chev { transform: rotate(180deg); opacity: 1; }
.export-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  font-size: 12.5px;
  text-align: left;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease);
}
.export-menu-item small {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
}
.export-menu-item:hover,
.export-menu-item:focus-visible {
  background: rgba(201, 169, 97, 0.12);
  border-color: rgba(201, 169, 97, 0.28);
  outline: none;
  transform: translateX(2px);
}
[data-theme="light"] .profile-export {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 14px 28px -24px rgba(15, 23, 42, 0.25);
}
[data-theme="light"] .export-menu-panel {
  background: #ffffff;
  border-color: rgba(30, 58, 138, 0.18);
  box-shadow: 0 22px 46px -22px rgba(15, 23, 42, 0.22);
}
[data-theme="light"] .export-menu-item:hover,
[data-theme="light"] .export-menu-item:focus-visible {
  background: rgba(30, 58, 138, 0.06);
  border-color: rgba(30, 58, 138, 0.22);
  color: var(--accent);
}
[data-theme="light"] .export-menu-item small { color: var(--accent); opacity: 0.75; }

/* ─── report archive (settings) ──────────────────────────────────────── */
.settings-main { display: grid; gap: 28px; }
.pin-settings {
  display: grid;
  grid-template-columns: minmax(210px, 0.9fr) minmax(260px, 1.2fr);
  gap: 16px;
  align-items: start;
  padding: 17px 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(201, 169, 97, 0.10), transparent 38%),
    var(--input-bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
}
.pin-settings-copy strong {
  display: block;
  margin: 3px 0 6px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.15;
  color: var(--text);
}
.pin-settings-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pin-field { display: grid; gap: 6px; }
.pin-field span {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.pin-settings-fields input {
  min-width: 0;
  padding: 12px 12px;
  font-family: var(--sans);
  letter-spacing: 0;
}
.pin-settings-fields .btn-secondary {
  grid-column: 1 / -1;
  justify-self: end;
  padding: 12px 14px;
  white-space: nowrap;
}
.pin-status {
  grid-column: 2;
  min-height: 20px;
  padding: 0;
  margin: -8px 0 0;
  background: transparent;
  border: 0;
}
[data-theme="light"] .pin-settings {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.10);
}
[data-theme="light"] .pin-field span { color: var(--accent); }
@media (max-width: 900px) {
  .pin-settings { grid-template-columns: 1fr; }
  .pin-settings-fields { grid-template-columns: 1fr 1fr; }
  .pin-settings-fields .btn-secondary { grid-column: span 2; justify-content: center; }
  .pin-status { grid-column: 1; margin: -6px 0 0; }
}
@media (max-width: 560px) {
  .pin-settings-fields { grid-template-columns: 1fr; }
  .pin-settings-fields .btn-secondary { grid-column: auto; }
  .form-cta .quick-clear { margin-left: 0; }
}
.archive-card { padding: 36px 38px; }
.archive-head {
  display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap;
  justify-content: space-between;
}
.archive-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.archive-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.archive-actions .btn-ghost {
  padding: 9px 14px; font-size: 12.5px;
}
.archive-actions .btn-ghost svg { color: var(--gold); }
[data-theme="light"] .archive-actions .btn-ghost svg { color: var(--accent); }

.danger-ghost { color: var(--bad) !important; border-color: rgba(224, 123, 110, 0.30) !important; }
.danger-ghost:hover { background: rgba(224, 123, 110, 0.08) !important; border-color: rgba(224, 123, 110, 0.50) !important; }

.archive-list {
  display: flex; flex-direction: column; gap: 8px;
}
.archive-empty {
  padding: 36px 22px; text-align: center;
  display: grid; gap: 6px; justify-items: center;
  background: var(--input-bg);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
}
.archive-empty .ae-ico {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; color: var(--gold);
  background: rgba(201, 169, 97, 0.08);
  border: 1px solid var(--line);
  margin-bottom: 6px;
}
[data-theme="light"] .archive-empty .ae-ico { color: var(--accent); background: rgba(30, 58, 138, 0.06); border-color: rgba(30, 58, 138, 0.20); }
.archive-empty strong { color: var(--text); font-weight: 700; }

.archive-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px;
  background: var(--input-bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  transition: border-color .2s, transform .2s var(--ease), background .2s;
}
.archive-row:hover {
  border-color: rgba(201, 169, 97, 0.35);
  background: rgba(201, 169, 97, 0.04);
  transform: translateX(2px);
}
[data-theme="light"] .archive-row:hover {
  border-color: rgba(30, 58, 138, 0.30);
  background: rgba(30, 58, 138, 0.03);
}
.archive-meta { flex: 1 1 auto; min-width: 0; }
.archive-name {
  font-family: var(--serif); font-weight: 700;
  font-size: 16px; letter-spacing: -0.01em;
  color: var(--text); margin-bottom: 4px;
  white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
}
.archive-sub {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-family: var(--mono); font-size: 11px;
  color: var(--text-2); letter-spacing: 0.04em;
  align-items: center;
}
.archive-kind {
  font-weight: 600; color: var(--gold); letter-spacing: 0.06em;
  text-transform: uppercase;
}
[data-theme="light"] .archive-kind { color: var(--accent); }
.archive-fmt {
  font-weight: 600; font-size: 9.5px; letter-spacing: 0.16em;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(201, 169, 97, 0.10); color: var(--gold);
  border: 1px solid var(--line);
  text-transform: uppercase;
}
[data-theme="light"] .archive-fmt { color: var(--accent); background: rgba(30, 58, 138, 0.06); border-color: rgba(30, 58, 138, 0.20); }
.archive-when { color: var(--text-2); }
.archive-model {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: var(--text-2); letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-2);
  text-transform: none;
}
.archive-model svg { color: var(--gold); opacity: 0.9; }
[data-theme="light"] .archive-model { background: rgba(15, 23, 42, 0.04); }
[data-theme="light"] .archive-model svg { color: var(--accent); }

.archive-row-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.archive-dl, .archive-del {
  padding: 8px 12px; font-size: 12.5px; gap: 6px;
  text-decoration: none;
}
.archive-del { padding: 8px 10px; }

.archive-note { margin: 14px 0 0; }

@media (max-width: 720px) {
  .archive-card { padding: 26px 22px; }
  .archive-row { flex-direction: column; align-items: stretch; }
  .archive-row-actions { justify-content: flex-end; }
}

/* ─── settings workflow explainer ────────────────────────────────────── */
.workflow-card { padding: 36px 38px; }
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.workflow-step,
.workflow-prompt {
  position: relative;
  padding: 17px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--input-bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  overflow: hidden;
}
.workflow-step::before,
.workflow-prompt::before {
  content: "";
  position: absolute; inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  opacity: 0.7;
}
.workflow-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.workflow-step h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--text);
}
.workflow-step p,
.workflow-prompt p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}
.workflow-step code,
.workflow-prompt code {
  color: var(--gold-2);
  font-family: var(--mono);
  font-size: 0.92em;
}
.workflow-prompt {
  margin-top: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(201, 169, 97, 0.10), transparent 36%),
    var(--input-bg);
}
[data-theme="light"] .workflow-step,
[data-theme="light"] .workflow-prompt {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.10);
}
[data-theme="light"] .workflow-step::before,
[data-theme="light"] .workflow-prompt::before {
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
}
[data-theme="light"] .workflow-kicker,
[data-theme="light"] .workflow-step code,
[data-theme="light"] .workflow-prompt code {
  color: var(--accent);
}

@media (max-width: 720px) {
  .workflow-card { padding: 26px 22px; }
  .workflow-grid { grid-template-columns: 1fr; }
}

/* ─── footer (compact) ────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line-2);
  padding: 28px 28px 24px;
  background: var(--footer-bg);
  transition: background .4s var(--ease);
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 1.6fr) auto 1fr;
  gap: 40px; align-items: center;
}
.footer-brand .footer-logo {
  height: 47px; width: auto; margin-bottom: 12px;
}
.footer-brand p {
  margin: 0; font-size: 12px; color: var(--text-2); line-height: 1.5;
}
.footer-links {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  align-items: center;
}
.footer-links a {
  color: var(--text-2); text-decoration: none; font-size: 12.5px;
  position: relative; padding: 4px 0;
  transition: color .2s var(--ease);
}
.footer-links a:hover { color: var(--gold); }
.footer-meta { text-align: right; }
.footer-meta p { margin: 0 0 4px; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.footer-meta .micro {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold-deep); margin-top: 6px;
}

/* ─── reveal animation ──────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
#results:not(.hidden) { animation: fadeUp .9s var(--ease); }

/* ─── locked engine card (V2 — Claude only) ──────────────────────────── */
.engine-locked {
  display: grid;
  gap: 12px;
}
.engine-locked-card {
  position: relative;
  padding: 18px 20px;
  background:
    linear-gradient(135deg, rgba(201, 169, 97, 0.10), rgba(201, 169, 97, 0) 70%),
    var(--input-bg);
  border: 1.5px solid rgba(201, 169, 97, 0.42);
  border-radius: var(--r-md);
  box-shadow: 0 18px 38px -18px rgba(201, 169, 97, 0.42);
}
[data-theme="light"] .engine-locked-card {
  background:
    linear-gradient(135deg, rgba(30, 58, 138, 0.08), rgba(30, 58, 138, 0) 70%),
    #ffffff;
  border-color: rgba(30, 58, 138, 0.28);
  box-shadow: 0 18px 38px -20px rgba(30, 58, 138, 0.28);
}
.engine-locked-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.engine-locked-name {
  font-family: var(--serif);
  font-size: 19px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.engine-locked-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
}
.engine-locked-desc code {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(201, 169, 97, 0.10);
  color: var(--gold);
  border: 1px solid var(--line);
}
[data-theme="light"] .engine-locked-desc code {
  background: rgba(30, 58, 138, 0.06);
  color: var(--accent);
  border-color: rgba(30, 58, 138, 0.22);
}

/* ─── engine cards (legacy V1 — kept for compat with older builds) ────── */
.engine-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.engine-card {
  display: block; cursor: pointer;
  padding: 16px 16px 16px 46px; position: relative;
  background: var(--input-bg); border: 1.5px solid var(--line-2);
  border-radius: var(--r-md);
  transition: all .25s var(--ease);
  overflow: hidden;
}
.engine-card:hover { border-color: rgba(201, 169, 97, 0.40); transform: translateY(-1px); box-shadow: 0 14px 28px -18px rgba(0,0,0,0.45); }
.engine-card.selected {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(201, 169, 97, 0.09), var(--input-bg));
  box-shadow: 0 14px 30px -16px rgba(201, 169, 97, 0.40);
}
.engine-card input[type=radio] { position: absolute; opacity: 0; }
.engine-card::before {
  content: ""; position: absolute; left: 16px; top: 19px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--input-bg);
  transition: all .25s var(--ease);
  z-index: 1;
}
.engine-card.selected::before {
  background: var(--gold); border-color: var(--gold);
  box-shadow: 0 0 12px rgba(201, 169, 97, 0.55),
              inset 0 0 0 3.5px var(--input-bg);
}
[data-theme="light"] .engine-card:hover { border-color: rgba(30, 58, 138, 0.40); box-shadow: 0 14px 28px -20px rgba(30, 58, 138, 0.28); }
[data-theme="light"] .engine-card.selected {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.05), #ffffff);
  box-shadow: 0 14px 30px -18px rgba(30, 58, 138, 0.28);
}
[data-theme="light"] .engine-card.selected::before {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 12px rgba(30, 58, 138, 0.42),
              inset 0 0 0 3.5px #ffffff;
}
.ec-body { position: relative; z-index: 1; }
.ec-title {
  font-family: var(--serif); font-size: 17px; font-weight: 700;
  color: var(--text); margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.ec-tag {
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.04); color: var(--text-2);
  border: 1px solid var(--line-2);
}
[data-theme="dark"] .ec-tag, :root:not([data-theme="light"]) .ec-tag { background: rgba(255, 255, 255, 0.04); }
.ec-tag.gold { background: rgba(201, 169, 97, 0.12); color: var(--gold); border-color: rgba(201, 169, 97, 0.32); }
[data-theme="light"] .ec-tag.gold { background: rgba(30, 58, 138, 0.08); color: var(--accent); border-color: rgba(30, 58, 138, 0.24); }
.ec-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.45; }

/* ─── AI model picker (Settings) ─────────────────────────────────────── */
.model-picker-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.model-picker-field .engine-cards { margin-top: 2px; }
#model-picker .engine-card { padding-block: 14px; }
#model-picker-loading { padding: 14px 4px; }

/* ─── active-model indicator (appraisal form head) ───────────────────── */
.model-indicator {
  position: absolute; top: 2px; right: 0;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 10px 6px 11px; border-radius: 999px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.02em; color: var(--text-2); text-decoration: none;
  background: rgba(201, 169, 97, 0.05); border: 1px solid var(--line-2);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.model-indicator svg { color: var(--gold); opacity: 0.9; flex-shrink: 0; }
.model-indicator .mi-label { color: var(--text); font-weight: 600; }
.model-indicator .mi-change {
  font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); padding-left: 8px; margin-left: 2px;
  border-left: 1px solid var(--line-2);
}
.model-indicator:hover {
  color: var(--text); border-color: rgba(201, 169, 97, 0.4);
  background: rgba(201, 169, 97, 0.09); transform: translateY(-1px);
}
[data-theme="light"] .model-indicator { background: rgba(30, 58, 138, 0.04); }
[data-theme="light"] .model-indicator svg,
[data-theme="light"] .model-indicator .mi-change { color: var(--accent); }
[data-theme="light"] .model-indicator:hover { border-color: rgba(30, 58, 138, 0.30); background: rgba(30, 58, 138, 0.07); }
@media (max-width: 560px) {
  .model-indicator { position: static; margin-top: 12px; }
  .card-head { position: relative; }
}

/* ─── responsive ─────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .header-inner { grid-template-columns: auto 1fr auto; gap: 12px; }
  .header-nav { display: none; }
  .hero { padding: 40px 20px 24px; }
  .hero-title { font-size: clamp(28px, 7vw, 42px); }
  .card { padding: 28px 22px; }
  .card-head h2 { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .engine-cards { grid-template-columns: 1fr; }
  .valuation-block { grid-template-columns: 1fr; }
  .val-number.big { font-size: 44px; }
  .bar { grid-template-columns: 130px 1fr 50px; }
  .footer-inner { grid-template-columns: 1fr; gap: 16px; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-meta { text-align: center; }
  .status { margin-left: 0; }
  .progress-stages { grid-template-columns: repeat(5, 1fr); }
  .stage-label { font-size: 8.5px; }
  .phone { display: none; }
  .profile-export { width: 100%; }
  .export-menu { flex: 1 1 180px; }
  .export-menu-btn { width: 100%; min-width: 0; }
}


/* ─── V1 polish ──────────────────────────────────────────────────────── */

/* Extrapolation / extraction warning banner shown at top of results card */
.notice-warning {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 18px 0 6px;
  padding: 12px 16px;
  background: rgba(230, 201, 122, 0.10);
  border: 1px solid rgba(230, 201, 122, 0.30);
  border-radius: var(--r-sm);
  font-size: 13px; color: var(--text);
  animation: fadeUp .4s var(--ease);
}
[data-theme="light"] .notice-warning {
  background: rgba(217, 158, 44, 0.08);
  border-color: rgba(217, 158, 44, 0.30);
}
.notice-warning svg { color: var(--gold); flex-shrink: 0; margin-top: 2px; }
[data-theme="light"] .notice-warning svg { color: var(--gold-deep); }
.notice-warning strong { display: block; margin-bottom: 2px; font-weight: 700; }
.notice-warning .muted { color: var(--text-2); font-size: 12.5px; }
/* The body is a block and bold words inside it stay in the sentence: the title's
   display:block also hit the figures in "Check these figures", leaving a lone
   full stop, and its button sat beside the last word (health check 25 Sep 2026). */
.notice-warning .muted { display: block; }
.notice-warning .muted strong { display: inline; margin: 0; }
.notice-warning .notice-btn { display: flex; }      /* beats noir.css inline-flex on all buttons */
/* The owner's market salary box in the "Priced on EBITDA" notice (6 Oct 2026). */
.notice-warning .salary-edit {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px;
}
.notice-warning .salary-edit-field { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.notice-warning .salary-edit input {
  width: 9.5em; min-width: 0; padding: 8px 12px; border-radius: var(--r-sm); font-variant-numeric: tabular-nums;
}
.notice-warning .salary-edit .link-btn {
  min-height: 0; padding: 0; border: 0; background: none; box-shadow: none;
  color: var(--gold, #c9a227); font: inherit; text-decoration: underline; cursor: pointer;
}

/* Subtle parallax-tilt response on the hero illustration */
.hero-art { transition: transform .35s var(--ease); transform-style: preserve-3d; }
.hero-art:not(:hover) .hero-art-img { transition: transform .35s var(--ease) .05s; }

/* File chip refinement — slight hover lift + clearer file size pill */
.file-list .file:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -10px rgba(0,0,0,0.4); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }

/* Engine "Recommended" badge — small filled gold pill with check */
.ec-tag.gold {
  display: inline-flex; align-items: center; gap: 4px;
}
.ec-tag.gold::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
}
[data-theme="light"] .ec-tag.gold::before { background: var(--accent); box-shadow: 0 0 6px var(--accent); }

/* Print-friendly fallback so when staff print a screen, the dark backgrounds
   don't dominate the page */
@media print {
  body { background: #fff !important; color: #111 !important; }
  .bg-mesh, .site-header, .site-footer, .actions, .hero-art { display: none !important; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; background: #fff !important; }
}

/* PIN lock layered correctly via the z-index scale */
.pin-lock { z-index: var(--z-lock); }


/* ════════════════════════════════════════════════════════════════════════
   V2 POLISH (additive)
   ════════════════════════════════════════════════════════════════════════ */

/* ─── perf hints on the elements that actually animate ──────────────── */
.hero-art-img { will-change: transform; }
.progress-fill { will-change: width; }
.bar-fill      { will-change: width; }
.val-card      { will-change: transform; }

/* ─── motion preferences — respect users with vestibular disorders ──── */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .hero-art-img { animation: none; }
  .hero-art-glow { animation: none; }
  .hero-title em::after { animation: none; opacity: 0; }
}

/* ─── hero italic shimmer ──────────────────────────────────────────────
   A faint gold gradient sweeps across the "in minutes." accent on page
   load, then every ~14s. Pure CSS, no JS. */
.hero-title em {
  position: relative;
  display: inline-block;
}
.hero-title em::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 233, 163, 0.45) 50%,
    transparent 70%
  );
  background-size: 220% 100%;
  background-repeat: no-repeat;
  mix-blend-mode: screen;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 0 0);  /* clip shimmer to the em */
  animation: heroShimmer 14s ease-in-out 1.8s infinite;
}
[data-theme="light"] .hero-title em::after {
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(217, 158, 44, 0.40) 50%,
    transparent 70%
  );
  background-size: 220% 100%;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
}
@keyframes heroShimmer {
  0%   { background-position: 120% 0; }
  10%  { background-position: -120% 0; }
  100% { background-position: -120% 0; }
}

/* ─── card focus glow ──────────────────────────────────────────────────
   When a card contains focused content (text input, button), it gains a
   soft gold (dark) / navy (light) glow. Restrained — only on real focus. */
.card { transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.card:focus-within {
  box-shadow:
    var(--shadow-2),
    0 0 0 1px rgba(201, 169, 97, 0.40),
    0 0 36px -6px rgba(201, 169, 97, 0.32);
}
[data-theme="light"] .card:focus-within {
  box-shadow:
    var(--shadow-2),
    0 0 0 1px rgba(30, 58, 138, 0.30),
    0 0 36px -6px rgba(30, 58, 138, 0.28);
}

/* ─── chip hover lift (subtle) ──────────────────────────────────────── */
.chip {
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.chip:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.35);
}
[data-theme="light"] .chip:hover {
  box-shadow: 0 6px 18px -8px rgba(15, 23, 42, 0.22);
}

/* ─── tooltips on technical terms (PEBITDA, JAROT, EBITDA, SAV) ────────
   Pure CSS. The element wears `data-tooltip="..."` and gets a small
   floating popover on hover or keyboard focus. */
[data-tooltip] {
  position: relative;
  border-bottom: 1px dotted rgba(201, 169, 97, 0.55);
  cursor: help;
  outline-offset: 4px;
}
[data-theme="light"] [data-tooltip] {
  border-bottom-color: rgba(30, 58, 138, 0.40);
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 280px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(20, 25, 35, 0.96);
  color: #f0eadc;
  border: 1px solid rgba(201, 169, 97, 0.35);
  box-shadow: 0 18px 36px -14px rgba(0, 0, 0, 0.55);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: var(--z-overlay);
}
[data-theme="light"] [data-tooltip]::after {
  background: #1a2238;
  color: #f3f6ff;
  border-color: rgba(30, 58, 138, 0.45);
}
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── confetti canvas — fired by JS on successful appraisal ────────── */
#vbas-confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-overlay);
}

/* ─── smarter progress UI ──────────────────────────────────────────────
   Active stage spins, completed stages get a scale-bounce on the check,
   ETA badge sits inline. */
.progress-fill {
  position: relative;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-2));
}
.progress-fill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 40%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 60%
  );
  background-size: 220% 100%;
  animation: progShimmer 1.6s linear infinite;
  border-radius: inherit;
  pointer-events: none;
}
@keyframes progShimmer {
  0%   { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}
.stage.active .stage-num {
  position: relative;
}
.stage.active .stage-num::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: var(--gold-2);
  animation: stageSpin .9s linear infinite;
}
[data-theme="light"] .stage.active .stage-num::after {
  border-top-color: var(--accent);
}
@keyframes stageSpin {
  to { transform: rotate(360deg); }
}
.stage.done .stage-num::before {
  animation: checkPop .35s var(--ease) both;
}
@keyframes checkPop {
  0%   { transform: scale(.7); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}
.progress-status .ps-eta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(201, 169, 97, 0.10);
  color: var(--gold-deep);
  border: 1px solid var(--line);
}
[data-theme="light"] .progress-status .ps-eta {
  background: rgba(30, 58, 138, 0.06);
  color: var(--accent);
  border-color: rgba(30, 58, 138, 0.22);
}

/* ─── compare page (2-column archive diff) ───────────────────────────── */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 900px) { .compare-grid { grid-template-columns: 1fr; } }
.compare-pane {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 24px;
}
.compare-pane h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.compare-diff {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: 8px;
}
.compare-diff.up   { background: rgba(108, 194, 139, 0.12); color: #66b67e; border: 1px solid rgba(108, 194, 139, 0.35); }
.compare-diff.down { background: rgba(224, 123, 110, 0.10); color: #d27969; border: 1px solid rgba(224, 123, 110, 0.32); }
.compare-diff.flat { background: rgba(255, 255, 255, 0.04); color: var(--text-2); border: 1px solid var(--line-2); }
[data-theme="light"] .compare-diff.flat { background: rgba(15, 23, 42, 0.04); }

/* ─── keyboard help overlay ──────────────────────────────────────────── */
.kbd-overlay {
  position: fixed; inset: 0;
  background: rgba(8, 11, 18, 0.72);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  display: none;
  place-items: center;
  z-index: var(--z-modal);
  padding: 24px;
  animation: kbdIn .25s var(--ease);
}
.kbd-overlay.open { display: grid; }
.kbd-card {
  width: min(560px, 92vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: 28px 28px 24px;
}
.kbd-card h2 {
  font-family: var(--serif);
  font-weight: 700;
  margin: 0 0 4px;
  font-size: 22px;
  color: var(--text);
}
.kbd-card .muted { margin: 0 0 18px; font-size: 13px; }
.kbd-list { display: grid; gap: 8px; }
.kbd-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(201, 169, 97, 0.04);
  border: 1px solid var(--line-2);
}
[data-theme="light"] .kbd-row { background: rgba(30, 58, 138, 0.04); }
.kbd-row span { font-size: 13.5px; color: var(--text); }
.kbd-keys { display: inline-flex; gap: 4px; }
.kbd-key {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
}
[data-theme="light"] .kbd-key { background: #fff; border-color: rgba(15, 23, 42, 0.18); }
@keyframes kbdIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── PRINT STYLESHEET ────────────────────────────────────────────────
   Staff who Ctrl+P from the results page get a clean white report
   without buttons, dropzones, or background mesh. */
@media print {
  :root, [data-theme] { color-scheme: light !important; }
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .bg-mesh, .grain, .orb,
  .site-header, .site-footer,
  .form, .form-cta, .progress, .status,
  #cancel-run, #quick-clear,
  .actions, .profile-export, .listing-draft-btn,
  .hero-art, .kbd-overlay,
  #vbas-confetti {
    display: none !important;
  }
  .hero { padding: 0 0 12px; }
  .hero-inner { display: block !important; }
  .hero-text { text-align: left !important; }
  .hero-title {
    color: #0f172a !important;
    background: none !important;
    -webkit-text-fill-color: #0f172a !important;
    font-size: 28pt !important;
    line-height: 1.15 !important;
  }
  .hero-title em {
    color: #8e7740 !important;
    background: none !important;
    -webkit-text-fill-color: #8e7740 !important;
  }
  .hero-title em::after { display: none !important; }
  .hero-sub { color: #475569 !important; }
  main { max-width: none; padding: 0; }
  .card {
    background: #ffffff !important;
    border: 1px solid #e5e1d6 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 18pt 0 !important;
    page-break-inside: avoid;
  }
  .card::before, .card::after { display: none !important; }
  .results .table-wrap { page-break-inside: auto; }
  .results h2, .results h3 { color: #0f172a !important; }
  .results .section-h { color: #1a1f2a !important; }
  .val-card,
  .val-card.primary {
    background: #ffffff !important;
    border: 1px solid #c8c4bc !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  .val-number, .val-number.big {
    color: #1a1f2a !important;
    background: none !important;
    -webkit-text-fill-color: #1a1f2a !important;
  }
  .chip { background: #fff !important; color: #2a2e36 !important; border-color: #c8c4bc !important; }
  thead { background: #1a1f2a !important; }
  th { color: #fff !important; border-bottom-color: #1a1f2a !important; }
  td { color: #2a2e36 !important; }
  a { color: #6f4f12 !important; text-decoration: underline; }
  /* Avoid orphaned section headings */
  .section-h { page-break-after: avoid; }
  /* No tooltip arrows on print */
  [data-tooltip]::after { display: none !important; }
  [data-tooltip] { border-bottom: none !important; }
}

/* Photo gallery uploader (results screen) — photos become the buyer profile's
   Photo Gallery section. */
/* Photo drop box. Same look as the Supporting documents zone, but the whole
   box is clickable (that one leaves room for its label above the input). */
.photo-drop { display: block; margin-bottom: 12px; }
.photo-drop input[type=file] { inset: 0; }
.photo-drop .drop-hint { padding: 22px 24px; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.photo-item { border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden;
  background: rgba(255, 255, 255, 0.02); }
[data-theme="light"] .photo-item { background: rgba(0, 0, 0, 0.02); }
.photo-item img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.photo-item .photo-meta { display: flex; gap: 8px; align-items: center; padding: 8px; }
.photo-item input[type="text"] {
  flex: 1 1 auto; min-width: 0; padding: 7px 9px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2);
  color: var(--text); font-family: var(--sans); font-size: 12.5px;
}
[data-theme="light"] .photo-item input[type="text"] { background: rgba(0, 0, 0, 0.02); }
.photo-item .photo-remove {
  flex: 0 0 auto; border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 14px; line-height: 1; padding: 6px 9px;
}
.photo-item .photo-remove:hover { color: var(--bad); border-color: var(--bad); }
