:root {
  /* Tell the browser (esp. iOS Safari) to render native controls + their
     popups/pickers in dark scheme so they match the dark theme by default. */
  color-scheme: dark;
  --bg: #0a0d14;
  --bg-2: #111827;
  --surface: #0f1625;
  --surface-2: #151f34;
  --text: #edf2ff;
  --muted: #9fb0d1;
  --line: #27344f;
  --accent: #7aa2ff;
  --accent-2: #66e2cc;
  /* Services hero — dress = blue slate; contract = deep teal (contrast) */
  --hero-dress-bg: #1b2a45;
  --hero-dress-fg: #f2f6ff;
  --hero-contract-bg: #132e36;
  --hero-contract-fg: #f0fbff;
}

body.light {
  /* Light theme: native controls + pickers render in light scheme. */
  color-scheme: light;
  /* Softer than stark white — easier on the eyes */
  --bg: #c9d2e2;
  --bg-2: #bcc6d8;
  --surface: #d5dde8;
  --surface-2: #cdd5e3;
  --text: #1a2c44;
  --muted: #4a5d76;
  --line: #aab6ca;
  --accent: #2a56c4;
  --accent-2: #0d8f75;
  /* Services hero — light theme */
  --hero-dress-bg: #34486b;
  --hero-dress-fg: #eef3ff;
  --hero-contract-bg: #2c5c66;
  --hero-contract-fg: #eef8fa;
}

* { box-sizing: border-box; }
html {
  /* Avoid forcing a full viewport height chain that can exaggerate flex spacing */
  min-height: 100%;
}
html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  color: var(--text);
  /* End on --surface so nothing darker shows under the footer */
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--surface) 32%, var(--surface) 100%);
  transition: background 0.25s ease, color 0.25s ease;
}

main.container {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-bottom: 0;
}

/* Extra viewport height stays above the footer, not as empty space below it */
/* Space before footer (replaces footer margin-top, which must not fight margin-top: auto) */
main.container:has(> footer.footer:last-child) > *:nth-last-child(2) {
  margin-bottom: clamp(1.25rem, min(2.5vh, 1.75rem), 2rem);
}

main.container > footer.footer {
  margin-top: auto;
  flex: 0 0 auto;
  height: auto;
  min-height: unset;
  align-self: stretch;
}

a { color: inherit; text-decoration: none; }

.container { width: min(1200px, 92%); margin: 0 auto; }

.header {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg), transparent 20%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 30%);
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-wrap { display: grid; gap: 0.1rem; }
.brand { font-size: 1rem; font-weight: 700; letter-spacing: 0.02em; }
.brand-sub { color: var(--muted); font-size: 0.78rem; }
.brand-note { color: color-mix(in srgb, var(--muted), var(--text) 18%); font-size: 0.76rem; font-weight: 650; }

.nav-links { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.nav-links a {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  font-size: 0.86rem;
}

.nav-links a.nav-current {
  color: var(--text);
  border-color: var(--accent);
}

.header-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.header-cta {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  font-size: 0.82rem;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-2), transparent 8%);
}

.nav-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2), transparent 15%);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.35s ease;
}

.nav-menu-toggle:hover {
  border-color: color-mix(in srgb, var(--accent), var(--line) 55%);
  background: color-mix(in srgb, var(--surface-2), transparent 5%);
}

.nav-menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body.menu-open .nav-menu-toggle {
  border-color: color-mix(in srgb, var(--accent), var(--line) 40%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent), transparent 78%);
}

.nav-menu-toggle-box {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.nav-menu-toggle:active .nav-menu-toggle-box {
  transform: scale(0.82);
}

body.menu-open .nav-menu-toggle:active .nav-menu-toggle-box {
  transform: scale(0.88);
}

.nav-menu-bars {
  width: 1.125rem;
  height: 0.875rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}

.nav-menu-bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
  transition:
    transform 0.38s cubic-bezier(0.65, 0, 0.35, 1),
    opacity 0.28s ease;
}

body.menu-open .nav-menu-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.menu-open .nav-menu-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

body.menu-open .nav-menu-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  .nav-menu-toggle,
  .nav-menu-toggle-box,
  .nav-menu-bar {
    transition: none;
  }

  .nav-menu-toggle:active .nav-menu-toggle-box {
    transform: none;
  }
}

body.menu-open {
  overflow: hidden;
}

/* Sticky header + toggle stay above the full-screen overlay (same layout slot as when closed) */
body.menu-open .header {
  z-index: 200;
}

body.menu-open .nav-menu-toggle {
  position: relative;
  z-index: 210;
}

/* Full-screen mobile menu only; never shown on desktop (see media query below) */
.site-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  /* Match page theme background */
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--surface) 32%, var(--surface) 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  overflow: auto;
  /* Space below sticky header row (hamburger stays in header above this layer) */
  padding: max(5.25rem, calc(env(safe-area-inset-top, 0px) + 4.25rem)) max(1rem, 4vw) max(2rem, 6vh);
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.site-nav-overlay[hidden] {
  display: none !important;
}

@media (min-width: 769px) {
  .site-nav-overlay {
    display: none !important;
    pointer-events: none;
  }
}

.site-nav-overlay-links {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: stretch;
  justify-content: flex-start;
  max-width: 28rem;
  margin: 0 auto;
  width: 100%;
  min-height: 0;
}

.site-nav-overlay-links a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface), transparent 20%);
  color: var(--text);
  font-size: 1rem;
  font-weight: 650;
  text-align: center;
}

.site-nav-overlay-links a.site-nav-overlay-current {
  border-color: var(--accent);
  color: var(--accent);
}

.scroll-top-fab {
  position: fixed;
  right: max(1rem, 4vw);
  bottom: max(1rem, 4vw);
  z-index: 90;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2), transparent 5%);
  color: var(--text);
  box-shadow: 0 6px 20px color-mix(in srgb, #000, transparent 75%);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.scroll-top-fab[hidden] {
  display: none !important;
}

.scroll-top-fab svg {
  display: block;
}

.theme-light-confirm-dialog {
  max-width: min(92vw, 26rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 20px 50px color-mix(in srgb, #000, transparent 55%);
}

.theme-light-confirm-dialog::backdrop {
  background: color-mix(in srgb, #000, transparent 45%);
}

.theme-light-confirm-inner {
  padding: 1.25rem 1.35rem;
}

.theme-light-confirm-title {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
}

.theme-light-confirm-desc {
  margin: 0 0 1.15rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.theme-light-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.theme-light-confirm-actions .btn {
  font-size: 0.88rem;
  padding: 0.5rem 0.9rem;
}

.hero {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
}

/* About: banner only, no hero text overlay */
.hero--about .hero-copy {
  display: none;
}

.hero--about .hero-overlay {
  opacity: 0.35;
}

/* Services: dress codes + contract intro (no banner image) */
.hero-services-intro {
  padding: 0;
  background: transparent;
}

.hero-services-inner {
  display: flex;
  flex-direction: column;
}

.hero-services-block {
  padding: clamp(1.35rem, 4.5vw, 2.25rem) clamp(1.1rem, 4vw, 2.75rem);
  text-align: center;
}

.hero-services-dress {
  background: var(--hero-dress-bg);
  color: var(--hero-dress-fg);
}

.hero-services-contract {
  background: var(--hero-contract-bg);
  color: var(--hero-contract-fg);
}

.hero-services-title {
  margin: 0 0 0.85rem;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(1.32rem, 3.2vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
}

.hero-services-title-contract {
  margin-bottom: 0.7rem;
}

.hero-services-body {
  margin: 0;
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.94rem;
  line-height: 1.58;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  font-weight: 400;
}

.hero-services-dress .hero-services-body,
.hero-services-contract .hero-services-body {
  opacity: 0.96;
}

.hero-media {
  width: 100%;
  height: clamp(220px, 35vw, 390px);
  position: relative;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(6, 10, 18, 0.78), rgba(6, 10, 18, 0.2));
}

.hero-copy {
  position: absolute;
  inset: auto auto 0 0;
  padding: 1.2rem;
  width: min(760px, 100%);
}

.kicker {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--accent-2);
}

h1 {
  margin: 0.4rem 0 0.5rem;
  font-size: clamp(1.5rem, 2.8vw, 2.6rem);
  line-height: 1.14;
}

.subtitle {
  margin: 0;
  color: #dbe6ff;
  max-width: 72ch;
}

.why-us {
  margin-top: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 1rem;
}

.why-us-title {
  margin: 0 0 0.8rem;
  font-size: 1.25rem;
}

.why-us-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0.8rem;
  align-items: start;
}

.why-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2), transparent 5%);
  padding: 0.9rem;
}

.why-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.why-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.about-panel {
  margin-top: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 1rem 1.1rem;
}

.about-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 85ch;
}

.team-section {
  margin-top: 1.1rem;
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 1rem 1.1rem 1.15rem;
}

.team-section-title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.team-section-sub {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
  align-items: start;
}

.team-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2), transparent 5%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.team-card-media {
  aspect-ratio: 1;
  background: var(--bg-2);
}

.team-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-card-body {
  padding: 0.75rem 0.85rem 0.9rem;
  min-height: 88px;
}

.team-card-body h3 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.team-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.95rem;
}

.btn {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2), transparent 8%);
  color: var(--text);
  border-radius: 10px;
  padding: 0.62rem 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.btn.primary {
  border-color: color-mix(in srgb, var(--accent), white 20%);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #071328;
}

button.btn:disabled,
button.btn.primary:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.main-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1rem;
  align-items: start;
}

.side-panel, .content-wrap {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
}

.side-panel { padding: 0.8rem; height: fit-content; position: sticky; top: 88px; }
.side-title { margin: 0 0 0.45rem; font-size: 0.9rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.side-links { display: grid; gap: 0.35rem; }
.side-links a {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.content-wrap { padding: 1rem; }
.section-title { margin: 0 0 0.8rem; font-size: 1.05rem; color: var(--muted); }
.article { display: grid; gap: 0.58rem; }

.text-item {
  margin: 0;
  padding: 0.56rem 0.68rem;
  border-left: 3px solid var(--line);
  background: color-mix(in srgb, var(--surface-2), transparent 4%);
  border-radius: 8px;
}

.text-item.heading {
  border-left-color: var(--accent-2);
  font-weight: 700;
  font-size: 1.06rem;
  margin-top: 0.45rem;
}

.text-item.subheading {
  border-left-color: var(--accent);
  font-weight: 600;
}

.text-item.bullet {
  border-left-color: color-mix(in srgb, var(--accent), white 30%);
  padding-left: 1.1rem;
  position: relative;
}

.text-item.bullet::before {
  content: "";
  position: absolute;
  left: 0.52rem;
  top: 0.95rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Policy pages: no "card" paragraphs, just smooth flowing text */
body[data-file="privacy"] .article,
body[data-file="termsofservice"] .article {
  gap: 0.75rem;
}

body[data-file="privacy"] .text-item,
body[data-file="termsofservice"] .text-item {
  padding: 0;
  border-left: 0;
  background: transparent;
  border-radius: 0;
}

body[data-file="privacy"] .text-item.heading,
body[data-file="termsofservice"] .text-item.heading {
  font-size: 1.25rem;
  margin-top: 0.9rem;
}

body[data-file="privacy"] .text-item.subheading,
body[data-file="termsofservice"] .text-item.subheading {
  margin-top: 0.5rem;
}

body[data-file="privacy"] .text-item.bullet,
body[data-file="termsofservice"] .text-item.bullet {
  padding-left: 0;
}

body[data-file="privacy"] .text-item.bullet::before,
body[data-file="termsofservice"] .text-item.bullet::before {
  display: none;
}

.footer {
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
  padding-block: clamp(1.5rem, 3vw, 3rem);
  padding-bottom: max(clamp(1.5rem, 3vw, 3rem), env(safe-area-inset-bottom, 0px));
  padding-left: 0;
  padding-right: 0;
  border-top: 1px solid color-mix(in srgb, var(--line), transparent 35%);
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  color: var(--muted);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.btn-legal {
  font-size: 0.82rem;
  padding: 0.5rem 0.78rem;
}

.footer-legal-active {
  color: var(--text);
  border-color: var(--accent);
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.78rem;
  cursor: pointer;
}

/* Full-width bar, content inset ~25% from each viewport edge, left vs right groups */
.home-footer {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: 100vw;
  box-sizing: border-box;
  padding-left: 25vw;
  padding-right: 25vw;
  display: flex;
  flex-wrap: wrap;
  /* Top-align columns so a tall right stack doesn’t vertically center the left block (looked like a huge gap on wide screens) */
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 0;
  margin-bottom: 0;
}

/* Ultra-wide: keep side insets from growing without bound (can reduce footer wrap height) */
@media (min-width: 2200px) {
  .home-footer {
    padding-left: min(25vw, 28rem);
    padding-right: min(25vw, 28rem);
  }
}

/* [ Support | Channel ]  [ Switch — vertically centered vs whole stack ]
       [ Terms | Privacy ] */
.home-footer-right {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.85rem 1.25rem;
}

.home-footer-cta-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.home-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.home-footer-row-legal .btn-legal {
  margin-top: 0;
}

/* Same footprint as Terms / Privacy for Support & Channel */
.home-footer-cta-stack .btn,
.home-footer-cta-stack .btn.primary,
.home-footer-cta-stack .btn-legal {
  font-size: 0.82rem;
  padding: 0.5rem 0.78rem;
  font-weight: 600;
  min-width: 11.5rem;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-footer-right .theme-toggle {
  flex-shrink: 0;
  align-self: center;
}

.home-contact {
  display: grid;
  gap: 0.2rem;
  min-width: 220px;
}

.mail-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2), transparent 8%);
  display: grid;
  place-items: center;
  margin-bottom: 0.18rem;
}

.mail-icon svg {
  width: 18px;
  height: 18px;
  fill: color-mix(in srgb, var(--accent), white 20%);
}

.contact-label {
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
}

.contact-value {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.home-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-end;
}

.home-footer .home-contact {
  text-align: left;
}

/* VIP Security Services Agreement (Services) — home theme surfaces */
.services-agreement {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1rem;
  align-items: start;
}

.services-agreement > .agreement-doc-title {
  grid-column: 1 / -1;
  grid-row: 1;
}

.agreement-toc {
  grid-column: 1;
  grid-row: 2;
  position: sticky;
  top: 78px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  /* Avoid tying max height only to full viewport on very tall 4K displays */
  max-height: min(calc(100vh - 96px), 48rem);
  max-height: min(calc(100dvh - 96px), 48rem);
  overflow-y: auto;
}

.agreement-toc-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.agreement-toc a {
  font-size: 0.82rem;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
  line-height: 1.32;
}

.agreement-toc a:hover {
  color: var(--text);
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-2), transparent 6%);
}

.services-agreement-body {
  grid-column: 2;
  grid-row: 2;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 1.25rem 1.35rem 1.5rem;
  color: var(--text);
}

.agreement-doc-title {
  /* Full article width so center lines up with hero “Services Contract Agreement” */
  margin: 0 0 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0 0 1rem;
  font-size: clamp(1.1rem, 2.1vw, 1.42rem);
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.28;
  text-align: center;
  text-indent: 0;
  text-wrap: balance;
}

.agreement-h2 {
  margin: 1.35rem 0 0.6rem;
  font-size: 1.06rem;
  font-weight: 700;
  scroll-margin-top: 88px;
}

.services-agreement-body > .agreement-h2:first-of-type {
  margin-top: 1.05rem;
}

.agreement-h3 {
  margin: 0.95rem 0 0.38rem;
  font-size: 0.97rem;
  font-weight: 700;
}

.agreement-p {
  margin: 0 0 0.72rem;
  font-size: 0.92rem;
  line-height: 1.58;
  color: color-mix(in srgb, var(--text), var(--muted) 10%);
}

.agreement-ul {
  margin: 0 0 0.82rem;
  padding-left: 1.35rem;
  font-size: 0.92rem;
  line-height: 1.52;
  color: color-mix(in srgb, var(--text), var(--muted) 10%);
}

.agreement-ul li {
  margin-bottom: 0.28rem;
}

.agreement-ul-tight li {
  margin-bottom: 0.1rem;
}

.agreement-lead {
  font-weight: 700;
  margin-right: 0.28rem;
}

/* Services — in-page request wizard (after §13) */
.service-wizard {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid color-mix(in srgb, var(--line), transparent 25%);
}

.service-wizard-step[hidden] {
  display: none !important;
}

.service-wizard-step[data-wizard-step="intro"] {
  display: flex;
  justify-content: flex-end;
}

.wizard-package-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: color-mix(in srgb, var(--surface-2), transparent 6%);
  margin-bottom: 0.65rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wizard-package-wrap.wizard-field--error {
  border-color: #e5484d;
  box-shadow: 0 0 0 1px color-mix(in srgb, #e5484d, transparent 35%);
}

body.light .wizard-package-wrap.wizard-field--error {
  border-color: #d92d20;
  box-shadow: 0 0 0 1px color-mix(in srgb, #d92d20, transparent 40%);
}

.wizard-label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.wizard-field-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: color-mix(in srgb, var(--surface-2), transparent 6%);
  margin-bottom: 0.65rem;
  overflow: hidden;
}

.wizard-field-hint {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--muted);
}

.wizard-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
}

.wizard-timezone-combo {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

/* Timezone control sizing: keep long values (e.g. "Mountain Standard Time —
   America/Creston") inside the card and stop them blowing up the layout on
   phones. The closed select value is clipped with an ellipsis. */
#wizard-timezone-select,
#wizard-timezone-filter {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: clamp(0.8rem, 3.4vw, 0.92rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  background: var(--surface);
  font-family: inherit;
}

#wizard-timezone-filter {
  -webkit-appearance: none;
  appearance: none;
}

/* Timezone header row: label on the left, mode toggle aligned to the right.
   Keep both on one row on real phones; only let the label shrink. */
.wizard-tz-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
  margin-bottom: 0.35rem;
}

.wizard-tz-header .wizard-label {
  margin-bottom: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wizard-tz-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.wizard-tz-toggle-text {
  white-space: nowrap;
}

.wizard-tz-toggle:hover {
  border-color: var(--accent);
}

.wizard-tz-toggle[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent), transparent 80%);
  border-color: var(--accent);
}

.wizard-tz-search {
  position: relative;
}

.wizard-tz-search[hidden] {
  display: none;
}

/* Custom, site-styled results menu for Search Mode (flows below the input so it
   is never clipped by the card and never overlaps the field). Theme-aware so it
   matches dark/light mode on iOS Safari instead of native light styling. */
.wizard-tz-menu {
  color-scheme: inherit;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin-top: 0.5rem;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.35),
    0 0 0 4px color-mix(in srgb, var(--accent), transparent 85%);
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.3rem;
  display: grid;
  gap: 0.12rem;
}

.wizard-tz-menu[hidden] {
  display: none;
}

.wizard-tz-menu-item {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 0.5rem 0.6rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
  cursor: pointer;
}

.wizard-tz-menu-item:hover,
.wizard-tz-menu-item:focus {
  background: color-mix(in srgb, var(--accent), transparent 82%);
  outline: none;
}

/* "No results found." — same font/size/color family as the menu so it does not
   fall back to a different system font on iPhone. */
.wizard-tz-menu-empty {
  padding: 0.65rem;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--muted);
  background: transparent;
  text-align: center;
}

.wizard-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  resize: vertical;
  min-height: 2.75rem;
}

.wizard-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  grid-auto-flow: row;
  grid-auto-rows: auto;
  align-content: start;
}

.wizard-two-col > * {
  min-width: 0;
}

.wizard-duration-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

@media (max-width: 400px) {
  .wizard-duration-pair {
    grid-template-columns: 1fr;
  }
}

/* Mobile: prevent native date/time inputs from nudging/overflowing outside
   cards. iOS Safari gives these an intrinsic fixed width and extra chrome, so
   reset the appearance and force them to respect the parent card width. */
input.wizard-input[type="date"],
input.wizard-input[type="time"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
}

/* Keep the native date/time editable sub-fields from forcing the input wider
   than its card on iOS. */
input.wizard-input[type="date"]::-webkit-date-and-time-value,
input.wizard-input[type="time"]::-webkit-date-and-time-value {
  text-align: left;
  margin: 0;
}

input.wizard-input[type="date"]::-webkit-calendar-picker-indicator,
input.wizard-input[type="time"]::-webkit-calendar-picker-indicator {
  margin-left: auto;
}

@media (max-width: 640px) {
  .wizard-two-col {
    grid-template-columns: 1fr;
  }
}

.wizard-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

.wizard-counter-value {
  min-width: 2rem;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
}

.wizard-sublabel {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--muted);
}

.wizard-protectee-rows {
  display: grid;
  gap: 0.75rem;
}

.wizard-protectee-row {
  display: grid;
  gap: 0.35rem;
}

.wizard-protectee-row[hidden] {
  display: none !important;
}

.wizard-protectee-block-title {
  margin: 0 0 0.15rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
}

.wizard-protectee-pair {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
}

@media (min-width: 520px) {
  .wizard-protectee-pair {
    grid-template-columns: 1fr 1fr;
  }
}

.wizard-protectee-age-desc {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}

.wizard-protectee-age-block {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.45rem;
}

.wizard-primary-choice {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 0.15rem;
}

.wizard-primary-choice input {
  width: 1rem;
  height: 1rem;
}

.wizard-primary-choice input:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.wizard-check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 650;
  color: var(--text);
}

.wizard-check input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.1rem;
}

.wizard-three-col {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
}

@media (min-width: 520px) {
  .wizard-three-col {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.wizard-signature-wrap {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface), #3b82f6 10%);
  overflow: hidden;
}

.wizard-signature-pad {
  display: block;
  width: 100%;
  height: 170px;
  touch-action: none;
  background: color-mix(in srgb, var(--surface), #3b82f6 10%);
}

.wizard-signature-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.6rem 0.7rem;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2), transparent 6%);
}

.wizard-honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.wizard-review-grid {
  display: grid;
  gap: 0.75rem;
}

.wizard-review-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2), transparent 6%);
  padding: 0.85rem 0.95rem;
}

.wizard-review-title {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  font-weight: 850;
  color: var(--text);
}

.wizard-review-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  padding: 0.35rem 0;
  border-top: 1px solid color-mix(in srgb, var(--line), transparent 35%);
}

.wizard-review-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.wizard-review-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
}

.wizard-review-value {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--text);
  word-break: break-word;
}

@media (min-width: 720px) {
  .wizard-review-row {
    grid-template-columns: 220px 1fr;
    gap: 0.65rem;
    align-items: baseline;
  }
}

.wizard-desc {
  margin: 0 0 0.65rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted);
}

.wizard-select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
}

.wizard-error {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
  color: #f87171;
  font-weight: 600;
}

.wizard-error.wizard-success {
  color: #34d399;
}

body.light .wizard-error.wizard-success {
  color: #047857;
}

/* Hold-to-clear signature button fill animation */
.wizard-hold-btn {
  position: relative;
  overflow: hidden;
  --hold-pct: 0%;
}

.wizard-hold-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--hold-pct);
  max-width: 100%;
  background: color-mix(in srgb, var(--accent), transparent 65%);
  transition: width 0.08s linear;
  pointer-events: none;
}

body.light .wizard-error {
  color: #b91c1c;
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

.wizard-summary {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.wizard-note {
  margin: 0 0 1rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
}

#wizard-submit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.wizard-vehicle-figure {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2), transparent 6%);
  text-align: center;
}

.wizard-vehicle-figure img {
  display: block;
  max-width: min(100%, 22rem);
  height: auto;
  margin: 0 auto;
}

.wizard-vehicle-disclaimer {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.wizard-vehicle-disclaimer strong {
  color: var(--text);
  font-weight: 800;
}

.wizard-step-title {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text);
}

.wizard-attire-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2), transparent 6%);
  padding: 0.95rem 1rem 1rem;
  margin-bottom: 0.65rem;
}

.wizard-attire-name {
  margin: 0 0 0.7rem;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.wizard-attire-media {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line), transparent 20%);
  background: var(--bg-2);
  /* Desktop: keep image smaller so name stays readable */
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.wizard-attire-media img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 340px;
  object-fit: contain;
}

.wizard-attire-toggle {
  margin-top: 0.75rem;
  display: grid;
  /* 25% / 50% / 25% layout */
  grid-template-columns: 1fr 2fr 1fr;
  gap: 0.55rem;
  align-items: center;
}

@media (max-width: 520px) {
  .wizard-attire-toggle {
    grid-template-columns: 1fr 2fr 1fr;
    gap: 0.4rem;
  }

  /* Mobile: show arrows, shrink side buttons to ~25% */
  .wizard-attire-nav {
    padding: 0.45rem 0.55rem;
  }

  .wizard-attire-nav-text {
    display: none;
  }

  .wizard-attire-nav::before {
    display: inline-block;
    font-size: 1.05rem;
    line-height: 1;
    font-weight: 800;
    content: "‹";
  }

  .wizard-attire-nav[data-action="attire-next"]::before {
    content: "›";
  }

  /* Select button about half-width (middle 2fr) and slightly smaller */
  #wizard-attire-select-btn {
    padding: 0.52rem 0.7rem;
  }
}

/* Tablet / small laptop: stacked header with full nav (no hamburger) */
@media (max-width: 940px) and (min-width: 769px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.7rem 0;
    gap: 0.75rem;
  }
  .brand-wrap {
    min-width: 0;
    width: 100%;
  }
  .nav-right {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-menu-toggle {
    display: none !important;
  }
}

/* Phone: compact header + menu icon only */
@media (max-width: 768px) {
  .nav {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.75rem;
    padding: 0.65rem 0;
  }
  .brand-wrap {
    min-width: 0;
    flex: 1;
    width: auto;
  }
  .nav-right {
    width: auto;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
  }
  .nav-right .nav-links,
  .nav-right .header-ctas {
    display: none !important;
  }
  .nav-menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 940px) {
  .main-grid { grid-template-columns: 1fr; }
  .side-panel { position: static; }
  .hero-copy { position: static; background: var(--surface); }
  .subtitle { color: var(--muted); }
  .why-us-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
  .services-agreement {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .services-agreement > .agreement-doc-title {
    grid-column: 1;
  }
  .agreement-toc {
    grid-column: 1;
    grid-row: auto;
    position: static;
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .services-agreement-body {
    grid-column: 1;
    grid-row: auto;
  }
  .agreement-toc-label {
    width: 100%;
    margin-bottom: 0;
  }
  .agreement-toc a {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: min(160px, 100%);
  }
  .home-footer {
    align-items: stretch;
    flex-direction: column;
    padding-left: max(1rem, 6vw);
    padding-right: max(1rem, 6vw);
    left: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
  }
  .home-footer-right {
    flex-direction: column;
    align-items: stretch;
  }
  .home-footer-right .theme-toggle {
    align-self: flex-start;
  }
  .home-footer-cta-stack {
    align-items: stretch;
    width: 100%;
    max-width: 100%;
  }
  /* Same two-column layout for Support|Channel and Terms|Privacy */
  .home-footer-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    width: 100%;
    justify-content: stretch;
  }
  .home-footer-actions {
    display: contents;
  }
  .home-footer-cta-stack .btn,
  .home-footer-cta-stack .btn.primary,
  .home-footer-cta-stack .btn-legal {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}
