/* ==========================================================================
   SAVS — San Antonio Virtual Security · shared design system
   Deep navy + gold luxury. One system across the hiring portal and the
   quote portal so every SAVS web property feels like the same company.

   Rules of the system:
   - System font stack only (CSP/privacy: no third-party fonts or assets).
   - Texture comes from CSS gradients + an inline SVG noise data-URI.
   - Gold is an accent, never body text on navy (contrast); body text is
     near-white (--ink), secondary text is --ink-dim.
   - Motion is progressive enhancement: content is visible with no JS;
     reveal-on-scroll is armed by reveal.js adding `html.rv`, and all
     non-essential motion is disabled under prefers-reduced-motion.
   ========================================================================== */

:root {
  /* Palette */
  --navy-950: #04080f;
  --navy-900: #060d1a;
  --navy-850: #081426;
  --navy-800: #0a1628;
  --navy-700: #10233d;
  --navy-600: #1a3355;
  --navy-500: #24466f;
  --gold: #c9a227;
  --gold-bright: #e3bc3f;
  --gold-soft: #f0d98c;
  --gold-pale: #f7ecc0;
  --gold-deep: #8a6d14;
  --ink: #eef1f6;
  --ink-dim: #a7b3c4;
  --ink-faint: #7e8da3;
  --card: #0d1c33;
  --line: #22385c;
  --line-gold: rgba(201, 162, 39, 0.28);
  --danger: #e05c5c;
  --ok: #3fbf72;

  /* Surfaces */
  --glass: linear-gradient(165deg, rgba(26, 51, 85, 0.55), rgba(13, 28, 51, 0.94) 58%);
  --glass-soft: linear-gradient(165deg, rgba(26, 51, 85, 0.35), rgba(13, 28, 51, 0.88) 60%);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");

  /* Elevation */
  --shadow-card: 0 18px 40px -22px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-lift: 0 26px 50px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(201, 162, 39, 0.12), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  --glow-gold: 0 10px 28px -10px rgba(201, 162, 39, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
  --ring: 0 0 0 3px rgba(201, 162, 39, 0.25), 0 0 0 1px var(--gold);

  /* Shape & rhythm */
  --radius: 14px;
  --radius-lg: 18px;
  --radius-sm: 10px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.55;
  background:
    radial-gradient(1100px 520px at 85% -5%, rgba(201, 162, 39, 0.07), transparent 60%),
    radial-gradient(900px 620px at -12% 28%, rgba(26, 51, 85, 0.38), transparent 55%),
    radial-gradient(1000px 700px at 110% 85%, rgba(16, 35, 61, 0.5), transparent 60%),
    var(--navy-900);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(201, 162, 39, 0.4); color: #fff; }

a { color: var(--gold-soft); }
a:hover { color: var(--gold-pale); }

h1, h2, h3 { letter-spacing: -0.01em; }

:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 2px;
  border-radius: 4px;
}

[id] { scroll-margin-top: 92px; }

/* ---------- Reveal-on-scroll (armed by reveal.js → html.rv) ---------- */
html.rv [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
}
html.rv [data-reveal].rv-in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.16, 0.8, 0.26, 0.99);
  transition-delay: var(--rvd, 0ms);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, rgba(8, 20, 38, 0.94), rgba(6, 13, 26, 0.9));
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid rgba(201, 162, 39, 0.22);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.9);
}
.site-header .bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand .shield {
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 8px rgba(201, 162, 39, 0.35));
}
.brand .name { font-weight: 800; letter-spacing: 0.04em; font-size: 1.02rem; line-height: 1.15; }
.brand .name span { color: var(--gold); }
.brand .sub { font-size: 0.72rem; color: var(--ink-dim); letter-spacing: 0.14em; text-transform: uppercase; }
.header-cta { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.header-cta .phone {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.header-cta .phone:hover { color: var(--gold-soft); }
@media (max-width: 580px) {
  .header-cta .phone { display: none; }
  .brand .name { font-size: 0.88rem; }
  .brand .sub { font-size: 0.64rem; }
  .site-header .bar { gap: 10px; padding: 10px 14px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: linear-gradient(180deg, #f0cd62 0%, var(--gold-bright) 42%, var(--gold) 100%);
  color: #161006;
  font-weight: 800;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid rgba(240, 217, 140, 0.65);
  text-decoration: none;
  cursor: pointer;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 -8px 16px -10px rgba(0, 0, 0, 0.35) inset,
    var(--glow-gold);
  transition: transform 0.16s ease, box-shadow 0.25s ease, filter 0.2s ease, background 0.2s ease;
}
.btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 14px 34px -10px rgba(201, 162, 39, 0.7),
    0 4px 10px rgba(0, 0, 0, 0.4);
  color: #161006;
}
.btn:active { transform: translateY(0) scale(0.99); }
.btn[disabled] { opacity: 0.65; pointer-events: none; }
.btn.ghost {
  background: rgba(201, 162, 39, 0.06);
  color: var(--gold-soft);
  border: 1px solid rgba(201, 162, 39, 0.55);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.btn.ghost:hover {
  background: rgba(201, 162, 39, 0.15);
  color: var(--gold-pale);
  box-shadow: 0 8px 22px -10px rgba(201, 162, 39, 0.45);
}
.btn.small { padding: 8px 16px; font-size: 0.86rem; }
.btn.danger {
  background: transparent;
  border: 1px solid rgba(224, 92, 92, 0.7);
  color: #ff9d9d;
  box-shadow: none;
}
.btn.danger:hover { background: rgba(224, 92, 92, 0.12); color: #ffb4b4; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 82% -10%, rgba(201, 162, 39, 0.2), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(36, 70, 111, 0.5), transparent 60%),
    linear-gradient(160deg, var(--navy-700), var(--navy-800) 55%, var(--navy-900));
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--noise);
  pointer-events: none;
}
.hero .inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 20px 62px;
  text-align: left;
}
.hero-shield {
  position: absolute;
  z-index: 0;
  right: -64px;
  top: 50%;
  transform: translateY(-50%);
  width: 440px;
  height: auto;
  opacity: 0.08;
  pointer-events: none;
}
@media (max-width: 640px) {
  .hero-shield { width: 290px; right: -96px; opacity: 0.07; }
  .hero .inner { padding: 52px 20px 46px; }
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 16px;
}
.kicker::before {
  content: "";
  width: 34px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold));
  border-radius: 2px;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 3.6rem);
  margin: 0 0 12px;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.hero h1 .gold {
  background: linear-gradient(92deg, var(--gold-soft), var(--gold-bright) 55%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .tagline {
  font-size: clamp(1.08rem, 2.4vw, 1.38rem);
  color: var(--gold-soft);
  font-weight: 600;
  margin: 0 0 14px;
}
.hero p.lede { max-width: 640px; color: var(--ink-dim); font-size: 1.07rem; margin: 0 0 28px; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.badge {
  border: 1px solid rgba(201, 162, 39, 0.25);
  background: rgba(16, 35, 61, 0.66);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 0.85rem;
  color: var(--ink-dim);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
.badge b { color: var(--ink); }

/* ---------- Page head (interior pages) ---------- */
.page-head { margin: 14px 0 22px; max-width: 720px; }
.page-head h1 {
  font-size: clamp(1.75rem, 4.4vw, 2.35rem);
  line-height: 1.12;
  margin: 0 0 8px;
  letter-spacing: -0.015em;
}
.page-head h1 .gold { color: var(--gold-soft); }
.page-head p { color: var(--ink-dim); margin: 0; font-size: 1.02rem; }
.page-head p strong { color: var(--ink); }

/* ---------- Layout / cards ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 40px 20px 76px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.card {
  background: var(--glass), var(--card);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.card h3 { margin: 0 0 8px; color: var(--gold-soft); font-size: 1.06rem; letter-spacing: 0.01em; }
.card p { margin: 0; color: var(--ink-dim); font-size: 0.95rem; }
.card.lift { transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.card.lift:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 162, 39, 0.5);
  box-shadow: var(--shadow-lift);
}
.section-title {
  font-size: clamp(1.35rem, 3vw, 1.6rem);
  margin: 44px 0 18px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.4), transparent);
}
.section-title:first-child { margin-top: 0; }

/* Steps strip (After You Apply / How it works) */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; }
.step-card {
  background: var(--glass-soft), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #161006;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px -4px rgba(201, 162, 39, 0.6);
  margin-bottom: 10px;
}
.step-card h3 { margin: 0 0 6px; font-size: 1rem; color: var(--ink); }
.step-card p { margin: 0; color: var(--ink-dim); font-size: 0.92rem; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cat-chip {
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: rgba(201, 162, 39, 0.07);
  color: var(--gold-soft);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* ---------- Forms ---------- */
form.application {
  position: relative;
  background: var(--glass), var(--card);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
form.application::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold-bright) 50%, var(--gold) 70%, transparent);
}
@media (max-width: 640px) { form.application { padding: 22px 18px; } }
fieldset { border: none; margin: 0 0 14px; padding: 0; min-width: 0; }
fieldset:last-of-type { margin-bottom: 4px; }
legend {
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
  padding: 0 0 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.22);
  width: 100%;
}
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .frow { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; min-width: 0; }
label.lbl {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #c9d4e4;
  margin-bottom: 7px;
}
label.lbl .req { color: var(--gold-bright); }
.hint { font-size: 0.83rem; color: var(--ink-dim); margin-top: 5px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="number"], input[type="password"], input[type="search"], select, textarea {
  width: 100%;
  background: linear-gradient(180deg, rgba(6, 13, 26, 0.7), rgba(10, 22, 40, 0.92));
  border: 1px solid #2a4470;
  border-radius: 12px;
  color: var(--ink);
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:hover, select:hover, textarea:hover { border-color: #38598c; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: var(--ring);
}
select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23e3bc3f' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(6, 13, 26, 0.7), rgba(10, 22, 40, 0.92));
  background-repeat: no-repeat;
  background-position: right 14px center, 0 0;
  padding-right: 40px;
}
input[type="file"] {
  width: 100%;
  color: var(--ink-dim);
  background: rgba(10, 22, 40, 0.55);
  border: 1px dashed #33507f;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.92rem;
}
input[type="file"]::file-selector-button {
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold-soft);
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  margin-right: 12px;
}
input[type="file"]::file-selector-button:hover { background: rgba(201, 162, 39, 0.22); }
.checks { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.96rem;
}
.check input {
  width: 19px;
  height: 19px;
  accent-color: var(--gold);
  margin-top: 2px;
  flex: 0 0 auto;
  cursor: pointer;
}
.consent {
  border: 1px solid rgba(201, 162, 39, 0.55);
  background: linear-gradient(165deg, rgba(201, 162, 39, 0.12), rgba(201, 162, 39, 0.05));
  border-radius: 12px;
  padding: 15px 17px;
  margin-bottom: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
.form-error {
  display: none;
  border: 1px solid rgba(224, 92, 92, 0.7);
  background: rgba(224, 92, 92, 0.12);
  color: #ffc4c4;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-weight: 600;
}
.form-error.show { display: block; }
.confirmation { text-align: center; padding: 48px 28px; }
.confirmation .shield { filter: drop-shadow(0 4px 14px rgba(201, 162, 39, 0.4)); }
.confirmation .ref {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold-soft);
  border: 1px dashed var(--gold);
  background: rgba(201, 162, 39, 0.06);
  border-radius: 12px;
  padding: 12px 24px;
  margin: 14px 0;
}
.next-step-box {
  margin: 22px auto 0;
  max-width: 540px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: linear-gradient(165deg, rgba(201, 162, 39, 0.1), rgba(201, 162, 39, 0.03));
  border-radius: var(--radius);
  padding: 20px 22px;
}
.next-step-box h3 { margin: 0 0 6px; color: var(--gold-soft); }
.next-step-box p { margin: 0 0 14px; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  border-top: 1px solid rgba(201, 162, 39, 0.18);
  background: linear-gradient(180deg, var(--navy-800), var(--navy-950));
  color: var(--ink-dim);
  font-size: 0.9rem;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.55), transparent);
}
.site-footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-items: center;
}
.site-footer a { color: var(--gold-soft); text-decoration: none; }
.site-footer a:hover { color: var(--gold-pale); text-decoration: underline; }

/* ---------- Dashboard ---------- */
.dash-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 20px; }
.dash-head h1 { font-size: clamp(1.45rem, 3.4vw, 1.8rem); margin: 0; letter-spacing: -0.01em; }
.dash-head .spacer { flex: 1; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.stat {
  background: var(--glass-soft), var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 17px;
  min-width: 108px;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  font-family: inherit;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.stat:hover { transform: translateY(-2px); border-color: rgba(201, 162, 39, 0.45); }
.stat.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold) inset, 0 10px 24px -14px rgba(201, 162, 39, 0.6);
  background: linear-gradient(165deg, rgba(201, 162, 39, 0.14), rgba(13, 28, 51, 0.92) 65%);
}
.stat .n {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold-soft);
  display: block;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.stat .l { font-size: 0.74rem; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.09em; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.toolbar input[type="search"] { flex: 1 1 240px; }
.toolbar select { width: auto; }
.applicant-list { display: grid; gap: 12px; }
.applicant-card {
  background: var(--glass-soft), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.applicant-card:hover {
  border-color: rgba(201, 162, 39, 0.55);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.applicant-card .who { font-weight: 800; }
.applicant-card .meta { color: var(--ink-dim); font-size: 0.9rem; }
.stage-pill {
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--navy-600);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink);
  white-space: nowrap;
}
.stage-pill.gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border-color: rgba(240, 217, 140, 0.6);
  color: #161006;
}
.stars { color: var(--gold-bright); letter-spacing: 2px; }
.detail-panel {
  background: var(--glass), var(--card);
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-lift);
}
.detail-panel h2 { margin: 0 0 4px; letter-spacing: -0.01em; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 22px; margin: 16px 0; }
.kv .k { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-dim); margin-bottom: 2px; }
.kv .v { font-weight: 600; overflow-wrap: anywhere; }
.stage-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.chip {
  border: 1px solid var(--line);
  background: rgba(10, 22, 40, 0.8);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.15s ease;
}
.chip:hover { border-color: rgba(201, 162, 39, 0.6); transform: translateY(-1px); }
.chip.current {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #161006;
  border-color: rgba(240, 217, 140, 0.6);
  font-weight: 800;
}
.doc-chip {
  display: inline-flex; gap: 8px; align-items: center;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 12px; margin: 0 8px 8px 0; font-size: 0.9rem;
  background: rgba(10, 22, 40, 0.8);
}
.doc-chip a { text-decoration: none; font-weight: 700; }
.empty { color: var(--ink-dim); text-align: center; padding: 44px 10px; }
.rate-row { display: flex; gap: 6px; align-items: center; }
.rate-row button {
  background: none; border: none; cursor: pointer; font-size: 1.45rem;
  color: var(--line); padding: 0 2px; line-height: 1;
  transition: transform 0.15s ease, color 0.15s ease;
}
.rate-row button:hover { transform: scale(1.15); }
.rate-row button.on { color: var(--gold-bright); }
textarea.notes { min-height: 96px; }

/* ---------- Login ---------- */
.login-wrap { max-width: 430px; margin: 9vh auto 6vh; padding: 0 20px; }
.login-card {
  padding: 34px 30px;
  border-color: rgba(201, 162, 39, 0.45);
  box-shadow: var(--shadow-lift), 0 0 60px -18px rgba(201, 162, 39, 0.35);
}
.login-card .shield { filter: drop-shadow(0 4px 14px rgba(201, 162, 39, 0.45)); }

/* ---------- 404 ---------- */
.nf-card { text-align: center; margin-top: 36px; padding: 18px 26px 36px; overflow: hidden; position: relative; }
.nf-code {
  font-size: clamp(5.2rem, 18vw, 9rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, rgba(240, 217, 140, 0.9), rgba(201, 162, 39, 0.25));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 6px 0 2px;
}
.nf-card h1 { margin: 4px 0 8px; }
.nf-card p { color: var(--ink-dim); }

/* ---------- Status tracker ---------- */
.tracker { list-style: none; margin: 24px 0 6px; padding: 0; }
.tracker .step {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 0; position: relative; color: var(--ink-dim);
}
.tracker .step::before {
  content: ""; position: absolute; left: 15px; top: 36px; bottom: -8px;
  width: 2px; background: var(--line);
}
.tracker .step:last-child::before { display: none; }
.tracker .dot {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--navy-800);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.85rem; color: #161006; z-index: 1;
}
.tracker .step.done { color: var(--ink); }
.tracker .step.done .dot {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border-color: var(--gold);
}
.tracker .step.done::before { background: linear-gradient(180deg, var(--gold), var(--line)); }
.tracker .step.current { color: var(--ink); }
.tracker .step.current .dot {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 5px rgba(201, 162, 39, 0.22), 0 0 18px rgba(201, 162, 39, 0.35);
  background: var(--navy-700);
  color: var(--gold-soft);
}
.tracker .step.current .step-label { font-weight: 800; }
.tracker .you-are-here {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: #161006;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border-radius: 999px; padding: 3px 11px;
}

/* Orientation progress (status page) */
.orientation {
  margin-top: 20px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: linear-gradient(165deg, rgba(201, 162, 39, 0.1), rgba(201, 162, 39, 0.02));
  border-radius: var(--radius);
  padding: 18px 20px;
}
.orientation h3 { margin: 0 0 4px; color: var(--gold-soft); font-size: 1.02rem; }
.orientation p { margin: 0 0 12px; color: var(--ink-dim); font-size: 0.95rem; }
.orientation .progress-track { margin: 0 0 14px; }

/* ---------- Training Academy ---------- */
.academy-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 18px 0 8px; }
.academy-head .spacer { flex: 1; }
.academy-progress { margin: 10px 0 6px; font-size: 1.02rem; }
.progress-track {
  height: 9px; border-radius: 999px; background: var(--navy-700);
  overflow: hidden; margin-top: 9px; flex: 1;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 45%, var(--gold-bright));
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.45);
  transition: width 0.4s ease;
}
.module-list { display: grid; gap: 12px; }
.module-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--glass-soft), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
  color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
a.module-card:hover {
  border-color: rgba(201, 162, 39, 0.55);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.module-card.locked { opacity: 0.62; }
.mod-num {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid rgba(201, 162, 39, 0.7);
  background: radial-gradient(circle at 32% 28%, var(--navy-600), var(--navy-800) 70%);
  color: var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.6);
}
.mod-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mod-title { font-weight: 800; font-size: 1.03rem; }
.mod-meta { color: var(--ink-dim); font-size: 0.85rem; }
.mod-state { font-size: 0.88rem; font-weight: 600; }
.mod-state.done { color: var(--ok); }
.mod-state.locked { color: var(--ink-dim); }
.mod-state.progress { color: var(--gold-soft); }
.mod-state.open { color: var(--ink); }
.mod-go { margin-left: auto; color: var(--gold-bright); font-size: 1.35rem; align-self: center; }

/* Slides / deck */
.deck-nav { display: flex; align-items: center; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.deck-progress { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.deck-progress .progress-track { margin-top: 0; }
#deck-counter { color: var(--ink-dim); font-size: 0.85rem; white-space: nowrap; }
.slide {
  background: var(--glass), var(--card);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4.5vw, 42px);
  margin-top: 20px;
  box-shadow: var(--shadow-lift);
  animation: slide-in 0.38s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes slide-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}
.brandbar {
  display: flex; align-items: center; gap: 9px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.3);
  padding-bottom: 12px; margin-bottom: 22px;
}
.brandbar .shield { filter: drop-shadow(0 1px 5px rgba(201, 162, 39, 0.4)); }
.brandbar .brandbar-name { font-weight: 800; letter-spacing: 0.06em; font-size: 0.8rem; }
.brandbar .brandbar-name span { color: var(--gold); }
.brandbar .brandbar-right {
  margin-left: auto; color: var(--ink-dim); font-size: 0.76rem;
  letter-spacing: 0.1em; text-transform: uppercase; text-align: right;
}
.slide-h { margin: 0 0 14px; font-size: clamp(1.55rem, 3.6vw, 2.05rem); line-height: 1.2; letter-spacing: -0.015em; }
.slide-p { color: var(--ink); margin: 0 0 15px; font-size: 1.03rem; }
.key-card {
  border-left: 4px solid var(--gold);
  background: linear-gradient(165deg, rgba(201, 162, 39, 0.14), rgba(201, 162, 39, 0.05));
  padding: 16px 19px; border-radius: 0 12px 12px 0;
  font-weight: 700; font-size: 1.12rem; line-height: 1.45; margin-bottom: 20px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
.do-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
@media (max-width: 640px) { .do-grid { grid-template-columns: 1fr; } }
.do-card {
  border-radius: 12px; padding: 15px 17px;
  border: 1px solid var(--line); background: rgba(10, 22, 40, 0.72);
}
.do-card h3 { margin: 0 0 9px; font-size: 0.84rem; letter-spacing: 0.13em; }
.do-card.do { border-color: rgba(63, 191, 114, 0.55); background: linear-gradient(165deg, rgba(63, 191, 114, 0.09), rgba(10, 22, 40, 0.72) 60%); }
.do-card.do h3 { color: var(--ok); }
.do-card.dont { border-color: rgba(224, 92, 92, 0.55); background: linear-gradient(165deg, rgba(224, 92, 92, 0.08), rgba(10, 22, 40, 0.72) 60%); }
.do-card.dont h3 { color: var(--danger); }
.do-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.do-list li { display: flex; gap: 9px; font-size: 0.94rem; }
.do-list.do .do-mark { color: var(--ok); font-weight: 800; }
.do-list.dont .do-mark { color: var(--danger); font-weight: 800; }

/* Title card slide */
.title-card { text-align: center; padding: clamp(30px, 5vw, 52px) clamp(22px, 4.5vw, 42px); border-color: rgba(201, 162, 39, 0.6); }
.title-card .shield {
  margin: 0 auto 10px; display: block;
  filter: drop-shadow(0 6px 20px rgba(201, 162, 39, 0.45));
}
.title-org { font-weight: 800; letter-spacing: 0.12em; font-size: 1.06rem; }
.title-rule {
  width: 140px; height: 3px; border-radius: 2px; margin: 13px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.title-academy { color: var(--gold-soft); letter-spacing: 0.24em; font-size: 0.8rem; font-weight: 800; }
.title-h { font-size: clamp(1.7rem, 4.6vw, 2.5rem); margin: 12px 0 8px; line-height: 1.13; letter-spacing: -0.015em; }
.title-meta { color: var(--ink-dim); margin: 0 0 14px; }
.title-intro { max-width: 620px; margin: 18px auto 8px; color: var(--ink); text-align: left; font-size: 1.03rem; }
.slide-status { font-weight: 700; }
.slide-status.done { color: var(--ok); }
.video-frame {
  position: relative; aspect-ratio: 16 / 9; margin: 20px 0;
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: var(--shadow-card);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-placeholder {
  border: 2px dashed rgba(201, 162, 39, 0.6); border-radius: 14px;
  background: linear-gradient(165deg, rgba(201, 162, 39, 0.09), rgba(201, 162, 39, 0.02));
  padding: 32px 22px; margin: 20px 0; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
}
.video-placeholder .shield { filter: drop-shadow(0 3px 10px rgba(201, 162, 39, 0.4)); }
.video-placeholder strong { color: var(--gold-soft); font-size: 1.06rem; }
.video-placeholder span { color: var(--ink-dim); font-size: 0.92rem; max-width: 520px; }

/* Checks & scenarios */
.check-tag {
  display: inline-block;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #161006;
  font-weight: 800; font-size: 0.74rem; letter-spacing: 0.11em;
  border-radius: 999px; padding: 4px 13px; margin-bottom: 13px;
  box-shadow: 0 4px 12px -4px rgba(201, 162, 39, 0.6);
}
.choices { display: grid; gap: 10px; margin: 14px 0; }
.choice {
  display: flex; gap: 11px; align-items: flex-start; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 15px; background: rgba(10, 22, 40, 0.72); font-size: 0.98rem;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.choice:hover { border-color: rgba(201, 162, 39, 0.6); }
.choice:has(input:checked) {
  border-color: var(--gold);
  background: linear-gradient(165deg, rgba(201, 162, 39, 0.13), rgba(10, 22, 40, 0.72) 70%);
}
.choice input { width: 19px; height: 19px; accent-color: var(--gold); margin-top: 1px; flex: 0 0 auto; cursor: pointer; }
.check-feedback { margin-top: 14px; border-radius: 12px; padding: 13px 17px; font-size: 0.96rem; }
.check-feedback.right { border: 1px solid var(--ok); background: rgba(63, 191, 114, 0.1); }
.check-feedback.wrong { border: 1px solid var(--danger); background: rgba(224, 92, 92, 0.1); }
.check-feedback.warn { border: 1px solid var(--gold); background: rgba(201, 162, 39, 0.08); }

/* Quiz & results */
.quiz-q {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 17px 19px; margin: 0 0 16px;
  background: rgba(10, 22, 40, 0.6); min-width: 0;
}
.quiz-q legend { font-weight: 700; padding: 0 6px; font-size: 1.01rem; }
.score-big {
  font-size: 3rem; font-weight: 800; line-height: 1.05; margin: 6px 0;
  background: linear-gradient(92deg, var(--gold-soft), var(--gold-bright) 60%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.review-item {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 17px; margin: 0 0 10px; background: rgba(10, 22, 40, 0.72);
}
.review-item.right { border-left: 4px solid var(--ok); }
.review-item.wrong { border-left: 4px solid var(--danger); }
.review-item p { margin: 4px 0; font-size: 0.94rem; }
.review-why { color: var(--ink-dim); }
.topic-tag {
  display: inline-block; border: 1px solid rgba(201, 162, 39, 0.6); color: var(--gold-soft);
  border-radius: 999px; padding: 1px 10px; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.05em; margin-left: 8px; vertical-align: middle;
}

/* Certificate (branded SAVS document) */
.certificate {
  text-align: center;
  background:
    radial-gradient(420px 200px at 50% -10%, rgba(201, 162, 39, 0.14), transparent 65%),
    var(--navy-800);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 36px 26px; margin: 22px 0;
  box-shadow:
    0 0 0 5px var(--navy-900), 0 0 0 6px rgba(201, 162, 39, 0.45),
    var(--shadow-lift);
}
.certificate .shield { margin: 0 auto 6px; display: block; filter: drop-shadow(0 3px 10px rgba(201, 162, 39, 0.4)); }
.certificate.mini { margin: 18px 0; padding: 24px 20px; }
.cert-org { font-weight: 800; letter-spacing: 0.11em; }
.cert-rule {
  width: 140px; height: 3px; border-radius: 2px; margin: 11px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.cert-title { font-size: 1.55rem; font-weight: 800; color: var(--gold-soft); letter-spacing: 0.01em; }
.cert-sub { color: var(--ink-dim); margin: 6px 0; }
.cert-name { font-size: 1.22rem; font-weight: 800; margin: 12px 0 2px; }
.cert-date { color: var(--ink-dim); margin: 0 0 10px; }
.cert-foot { color: var(--ink-dim); font-size: 0.88rem; margin: 8px 0 0; }
.cert-print { margin-top: 14px; }
@media print {
  body * { visibility: hidden; }
  #certificate, #certificate * { visibility: visible; }
  #certificate { position: absolute; inset: 0; margin: 0; box-shadow: none; }
  .cert-print { display: none; }
}

/* Owner dashboard — training summary */
.train-list { display: grid; gap: 6px; margin: 8px 0 14px; }
.train-row {
  display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 13px; background: rgba(10, 22, 40, 0.72); font-size: 0.92rem;
}
.train-row .train-state { margin-left: auto; color: var(--ink-dim); font-size: 0.88rem; }
.train-row .train-state.done { color: var(--ok); font-weight: 700; }
.train-fail {
  flex-basis: 100%; border: 1px solid rgba(224, 92, 92, 0.6);
  background: rgba(224, 92, 92, 0.08); border-radius: 8px;
  padding: 8px 12px; font-size: 0.88rem;
}
.train-fail span { color: var(--ink-dim); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.rv [data-reveal] { opacity: 1; transform: none; }
  .slide { animation: none; }
}

/* ---------- Quote portal additions ---------- */
.quote-banner {
  background: linear-gradient(180deg, #f0cd62 0%, var(--gold-bright) 45%, var(--gold) 100%);
  color: #161006;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.2em;
  padding: 14px 16px;
  font-size: clamp(1.02rem, 3vw, 1.35rem);
  text-transform: uppercase;
  border-bottom: 1px solid var(--gold-deep);
  box-shadow: 0 10px 26px -12px rgba(201, 162, 39, 0.55);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.tag {
  display: inline-block;
  border: 1px solid rgba(201, 162, 39, 0.55);
  background: rgba(201, 162, 39, 0.07);
  color: var(--gold-soft);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.83rem;
  font-weight: 600;
  margin: 0 6px 6px 0;
}
.problem-row {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 10px 16px;
  align-items: center;
  padding: 9px 2px;
  border-bottom: 1px dashed rgba(201, 162, 39, 0.18);
}
.problem-row:last-child { border-bottom: none; }
@media (max-width: 640px) { .problem-row { grid-template-columns: 1fr; } }
.problem-extra { margin: 4px 0 10px 29px; max-width: 340px; }
