/*
  AV LÜ™ Site Finish System v2.4.0
  Designed, created, and owned by AVLU.
  Front-end presentation and navigation only.
  © 2026 AVLU. All rights reserved.
*/

:root {
  --sf-paper: #f3efe6;
  --sf-paper-bright: #fffdf8;
  --sf-paper-deep: #e7e0d2;
  --sf-ink: #10161d;
  --sf-ink-soft: #343e47;
  --sf-rule: rgba(16, 22, 29, .2);
  --sf-blue: #2459a8;
  --sf-blue-deep: #173d77;
  --sf-rust: #a84d35;
  --sf-green: #2e7357;
  --sf-amber: #93611b;
  --sf-white: #fffdfa;
  --sf-header-height: 70px;
  --sf-accent: var(--sf-blue);
  --sf-accent-deep: var(--sf-blue-deep);
  --sf-accent-soft: rgba(36, 89, 168, .13);
  --sf-shadow-paper: 0 2px 0 rgba(16, 22, 29, .16), 0 18px 42px rgba(16, 22, 29, .09);
  --sf-shadow-key: 0 4px 0 rgba(7, 12, 17, .96), 0 14px 28px rgba(7, 12, 17, .2);
  --sf-serif: var(--oc-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif);
  --sf-sans: var(--oc-sans, Aptos, "Segoe UI Variable", "Segoe UI", Arial, sans-serif);
  --sf-mono: var(--oc-mono, "SFMono-Regular", Consolas, monospace);
  --sf-ease: cubic-bezier(.2, .8, .2, 1);
}

body.avlu-site-finish {
  --sf-accent: var(--sf-blue);
  --sf-accent-deep: var(--sf-blue-deep);
  --sf-accent-soft: rgba(36, 89, 168, .13);
  overflow-x: clip;
}

body.route-for-dealers,
body.route-feedback,
body.route-case-study {
  --sf-accent: var(--sf-rust);
  --sf-accent-deep: #713222;
  --sf-accent-soft: rgba(168, 77, 53, .14);
}

body.route-about,
body.route-source-search,
body.route-authority-map {
  --sf-accent: var(--sf-green);
  --sf-accent-deep: #1d513d;
  --sf-accent-soft: rgba(46, 115, 87, .14);
}

body.route-evidence-in-action,
body.route-simulation-lab {
  --sf-accent: var(--sf-amber);
  --sf-accent-deep: #64400f;
  --sf-accent-soft: rgba(147, 97, 27, .14);
}

body.route-privacy,
body.route-terms,
body.route-login {
  --sf-accent: #b45c43;
  --sf-accent-deep: #76331f;
  --sf-accent-soft: rgba(180, 92, 67, .15);
}

body.avlu-site-finish *,
body.avlu-site-finish *::before,
body.avlu-site-finish *::after {
  box-sizing: border-box;
}

body.avlu-site-finish main > :is(section, article) {
  position: relative;
  scroll-margin-top: calc(var(--sf-header-height) + 34px);
}

body.avlu-site-finish:not(.route-index):not(.route-client-review):not(.route-presentation) main > :first-child {
  isolation: isolate;
}

body.avlu-site-finish:not(.route-index):not(.route-client-review):not(.route-presentation) main > :first-child::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: min(44vw, 700px);
  height: min(100%, 580px);
  pointer-events: none;
  background:
    linear-gradient(135deg, transparent 0 44%, var(--sf-accent-soft) 44% 44.25%, transparent 44.25% 100%),
    radial-gradient(circle at 72% 18%, var(--sf-accent-soft), transparent 16rem);
  opacity: .78;
}

body.avlu-site-finish :is(.ref-title-small, .v13-page-hero h1, .about-hero h1, .authority-hero h1, .simulation-hero h1, .case-hero h1) {
  text-wrap: balance;
}

body.avlu-site-finish :is(.ref-lead, .v13-page-hero__lead, .about-hero__lead, .authority-hero__lead, .simulation-lead, .hero-copy, .presentation-lead) {
  text-wrap: pretty;
}

/* Reading progress and header depth */

.avlu-site-progress {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
  background: rgba(16, 22, 29, .1);
}

.avlu-site-progress > span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(var(--sf-read-progress, 0));
  transform-origin: left;
  background: linear-gradient(90deg, var(--sf-accent-deep), var(--sf-accent) 70%, var(--sf-rust));
  box-shadow: 0 0 12px var(--sf-accent-soft);
  transition: transform 70ms linear;
}

body.avlu-site-finish .v13-header,
body.avlu-site-finish .presentation-toolbar {
  transition: box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

body.avlu-site-finish.site-has-scrolled .v13-header {
  border-bottom-color: rgba(16, 22, 29, .82);
  background: rgba(248, 244, 235, .975);
  box-shadow: 0 10px 28px rgba(16, 22, 29, .11), 0 1px 0 rgba(255, 255, 255, .72) inset;
}

body.avlu-site-finish.site-has-scrolled .presentation-toolbar {
  box-shadow: 0 10px 28px rgba(4, 9, 15, .22);
}

body.avlu-site-finish .v13-nav a[aria-current="page"]::before,
body.avlu-site-finish .v13-nav a.is-current::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sf-accent);
  box-shadow: 0 0 0 3px var(--sf-accent-soft);
}

/* Route identification plate */

.avlu-route-plate {
  position: absolute;
  z-index: 8;
  top: clamp(18px, 2.4vw, 34px);
  right: max(18px, calc((100vw - 1240px) / 2));
  display: inline-grid;
  grid-template-columns: 42px auto;
  align-items: stretch;
  overflow: hidden;
  min-width: 178px;
  border: 1px solid rgba(16, 22, 29, .88);
  border-radius: 6px;
  background: rgba(255, 253, 248, .94);
  box-shadow: 0 3px 0 rgba(16, 22, 29, .86), 0 12px 25px rgba(16, 22, 29, .1);
  color: var(--sf-ink);
  pointer-events: none;
  backdrop-filter: blur(10px);
}

html[data-theme="dark"] .avlu-route-plate {
  border-color: rgba(237, 243, 251, .28);
  background: rgba(12, 23, 35, .92);
  box-shadow: 0 3px 0 var(--sf-accent), 0 12px 25px rgba(0, 0, 0, .24);
  color: #edf3fb;
}

.avlu-route-plate__index {
  display: grid;
  place-items: center;
  color: var(--sf-white);
  background: var(--sf-accent-deep);
  font-family: var(--sf-mono);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
}

html[data-theme="dark"] .avlu-route-plate__index {
  background: var(--sf-accent-deep);
  color: var(--sf-white);
}

.avlu-route-plate__copy {
  display: grid;
  gap: 2px;
  align-content: center;
  min-height: 42px;
  padding: 7px 11px 6px;
}

.avlu-route-plate__copy strong {
  color: var(--sf-ink);
  font-family: var(--sf-sans);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .07em;
  line-height: 1.1;
  text-transform: uppercase;
}

.avlu-route-plate__copy small {
  color: #69727a;
  font-family: var(--sf-mono);
  font-size: .52rem;
  letter-spacing: .05em;
  line-height: 1.15;
  text-transform: uppercase;
}

html[data-theme="dark"] body.route-authority-map .avlu-route-plate,
html[data-theme="dark"] body.route-simulation-lab .avlu-route-plate,
html[data-theme="dark"] body.route-evidence-in-action .avlu-route-plate,
html[data-theme="dark"] body.route-dealer-validation .avlu-route-plate {
  color: var(--sf-white);
  border-color: rgba(255, 255, 255, .38);
  background: rgba(12, 20, 31, .9);
  box-shadow: 0 3px 0 var(--sf-accent), 0 12px 25px rgba(0, 0, 0, .24);
}

html[data-theme="dark"] body.route-authority-map .avlu-route-plate__copy strong,
html[data-theme="dark"] body.route-simulation-lab .avlu-route-plate__copy strong,
html[data-theme="dark"] body.route-evidence-in-action .avlu-route-plate__copy strong,
html[data-theme="dark"] body.route-dealer-validation .avlu-route-plate__copy strong {
  color: var(--sf-white);
}

html[data-theme="dark"] body.route-authority-map .avlu-route-plate__copy small,
html[data-theme="dark"] body.route-simulation-lab .avlu-route-plate__copy small,
html[data-theme="dark"] body.route-evidence-in-action .avlu-route-plate__copy small,
html[data-theme="dark"] body.route-dealer-validation .avlu-route-plate__copy small {
  color: rgba(255, 255, 255, .65);
}

body.route-privacy .avlu-route-plate,
body.route-terms .avlu-route-plate {
  position: static;
  width: fit-content;
  margin: 0 0 28px;
}

/* Section index marks */

.avlu-section-index {
  position: absolute;
  z-index: 3;
  top: 22px;
  left: max(12px, calc((100vw - 1370px) / 2));
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--sf-accent-deep);
  font-family: var(--sf-mono);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .09em;
  line-height: 1;
  pointer-events: none;
}

.avlu-section-index::after {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  opacity: .5;
}

body.route-authority-map :is(.authority-section--navy, .authority-cta) .avlu-section-index,
body.route-simulation-lab :is(.simulation-section--navy, .simulation-cta) .avlu-section-index,
body.route-presentation .presentation-slide--navy .avlu-section-index,
body.route-evidence-in-action .case-proof-board .avlu-section-index {
  color: rgba(255, 255, 255, .74);
}

/* Section navigator */

.avlu-section-nav {
  position: fixed;
  z-index: 72;
  top: 50%;
  right: 10px;
  display: none;
  gap: 4px;
  padding: 7px 6px;
  border: 1px solid rgba(16, 22, 29, .22);
  border-radius: 9px;
  background: rgba(255, 253, 248, .88);
  box-shadow: 0 3px 0 rgba(16, 22, 29, .22), 0 16px 30px rgba(16, 22, 29, .09);
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

body.has-site-section-nav .avlu-section-nav {
  display: grid;
}

.avlu-section-nav a {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #69727a;
  background: transparent;
  font-family: var(--sf-mono);
  font-size: .57rem;
  font-weight: 900;
  text-decoration: none;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease, transform 120ms var(--sf-ease);
}

.avlu-section-nav a::before {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  width: max-content;
  max-width: 210px;
  padding: 7px 9px;
  border: 1px solid rgba(16, 22, 29, .86);
  border-radius: 5px;
  color: var(--sf-white);
  background: var(--sf-ink);
  box-shadow: 0 3px 0 var(--sf-accent);
  font-family: var(--sf-sans);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .015em;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, -50%);
  transition: opacity 120ms ease, transform 150ms var(--sf-ease);
}

.avlu-section-nav a:hover,
.avlu-section-nav a:focus-visible {
  color: var(--sf-ink);
  border-color: rgba(16, 22, 29, .28);
  background: var(--sf-accent-soft);
  transform: translateX(-2px);
}

.avlu-section-nav a:hover::before,
.avlu-section-nav a:focus-visible::before,
.avlu-section-nav a[aria-current="true"]::before {
  opacity: 1;
  transform: translate(0, -50%);
}

.avlu-section-nav a[aria-current="true"] {
  color: var(--sf-white);
  border-color: var(--sf-accent-deep);
  background: var(--sf-accent-deep);
  box-shadow: 0 2px 0 var(--sf-ink);
}

/* Back to top */

.avlu-back-top {
  position: fixed;
  z-index: 71;
  right: 18px;
  bottom: 18px;
  display: inline-grid;
  grid-template-columns: 28px auto;
  align-items: center;
  min-height: 42px;
  padding: 0 13px 0 6px;
  border: 1px solid var(--sf-ink);
  border-radius: 7px;
  color: var(--sf-white);
  background: var(--sf-ink);
  box-shadow: 0 3px 0 var(--sf-accent), 0 10px 20px rgba(16, 22, 29, .18);
  font-family: var(--sf-mono);
  font-size: .6rem;
  font-weight: 900;
  letter-spacing: .08em;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 140ms ease, transform 170ms var(--sf-ease), box-shadow 100ms ease;
}

.avlu-back-top > span:first-child {
  font-family: var(--sf-sans);
  font-size: 1rem;
}

body.site-back-top-visible .avlu-back-top {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.avlu-back-top:hover {
  background: var(--sf-accent-deep);
}

.avlu-back-top:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--sf-accent), 0 4px 10px rgba(16, 22, 29, .16);
}

/* Reveal pacing */

body.site-finish-motion .avlu-site-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 440ms ease, transform 520ms var(--sf-ease);
}

body.site-finish-motion .avlu-site-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Shared content hierarchy */

body.avlu-site-finish:not(.route-index):not(.route-client-review):not(.route-presentation) :is(.ref-section, .v13-section, .simulation-section, .authority-section, .client-section, .section-tight) {
  padding-top: clamp(64px, 7vw, 104px);
  padding-bottom: clamp(64px, 7vw, 104px);
}

body.avlu-site-finish :is(.ref-section-title, .v13-section-head, .simulation-section__head, .authority-section__head, .client-section__head) {
  position: relative;
}

body.avlu-site-finish :is(.ref-section-title, .v13-section-head, .simulation-section__head, .authority-section__head, .client-section__head)::after {
  content: "";
  display: block;
  width: min(120px, 24vw);
  height: 2px;
  margin-top: 20px;
  background: linear-gradient(90deg, var(--sf-accent), transparent);
}

body.avlu-site-finish :is(.ref-eyebrow, .v13-eyebrow, .authority-eyebrow, .simulation-kicker, .client-eyebrow, .section-label, .eyebrow) {
  color: var(--sf-accent-deep);
}

body.avlu-site-finish :is(.ref-section-title h2, .v13-section-head h2, .simulation-section__head h2, .authority-section__head h2, .client-section__head h2) {
  text-wrap: balance;
}

html[data-theme="dark"] body.avlu-site-finish:not(.route-index) :is(.ref-panel, .client-panel, .v13-proof-box, .v13-ledger-card, .simulation-table-card, .authority-canvas, .case-form-panel, .case-output-panel) {
  border-color: rgba(16, 22, 29, .25);
  box-shadow: var(--sf-shadow-paper);
}

body.avlu-site-finish:not(.route-index) :is(
  .ref-card,
  .ref-step-card,
  .ref-help-card,
  .ref-benefit,
  .v13-process-card,
  .v13-evidence__item,
  .about-principles article,
  .about-boundary-card,
  .dealer-difference-card,
  .case-walkthrough,
  .authority-map-card,
  .simulation-boundary-card,
  .client-panel,
  .client-strip-card,
  .secure-handoff__check,
  .secure-handoff__stage
) {
  transition: transform 160ms var(--sf-ease), box-shadow 160ms var(--sf-ease), border-color 160ms ease;
}

@media (hover: hover) {
  body.avlu-site-finish:not(.route-index) :is(
    .ref-card,
    .ref-step-card,
    .ref-help-card,
    .ref-benefit,
    .v13-process-card,
    .v13-evidence__item,
    .about-principles article,
    .about-boundary-card,
    .dealer-difference-card,
    .case-walkthrough,
    .authority-map-card,
    .simulation-boundary-card,
    .client-panel,
    .secure-handoff__check,
    .secure-handoff__stage
  ):hover {
    z-index: 2;
    transform: translateY(-4px);
  }

  html[data-theme="dark"] body.avlu-site-finish:not(.route-index) :is(
    .ref-card,
    .ref-step-card,
    .ref-help-card,
    .ref-benefit,
    .v13-process-card,
    .v13-evidence__item,
    .about-principles article,
    .about-boundary-card,
    .dealer-difference-card,
    .case-walkthrough,
    .authority-map-card,
    .simulation-boundary-card,
    .client-panel,
    .secure-handoff__check,
    .secure-handoff__stage
  ):hover {
    border-color: color-mix(in srgb, var(--sf-accent) 52%, var(--sf-ink));
    box-shadow: 0 4px 0 var(--sf-accent), 0 20px 36px rgba(16, 22, 29, .12);
  }
}

body.avlu-site-finish :is(input, select, textarea) {
  accent-color: var(--sf-accent);
}

body.avlu-site-finish :is(input, select, textarea):focus {
  border-color: var(--sf-accent-deep) !important;
  box-shadow: 0 0 0 3px var(--sf-accent-soft) !important;
}

body.avlu-site-finish :is(.ref-field, .client-field, .v13-validation-fieldset legend) {
  font-variant-numeric: tabular-nums;
}

body.avlu-site-finish :is(.ref-field, .client-field) > :is(input, select, textarea) {
  background-color: rgba(255, 253, 248, .92);
}

body.avlu-site-finish :is(.v13-ledger-table-wrap, .simulation-table-wrap, .dealer-difference-table, [class*="table-wrap"]) {
  scrollbar-color: var(--sf-accent) var(--sf-paper-deep);
  scrollbar-width: thin;
}

body.avlu-site-finish :is(.v13-ledger-table, .simulation-table-card table, .dealer-difference-table table) {
  font-variant-numeric: tabular-nums;
}

body.avlu-site-finish :is(.v13-ledger-table, .simulation-table-card table, .dealer-difference-table table) thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  color: var(--sf-white);
  background: var(--sf-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset;
}

body.avlu-site-finish :is(.v13-ledger-table, .simulation-table-card table, .dealer-difference-table table) tbody tr:nth-child(even) {
  background: rgba(36, 89, 168, .045);
}

body.avlu-site-finish :is(.v13-ledger-table, .simulation-table-card table, .dealer-difference-table table) tbody tr:hover {
  background: var(--sf-accent-soft);
}

body.avlu-site-finish :is(.ref-cta, .v13-cta, .simulation-cta, .authority-cta, .client-section--cta) {
  position: relative;
  overflow: hidden;
}

body.avlu-site-finish :is(.ref-cta, .v13-cta, .simulation-cta, .authority-cta, .client-section--cta)::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -42px;
  width: 140px;
  height: 140px;
  border: 18px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  pointer-events: none;
}

body.avlu-site-finish .v13-footer,
body.avlu-site-finish .footer {
  position: relative;
}

body.avlu-site-finish .v13-footer::before,
body.avlu-site-finish .footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sf-accent-deep), var(--sf-accent) 62%, var(--sf-rust));
}

body.avlu-site-finish .v13-footer__grid > div:not(:first-child) {
  padding-left: clamp(0px, 1vw, 18px);
}

body.avlu-site-finish .v13-footer__bottom,
body.avlu-site-finish .footer-inner {
  font-size: .58rem;
  letter-spacing: .015em;
}

/* About */

body.route-about .about-hero {
  padding-top: clamp(88px, 9vw, 138px);
  padding-bottom: clamp(78px, 8vw, 124px);
}

body.route-about .about-hero__grid {
  align-items: center;
}

body.route-about .about-proof-map {
  transform: rotate(.28deg);
}

html[data-theme="dark"] body.route-about .about-proof-map {
  border: 1px solid var(--sf-ink);
  box-shadow: 10px 10px 0 var(--sf-accent), 0 26px 46px rgba(16, 22, 29, .14);
}

html[data-theme="dark"] body.route-about .about-proof-map header {
  border-bottom-color: rgba(255, 255, 255, .22);
}

html[data-theme="dark"] body.route-about .about-proof-map li > span {
  color: #d4e2ff;
}

body.route-about .about-story__grid {
  align-items: start;
  gap: clamp(44px, 8vw, 120px);
}

body.route-about .about-story__copy {
  position: relative;
  padding-left: clamp(22px, 3vw, 42px);
}

html[data-theme="dark"] body.route-about .about-story__copy {
  border-left: 3px solid var(--sf-accent);
}

body.route-about .about-principles article {
  min-height: 260px;
}

html[data-theme="dark"] body.route-about .about-principles article {
  border: 1px solid var(--sf-ink);
  background: var(--sf-paper-bright);
  box-shadow: 0 4px 0 rgba(16, 22, 29, .75);
}

html[data-theme="dark"] body.route-about .about-principles article > span {
  color: var(--sf-accent-deep);
}

html[data-theme="dark"] body.route-about .about-boundary-card--does {
  box-shadow: 7px 7px 0 var(--sf-accent);
}

html[data-theme="dark"] body.route-about .about-boundary-card--never {
  box-shadow: 7px 7px 0 var(--sf-rust);
}

body.route-about .about-evidence-strip {
  overflow: hidden;
  border-radius: 8px;
}

html[data-theme="dark"] body.route-about .about-evidence-strip {
  border: 1px solid var(--sf-ink);
}

html[data-theme="dark"] body.route-about .about-evidence-strip {
  color: var(--sf-white);
  background:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    var(--sf-ink);
  background-size: 24px 24px, 24px 24px, auto;
  box-shadow: 8px 8px 0 var(--sf-accent);
}

body.route-about .about-evidence-strip > div {
  padding: 24px 18px;
}

html[data-theme="dark"] body.route-about .about-evidence-strip > div + div {
  border-left-color: rgba(255, 255, 255, .14);
}

html[data-theme="dark"] body.route-about .about-evidence-strip strong,
html[data-theme="dark"] body.route-about .about-evidence-strip span {
  color: inherit;
}

html[data-theme="dark"] body.route-about .about-contact-card {
  border: 1px solid var(--sf-ink);
  background: var(--sf-paper-bright);
  box-shadow: 9px 9px 0 var(--sf-accent-soft), 0 22px 40px rgba(16, 22, 29, .1);
}

html[data-theme="dark"] body.route-about .about-contact-mark {
  border: 1px solid var(--sf-ink);
  box-shadow: 0 4px 0 var(--sf-ink);
}

/* How it works */

body.route-how-it-works .ref-page-hero {
  padding-top: clamp(80px, 8vw, 126px);
  padding-bottom: clamp(72px, 7vw, 112px);
}

body.route-how-it-works .ref-dashboard {
  transform: rotate(.18deg);
}

html[data-theme="dark"] body.route-how-it-works .ref-dashboard {
  border: 1px solid var(--sf-ink);
  box-shadow: 12px 12px 0 var(--sf-accent), 0 28px 54px rgba(16, 22, 29, .14);
}

body.route-how-it-works #workflow .ref-card-grid {
  position: relative;
  isolation: isolate;
}

body.route-how-it-works #workflow .ref-card-grid::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 27px;
  right: 5%;
  left: 5%;
  height: 2px;
  opacity: .38;
}

html[data-theme="dark"] body.route-how-it-works #workflow .ref-card-grid::before {
  background: repeating-linear-gradient(90deg, var(--sf-accent) 0 12px, transparent 12px 18px);
}

html[data-theme="dark"] body.route-how-it-works .ref-step-card {
  border: 1px solid rgba(16, 22, 29, .34);
  background: var(--sf-paper-bright);
  box-shadow: 0 4px 0 rgba(16, 22, 29, .72);
}

html[data-theme="dark"] body.route-how-it-works .ref-step-number {
  border: 1px solid var(--sf-ink);
  box-shadow: 0 2px 0 var(--sf-ink);
}

html[data-theme="dark"] body.route-how-it-works main > section:nth-of-type(3) {
  color: var(--sf-white);
  border-top: 1px solid var(--sf-ink);
  border-bottom: 1px solid var(--sf-ink);
  background:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    var(--sf-ink);
  background-size: 28px 28px, 28px 28px, auto;
}

html[data-theme="dark"] body.route-how-it-works main > section:nth-of-type(3) :is(h2, .ref-section-title p) {
  color: var(--sf-white);
}

html[data-theme="dark"] body.route-how-it-works main > section:nth-of-type(3) .ref-section-title::after {
  background: linear-gradient(90deg, #93b2ff, transparent);
}

html[data-theme="dark"] body.route-how-it-works main > section:nth-of-type(3) .ref-card {
  color: var(--sf-ink);
  background: var(--sf-paper-bright);
}

html[data-theme="dark"] body.route-how-it-works main > section:nth-of-type(3) .ref-card {
  border-color: rgba(255, 255, 255, .36);
  box-shadow: 0 4px 0 var(--sf-accent);
}

body.route-how-it-works main > section:nth-of-type(4) .ref-stat-strip {
  overflow: hidden;
  border-radius: 8px;
}

html[data-theme="dark"] body.route-how-it-works main > section:nth-of-type(4) .ref-stat-strip {
  border: 1px solid var(--sf-ink);
  background: var(--sf-paper-bright);
  box-shadow: 8px 8px 0 var(--sf-accent-soft);
}

html[data-theme="dark"] body.route-how-it-works #faq details {
  border-color: rgba(16, 22, 29, .24);
  background: var(--sf-paper-bright);
}

html[data-theme="dark"] body.route-how-it-works #faq details[open] {
  border-color: var(--sf-accent);
  box-shadow: 0 3px 0 var(--sf-accent);
}

/* Dealer page */

body.route-for-dealers .ref-page-hero {
  padding-top: clamp(82px, 8vw, 128px);
  padding-bottom: clamp(76px, 7vw, 112px);
}

body.route-for-dealers .ref-dashboard {
  transform: rotate(-.16deg);
}

html[data-theme="dark"] body.route-for-dealers .ref-dashboard {
  border: 1px solid var(--sf-ink);
  box-shadow: 12px 12px 0 var(--sf-rust), 0 28px 54px rgba(16, 22, 29, .15);
}

html[data-theme="dark"] body.route-for-dealers .dealer-proof-bridge__packet {
  border: 1px solid var(--sf-ink);
  box-shadow: 9px 9px 0 var(--sf-accent), 0 22px 42px rgba(16, 22, 29, .12);
}

html[data-theme="dark"] body.route-for-dealers .dealer-proof-bridge__steps li > span {
  border: 1px solid var(--sf-ink);
  box-shadow: 0 2px 0 var(--sf-ink);
}

html[data-theme="dark"] body.route-for-dealers #dealer-types .ref-card {
  border: 1px solid rgba(16, 22, 29, .3);
  background: var(--sf-paper-bright);
  box-shadow: 0 4px 0 rgba(16, 22, 29, .7);
}

html[data-theme="dark"] body.route-for-dealers #one-listing-pilot {
  border-top: 1px solid var(--sf-ink);
  border-bottom: 1px solid var(--sf-ink);
}

html[data-theme="dark"] body.route-for-dealers #one-listing-pilot .ref-pilot-offer__panel {
  box-shadow: 10px 10px 0 var(--sf-rust), 0 24px 44px rgba(16, 22, 29, .14);
}

body.route-for-dealers main > section:nth-of-type(5) .ref-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body.route-for-dealers main > section:nth-of-type(5) .ref-card {
  min-height: 190px;
}

html[data-theme="dark"] body.route-for-dealers main > section:nth-of-type(5) .ref-card {
  border: 1px solid rgba(16, 22, 29, .28);
  background: var(--sf-paper-bright);
}

html[data-theme="dark"] body.route-for-dealers .dealer-difference-table {
  border: 1px solid var(--sf-ink);
  box-shadow: 8px 8px 0 var(--sf-accent-soft);
}

html[data-theme="dark"] body.route-for-dealers .dealer-difference-cta {
  border: 1px solid var(--sf-ink);
  box-shadow: 8px 8px 0 var(--sf-rust);
}

body.route-for-dealers main > section:last-of-type .ref-stat-strip {
  overflow: hidden;
  border-radius: 8px;
}

html[data-theme="dark"] body.route-for-dealers main > section:last-of-type .ref-stat-strip {
  border: 1px solid var(--sf-ink);
  background: var(--sf-paper-bright);
  box-shadow: 8px 8px 0 var(--sf-accent-soft);
}

/* Evidence in action */

body.route-evidence-in-action .case-walkthrough-hero {
  padding-top: clamp(86px, 8vw, 132px);
  padding-bottom: clamp(78px, 8vw, 120px);
}

html[data-theme="dark"] body.route-evidence-in-action .case-proof-board {
  box-shadow: 10px 10px 0 var(--sf-accent), 0 24px 46px rgba(16, 22, 29, .15);
}

html[data-theme="dark"] body.route-evidence-in-action .case-quote-file {
  border: 1px solid var(--sf-ink);
  background:
    linear-gradient(90deg, rgba(168, 77, 53, .12) 0 1px, transparent 1px) 34px 0 / calc(100% - 34px) 100% no-repeat,
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(16, 22, 29, .045) 31px 32px),
    var(--sf-paper-bright);
  box-shadow: 9px 9px 0 var(--sf-accent-soft);
}

body.route-evidence-in-action .case-walkthrough {
  overflow: hidden;
}

html[data-theme="dark"] body.route-evidence-in-action .case-walkthrough {
  border: 1px solid rgba(16, 22, 29, .3);
  background: var(--sf-paper-bright);
  box-shadow: 0 4px 0 rgba(16, 22, 29, .72);
}

html[data-theme="dark"] body.route-evidence-in-action .case-walkthrough__summary {
  border-bottom-color: rgba(16, 22, 29, .16);
}

html[data-theme="dark"] body.route-evidence-in-action .case-decision {
  border: 1px solid var(--sf-ink);
  box-shadow: 0 3px 0 var(--sf-ink);
}

html[data-theme="dark"] body.route-evidence-in-action .case-file-standard {
  border-top: 1px solid var(--sf-ink);
  border-bottom: 1px solid var(--sf-ink);
}

body.route-evidence-in-action .case-boundary-card {
  min-height: 220px;
}

html[data-theme="dark"] body.route-evidence-in-action .case-boundary-card {
  border: 1px solid rgba(16, 22, 29, .28);
  box-shadow: 0 4px 0 rgba(16, 22, 29, .68);
}

/* Evidence ledger */

body.route-evidence .v13-page-hero {
  padding-top: clamp(84px, 8vw, 130px);
  padding-bottom: clamp(76px, 7vw, 116px);
}

html[data-theme="dark"] body.route-evidence .target-evidence-scorecard {
  border: 1px solid var(--sf-ink);
  box-shadow: 10px 10px 0 var(--sf-accent), 0 24px 46px rgba(16, 22, 29, .14);
}

body.route-evidence .v13-evidence__grid {
  overflow: hidden;
  border-radius: 8px;
}

html[data-theme="dark"] body.route-evidence .v13-evidence__grid {
  border: 1px solid var(--sf-ink);
  background: var(--sf-paper-bright);
  box-shadow: 8px 8px 0 var(--sf-accent-soft);
}

html[data-theme="dark"] body.route-evidence .v13-evidence__item {
  border-color: rgba(16, 22, 29, .15);
}

body.route-evidence .v13-process-card {
  min-height: 205px;
}

html[data-theme="dark"] body.route-evidence .v13-process-card {
  border: 1px solid rgba(16, 22, 29, .3);
  background: var(--sf-paper-bright);
  box-shadow: 0 4px 0 rgba(16, 22, 29, .68);
}

body.route-evidence #ledger .v13-ledger-card,
body.route-evidence #evidence-explorer .v13-ledger-card {
  overflow: hidden;
}

html[data-theme="dark"] body.route-evidence #ledger .v13-ledger-card,
html[data-theme="dark"] body.route-evidence #evidence-explorer .v13-ledger-card {
  border: 1px solid var(--sf-ink);
  box-shadow: 9px 9px 0 var(--sf-accent-soft);
}

body.route-evidence .v13-evidence-toolbar {
  position: sticky;
  z-index: 7;
  top: calc(var(--sf-header-height) + 10px);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

html[data-theme="dark"] body.route-evidence .v13-evidence-toolbar {
  border: 1px solid rgba(16, 22, 29, .22);
  background: rgba(255, 253, 248, .94);
  box-shadow: 0 8px 22px rgba(16, 22, 29, .1);
}

body.route-evidence .v13-ledger-table-wrap {
  max-height: min(72vh, 760px);
}

html[data-theme="dark"] body.route-evidence .v13-ledger-table-wrap {
  border-top: 1px solid rgba(16, 22, 29, .2);
}

html[data-theme="dark"] body.route-evidence #validation-queue .v13-ledger-card {
  border-left: 4px solid var(--sf-accent);
}

html[data-theme="dark"] body.route-evidence .v13-cta-wrap .v13-cta {
  box-shadow: 9px 9px 0 var(--sf-accent);
}

/* Pilot request */

body.route-feedback .ref-page-hero {
  padding-top: clamp(84px, 8vw, 130px);
  padding-bottom: clamp(76px, 7vw, 116px);
}

body.route-feedback .ref-dashboard {
  transform: rotate(.14deg);
}

html[data-theme="dark"] body.route-feedback .ref-dashboard {
  border: 1px solid var(--sf-ink);
  box-shadow: 12px 12px 0 var(--sf-rust), 0 28px 54px rgba(16, 22, 29, .15);
}

body.route-feedback #feedback .ref-contact-layout {
  align-items: start;
}

body.route-feedback #feedback form.ref-panel {
  position: relative;
  overflow: hidden;
}

html[data-theme="dark"] body.route-feedback #feedback form.ref-panel {
  border: 1px solid var(--sf-ink);
  background:
    linear-gradient(90deg, rgba(168, 77, 53, .12) 0 1px, transparent 1px) 34px 0 / calc(100% - 34px) 100% no-repeat,
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(16, 22, 29, .035) 31px 32px),
    var(--sf-paper-bright);
  box-shadow: 10px 10px 0 var(--sf-accent-soft), 0 24px 44px rgba(16, 22, 29, .11);
}

body.route-feedback #feedback form.ref-panel::before {
  content: "PILOT INTAKE / PRIVATE UNTIL YOU CHOOSE OTHERWISE";
  display: block;
  margin: -1px -1px 26px;
  padding: 10px 18px;
  font-family: var(--sf-mono);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .08em;
}

html[data-theme="dark"] body.route-feedback #feedback form.ref-panel::before {
  color: var(--sf-white);
  background: var(--sf-ink);
}

body.route-feedback #feedback > .ref-container > aside {
  position: sticky;
  top: calc(var(--sf-header-height) + 28px);
}

html[data-theme="dark"] body.route-feedback #feedback aside .ref-panel {
  border: 1px solid var(--sf-ink);
  box-shadow: 7px 7px 0 var(--sf-rust);
}

body.route-feedback #feedback aside .ref-panel span[style*="width:74px"] {
  border-width: 1px;
  border-style: solid;
  border-color: transparent;
  border-radius: 8px !important;
}

html[data-theme="dark"] body.route-feedback #feedback aside .ref-panel span[style*="width:74px"] {
  border-color: var(--sf-ink);
  background: var(--sf-ink) !important;
  box-shadow: 0 4px 0 var(--sf-rust);
}

html[data-theme="dark"] body.route-feedback .ref-help-card {
  border: 1px solid rgba(16, 22, 29, .24);
  background: var(--sf-paper-bright);
  box-shadow: 0 3px 0 rgba(16, 22, 29, .55);
}

html[data-theme="dark"] body.route-feedback #faq details {
  background: var(--sf-paper-bright);
}

html[data-theme="dark"] body.route-feedback #faq details[open] {
  border-color: var(--sf-accent);
  box-shadow: 0 3px 0 var(--sf-accent);
}

/* Dealer quote validation */

body.route-dealer-validation .v13-page-hero {
  padding-top: clamp(88px, 8vw, 134px);
  padding-bottom: clamp(78px, 7vw, 116px);
}

body.route-dealer-validation .v13-quote-preview {
  transform: rotate(.16deg);
}

html[data-theme="dark"] body.route-dealer-validation .v13-quote-preview {
  border: 1px solid var(--sf-ink);
  box-shadow: 10px 10px 0 var(--sf-accent), 0 26px 46px rgba(16, 22, 29, .15);
}

body.route-dealer-validation .v13-evidence__grid {
  overflow: hidden;
  border-radius: 8px;
}

html[data-theme="dark"] body.route-dealer-validation .v13-evidence__grid {
  border: 1px solid var(--sf-ink);
  background: var(--sf-paper-bright);
  box-shadow: 8px 8px 0 var(--sf-accent-soft);
}

html[data-theme="dark"] body.route-dealer-validation .v13-proof-box,
html[data-theme="dark"] body.route-dealer-validation .v13-process-card {
  border: 1px solid rgba(16, 22, 29, .28);
  background: var(--sf-paper-bright);
  box-shadow: 0 4px 0 rgba(16, 22, 29, .66);
}

html[data-theme="dark"] body.route-dealer-validation .secure-handoff {
  border-top: 1px solid var(--sf-ink);
  border-bottom: 1px solid var(--sf-ink);
}

html[data-theme="dark"] body.route-dealer-validation .secure-handoff__panel {
  box-shadow: 10px 10px 0 var(--sf-accent);
}

body.route-dealer-validation #quote-intake form {
  position: relative;
  overflow: hidden;
}

html[data-theme="dark"] body.route-dealer-validation #quote-intake form {
  border: 1px solid var(--sf-ink);
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(16, 22, 29, .035) 31px 32px),
    var(--sf-paper-bright);
  box-shadow: 10px 10px 0 var(--sf-accent-soft), 0 24px 44px rgba(16, 22, 29, .11);
}

html[data-theme="dark"] body.route-dealer-validation #quote-intake .v13-validation-fieldset {
  border-color: rgba(16, 22, 29, .23);
  background: rgba(255, 253, 248, .72);
}

/* Source desk */

body.route-source-search .ref-page-hero {
  padding-top: clamp(78px, 7vw, 116px);
  padding-bottom: clamp(64px, 6vw, 96px);
}

body.route-source-search .ref-source-flow {
  border-radius: 8px;
}

html[data-theme="dark"] body.route-source-search .ref-source-flow {
  border: 1px solid rgba(16, 22, 29, .2);
  background: var(--sf-paper-bright);
  box-shadow: 0 4px 0 rgba(16, 22, 29, .65);
}

body.route-source-search .ref-source-workspace {
  align-items: start;
}

html[data-theme="dark"] body.route-source-search .ref-source-paste,
html[data-theme="dark"] body.route-source-search .ref-source-builder {
  border: 1px solid var(--sf-ink);
  box-shadow: 9px 9px 0 var(--sf-accent-soft), 0 20px 38px rgba(16, 22, 29, .1);
}

body.route-source-search .ref-source-right {
  position: sticky;
  top: calc(var(--sf-header-height) + 24px);
}

html[data-theme="dark"] body.route-source-search .source-query-item,
html[data-theme="dark"] body.route-source-search .ref-source-query-item {
  border-color: rgba(16, 22, 29, .24);
  background: var(--sf-paper-bright);
}

html[data-theme="dark"] body.route-source-search .source-query-item:focus-within,
html[data-theme="dark"] body.route-source-search .ref-source-query-item:focus-within {
  border-color: var(--sf-accent);
  box-shadow: 0 0 0 3px var(--sf-accent-soft);
}

/* Login */

body.route-login {
  min-height: 100vh;
}

html[data-theme="dark"] body.route-login {
  color: var(--sf-white);
  background:
    radial-gradient(circle at 20% 20%, rgba(36, 89, 168, .22), transparent 24rem),
    radial-gradient(circle at 80% 76%, rgba(168, 77, 53, .15), transparent 22rem),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    #0c131c;
  background-size: auto, auto, 30px 30px, 30px 30px, auto;
}

body.route-login::before {
  content: "PRIVATE REVIEW RUNTIME / OPERATOR ACCESS";
  position: fixed;
  top: 22px;
  left: 24px;
  font-family: var(--sf-mono);
  font-size: .57rem;
  font-weight: 800;
  letter-spacing: .1em;
  pointer-events: none;
}

html[data-theme="dark"] body.route-login::before {
  color: rgba(255, 255, 255, .48);
}

body.route-login .v13-login-shell {
  min-height: 100vh;
  padding: clamp(48px, 8vw, 92px) 18px;
}

body.route-login .v13-login-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

html[data-theme="dark"] body.route-login .v13-login-card {
  border: 1px solid var(--sf-ink);
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(16, 22, 29, .035) 31px 32px),
    var(--sf-paper-bright);
  box-shadow: 12px 12px 0 var(--sf-accent), 0 32px 68px rgba(0, 0, 0, .42);
}

body.route-login .v13-login-card::before {
  content: "ACCESS PLATE / AUTHENTICATED WORKSPACE";
  display: block;
  margin: -1px -1px 24px;
  padding: 10px 18px;
  font-family: var(--sf-mono);
  font-size: .56rem;
  font-weight: 900;
  letter-spacing: .08em;
}

html[data-theme="dark"] body.route-login .v13-login-card::before {
  color: var(--sf-white);
  background: var(--sf-ink);
}

html[data-theme="dark"] body.route-login .v13-login-card .v13-brand {
  color: var(--sf-ink);
}

html[data-theme="dark"] body.route-login .v13-runtime-boundary {
  border-color: rgba(46, 115, 87, .42);
  box-shadow: 0 3px 0 rgba(46, 115, 87, .2);
}

html[data-theme="dark"] body.route-login .client-btn--primary {
  box-shadow: var(--sf-shadow-key);
}

body.route-login .v13-login-copyright {
  font-family: var(--sf-mono);
  font-size: .55rem;
}

html[data-theme="dark"] body.route-login .v13-login-copyright {
  color: #5f6870;
}

/* Legal */

html[data-theme="dark"] body.route-privacy,
html[data-theme="dark"] body.route-terms {
  background:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px),
    #111821;
  background-size: 32px 32px, 32px 32px, auto;
}

body.route-privacy .v13-legal-shell,
body.route-terms .v13-legal-shell {
  padding-top: clamp(68px, 8vw, 118px);
  padding-bottom: clamp(72px, 8vw, 122px);
}

body.route-privacy .v13-legal-panel,
body.route-terms .v13-legal-panel {
  position: relative;
  overflow: hidden;
  border-radius: 7px;
}

html[data-theme="dark"] body.route-privacy .v13-legal-panel,
html[data-theme="dark"] body.route-terms .v13-legal-panel {
  border: 1px solid var(--sf-ink);
  background:
    linear-gradient(90deg, rgba(168, 77, 53, .16) 0 1px, transparent 1px) 42px 0 / calc(100% - 42px) 100% no-repeat,
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(16, 22, 29, .04) 31px 32px),
    var(--sf-paper-bright);
  box-shadow: 13px 13px 0 var(--sf-accent), 0 30px 62px rgba(0, 0, 0, .28);
}

body.route-privacy .v13-legal-panel::after,
body.route-terms .v13-legal-panel::after {
  content: "CONTROLLED PILOT RECORD";
  position: absolute;
  top: 24px;
  right: -48px;
  padding: 7px 56px;
  font-family: var(--sf-mono);
  font-size: .5rem;
  font-weight: 900;
  letter-spacing: .08em;
  transform: rotate(35deg);
}

html[data-theme="dark"] body.route-privacy .v13-legal-panel::after,
html[data-theme="dark"] body.route-terms .v13-legal-panel::after {
  color: rgba(16, 22, 29, .52);
  border-top: 1px solid rgba(16, 22, 29, .24);
  border-bottom: 1px solid rgba(16, 22, 29, .24);
  background: rgba(231, 224, 210, .7);
}

body.route-privacy .v13-legal-panel h2,
body.route-terms .v13-legal-panel h2 {
  margin-top: 34px;
  padding-top: 22px;
}

html[data-theme="dark"] body.route-privacy .v13-legal-panel h2,
html[data-theme="dark"] body.route-terms .v13-legal-panel h2 {
  border-top: 1px solid rgba(16, 22, 29, .16);
}

html[data-theme="dark"] body.route-privacy .v13-legal-note,
html[data-theme="dark"] body.route-terms .v13-legal-note {
  border: 1px solid var(--sf-accent-deep);
  box-shadow: 0 4px 0 var(--sf-accent-soft);
}

html[data-theme="dark"] body.route-privacy .v13-footer,
html[data-theme="dark"] body.route-terms .v13-footer {
  border-top-color: rgba(255, 255, 255, .16);
}

/* Review desk */

html[data-theme="dark"] body.route-portal .client-portal-hero {
  box-shadow: inset 0 -1px 0 rgba(16, 22, 29, .2);
}

body.route-portal .ref-review-metrics {
  overflow: hidden;
  border-radius: 8px;
}

html[data-theme="dark"] body.route-portal .ref-review-metrics {
  border: 1px solid var(--sf-ink);
  box-shadow: 8px 8px 0 var(--sf-accent-soft);
}

html[data-theme="dark"] body.route-portal .client-decision-strip {
  box-shadow: 8px 8px 0 var(--sf-accent);
}

body.route-portal .review-tabs {
  position: sticky;
  z-index: 10;
  top: calc(var(--sf-header-height) + 8px);
  backdrop-filter: blur(12px);
}

html[data-theme="dark"] body.route-portal .review-tabs {
  background: rgba(231, 224, 210, .94);
}

html[data-theme="dark"] body.route-portal .client-panel {
  border: 1px solid rgba(16, 22, 29, .25);
  background: var(--sf-paper-bright);
}

html[data-theme="dark"] body.route-portal .client-section--paper {
  border-top: 1px solid var(--sf-ink);
  border-bottom: 1px solid var(--sf-ink);
}

/* Authority map, case builder, and simulation lab */

body.route-authority-map .authority-hero,
body.route-simulation-lab .simulation-hero,
body.route-case-study .case-hero {
  padding-top: clamp(88px, 8vw, 136px);
  padding-bottom: clamp(80px, 8vw, 122px);
}

html[data-theme="dark"] body.route-case-study .case-hero-packet {
  border: 1px solid rgba(255, 255, 255, .26);
  box-shadow: 10px 10px 0 var(--sf-accent), 0 28px 54px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] body.route-simulation-lab .simulation-scoreboard {
  border: 1px solid rgba(255, 255, 255, .26);
  box-shadow: 10px 10px 0 var(--sf-accent), 0 28px 54px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] body.route-authority-map .authority-chain {
  border: 1px solid rgba(255, 255, 255, .26);
  box-shadow: 10px 10px 0 var(--sf-accent), 0 28px 54px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] body.route-authority-map .authority-map-card {
  box-shadow: 0 4px 0 rgba(16, 22, 29, .7);
}

html[data-theme="dark"] body.route-authority-map .authority-canvas {
  border: 1px solid var(--sf-ink);
  background: var(--sf-paper-bright);
}

body.route-simulation-lab .simulation-scoreboard {
  transform: rotate(.12deg);
}

html[data-theme="dark"] body.route-simulation-lab .simulation-packet-grid > article {
  border: 1px solid rgba(16, 22, 29, .25);
  box-shadow: 0 4px 0 rgba(16, 22, 29, .65);
}

body.route-simulation-lab .simulation-detail {
  position: sticky;
  top: calc(var(--sf-header-height) + 24px);
}

html[data-theme="dark"] body.route-case-study .case-hero-packet {
  border-color: rgba(16, 22, 29, .72);
}

html[data-theme="dark"] body.route-case-study .featured-proof-board,
html[data-theme="dark"] body.route-case-study .proof-path-board,
html[data-theme="dark"] body.route-case-study .case-form-panel,
html[data-theme="dark"] body.route-case-study .case-output-panel {
  border: 1px solid var(--sf-ink);
  box-shadow: 8px 8px 0 var(--sf-accent-soft), 0 20px 38px rgba(16, 22, 29, .1);
}

html[data-theme="dark"] body.route-case-study .packet-gates-section article {
  border: 1px solid rgba(16, 22, 29, .24);
  box-shadow: 0 3px 0 rgba(16, 22, 29, .58);
}

html[data-theme="dark"] body.route-case-study .footer {
  color: rgba(255, 255, 255, .78);
  background: #0b1d35;
}

html[data-theme="dark"] body.route-case-study .footer a {
  color: var(--sf-white);
}

/* Presentation receives only the universal finish line and ownership plate */

.avlu-site-presentation-credit {
  position: fixed;
  z-index: 92;
  right: 16px;
  bottom: 12px;
  padding: 5px 8px;
  color: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 4px;
  background: rgba(7, 13, 21, .74);
  font-family: var(--sf-mono);
  font-size: .5rem;
  letter-spacing: .035em;
  backdrop-filter: blur(8px);
}

/* Responsive */

@media (max-width: 1380px) {
  .avlu-section-index {
    display: none;
  }
}

@media (max-width: 1279px) {
  .avlu-section-nav,
  body.has-site-section-nav .avlu-section-nav {
    display: none;
  }

  .avlu-route-plate {
    right: 18px;
  }
}

@media (max-width: 900px) {
  body.has-site-section-nav .avlu-section-nav {
    display: none !important;
  }
}

@media (max-width: 960px) {
  body.route-for-dealers main > section:nth-of-type(5) .ref-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.route-feedback #feedback > .ref-container > aside,
  body.route-source-search .ref-source-right,
  body.route-simulation-lab .simulation-detail {
    position: static;
  }

  body.route-evidence .v13-evidence-toolbar,
  body.route-portal .review-tabs {
    position: relative;
    top: auto;
  }
}

@media (max-width: 820px) {
  :root {
    --sf-header-height: 66px;
  }

  body.avlu-site-finish:not(.route-index):not(.route-client-review):not(.route-presentation) main > :first-child::after {
    width: 70vw;
    opacity: .48;
  }

  .avlu-route-plate {
    display: none;
  }

  .avlu-back-top {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    grid-template-columns: 26px;
    width: 40px;
    padding: 0 6px;
  }

  .avlu-back-top > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  body.avlu-site-finish .v13-footer__grid > div:not(:first-child) {
    padding-left: 0;
  }

  body.route-about .about-proof-map,
  body.route-how-it-works .ref-dashboard,
  body.route-for-dealers .ref-dashboard,
  body.route-feedback .ref-dashboard,
  body.route-dealer-validation .v13-quote-preview,
  body.route-simulation-lab .simulation-scoreboard {
    transform: none;
  }

  body.route-how-it-works #workflow .ref-card-grid::before {
    display: none;
  }

  html[data-theme="dark"] body.route-how-it-works main > section:nth-of-type(3) .ref-card {
    box-shadow: 0 3px 0 var(--sf-accent);
  }

  body.route-about .about-evidence-strip > div + div {
    border-left: 0;
  }

  html[data-theme="dark"] body.route-about .about-evidence-strip > div + div {
    border-top: 1px solid rgba(255, 255, 255, .14);
  }

  body.route-evidence .v13-ledger-table-wrap {
    max-height: 66vh;
  }
}

@media (max-width: 620px) {
  body.avlu-site-finish:not(.route-index):not(.route-client-review):not(.route-presentation) :is(.ref-section, .v13-section, .simulation-section, .authority-section, .client-section, .section-tight) {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  body.route-for-dealers main > section:nth-of-type(5) .ref-card-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.route-feedback #feedback form.ref-panel::before,
  body.route-login .v13-login-card::before {
    font-size: .5rem;
    line-height: 1.35;
  }

  body.route-privacy .v13-legal-panel::after,
  body.route-terms .v13-legal-panel::after {
    display: none;
  }

  html[data-theme="dark"] body.route-privacy .v13-legal-panel,
  html[data-theme="dark"] body.route-terms .v13-legal-panel {
    box-shadow: 7px 7px 0 var(--sf-accent), 0 18px 38px rgba(0, 0, 0, .25);
  }

  .avlu-site-presentation-credit {
    right: 8px;
    bottom: 8px;
    max-width: calc(100vw - 16px);
  }
}

@media (max-width: 600px) {
  body.route-presentation {
    padding-bottom: 14px;
  }

  body.route-presentation .avlu-site-presentation-credit {
    position: relative;
    right: auto;
    bottom: auto;
    z-index: auto;
    display: block;
    box-sizing: border-box;
    width: fit-content;
    max-width: calc(100% - 28px);
    margin: 16px 14px 0 auto;
  }
}

/* Dark mode */

html[data-theme="dark"] body.avlu-site-finish {
  --sf-paper: #0f1925;
  --sf-paper-bright: #142131;
  --sf-paper-deep: #0b1520;
  --sf-ink: #edf3fb;
  --sf-ink-soft: #c6d1dc;
  --sf-rule: rgba(237, 243, 251, .2);
  --sf-white: #f8fbff;
}

html[data-theme="dark"] body.avlu-site-finish .avlu-route-plate,
html[data-theme="dark"] body.avlu-site-finish .avlu-section-nav {
  color: #edf3fb;
  border-color: rgba(237, 243, 251, .28);
  background: rgba(12, 23, 35, .92);
}

html[data-theme="dark"] body.avlu-site-finish .avlu-route-plate__copy strong {
  color: #edf3fb;
}

html[data-theme="dark"] body.avlu-site-finish .avlu-route-plate__copy small {
  color: #9caebe;
}

html[data-theme="dark"] body.avlu-site-finish :is(.ref-field, .client-field) > :is(input, select, textarea) {
  background-color: #142131;
}

html[data-theme="dark"] body.route-about .about-evidence-strip,
html[data-theme="dark"] body.route-how-it-works main > section:nth-of-type(3) {
  background-color: #08111b;
}

html[data-theme="dark"] body.route-login .v13-login-card,
html[data-theme="dark"] body.route-privacy .v13-legal-panel,
html[data-theme="dark"] body.route-terms .v13-legal-panel {
  color: #11171d;
  background-color: #f7f1e6;
}

html[data-theme="dark"] body.route-login .v13-login-card :is(h1, h2, h3, p, label, span, a),
html[data-theme="dark"] body.route-privacy .v13-legal-panel :is(h1, h2, h3, p, li, a, span),
html[data-theme="dark"] body.route-terms .v13-legal-panel :is(h1, h2, h3, p, li, a, span) {
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  .avlu-site-progress > span,
  .avlu-section-nav a,
  .avlu-section-nav a::before,
  .avlu-back-top,
  body.site-finish-motion .avlu-site-reveal,
  body.avlu-site-finish :is(.v13-header, .presentation-toolbar),
  body.avlu-site-finish:not(.route-index) :is(
    .ref-card,
    .ref-step-card,
    .ref-help-card,
    .ref-benefit,
    .v13-process-card,
    .v13-evidence__item,
    .about-principles article,
    .about-boundary-card,
    .dealer-difference-card,
    .case-walkthrough,
    .authority-map-card,
    .simulation-boundary-card,
    .client-panel,
    .client-strip-card,
    .secure-handoff__check,
    .secure-handoff__stage
  ) {
    transition: none !important;
  }

  body.site-finish-motion .avlu-site-reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .avlu-site-progress,
  .avlu-route-plate,
  .avlu-section-nav,
  .avlu-section-index,
  .avlu-back-top,
  .avlu-site-presentation-credit {
    display: none !important;
  }
}

/*
  AV LÜ™ v2.4.3 dark-route header scroll correction.
  Keep the existing dark header treatment when Site Finish marks the page
  scrolled; mobile navigation remains controlled by the base route styles.
*/
html[data-theme="dark"] body.avlu-site-finish.site-has-scrolled:not(.route-presentation) .v13-header {
  border-bottom-color: rgba(125, 166, 232, .22) !important;
  background: rgba(3, 10, 23, .92) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28) !important;
}

/*
  AV LÜ™ v2.4.3 dark-route mobile navigation correction.
  Keep the existing desktop navigation and menu behavior; this only replaces
  the light base panel treatment at the mobile breakpoint.
*/
@media (max-width: 1040px) {
  html[data-theme="dark"] body.avlu-site-finish:not(.route-presentation) .v13-nav {
    border-color: rgba(125, 166, 232, .32) !important;
    background: #061326 !important;
    box-shadow: 0 18px 38px rgba(0, 0, 0, .38) !important;
  }

  html[data-theme="dark"] body.avlu-site-finish:not(.route-presentation) .v13-nav a {
    color: #dfeaff !important;
    background: transparent !important;
  }

  html[data-theme="dark"] body.avlu-site-finish:not(.route-presentation) .v13-nav a:hover,
  html[data-theme="dark"] body.avlu-site-finish:not(.route-presentation) .v13-nav a:focus-visible,
  html[data-theme="dark"] body.avlu-site-finish:not(.route-presentation) .v13-nav a:active {
    color: #fff !important;
    background: rgba(47, 131, 255, .18) !important;
  }

  html[data-theme="dark"] body.avlu-site-finish:not(.route-presentation) .v13-nav a[aria-current="page"],
  html[data-theme="dark"] body.avlu-site-finish:not(.route-presentation) .v13-nav a.is-current {
    color: #fff !important;
    background: rgba(47, 131, 255, .28) !important;
    box-shadow: inset 3px 0 0 #6ea7ff !important;
  }

  html[data-theme="dark"] body.avlu-site-finish:not(.route-presentation) .v13-menu {
    color: #edf3ff !important;
    border-color: rgba(125, 166, 232, .5) !important;
    background: rgba(7, 23, 47, .86) !important;
  }

  html[data-theme="dark"] body.avlu-site-finish:not(.route-presentation) .v13-menu:hover,
  html[data-theme="dark"] body.avlu-site-finish:not(.route-presentation) .v13-menu:focus-visible,
  html[data-theme="dark"] body.avlu-site-finish:not(.route-presentation) .v13-menu:active,
  html[data-theme="dark"] body.avlu-site-finish:not(.route-presentation) .v13-menu[aria-expanded="true"] {
    color: #fff !important;
    border-color: #6ea7ff !important;
    background: rgba(47, 131, 255, .28) !important;
  }
}
