/* A2V microsite layer — additive only, loaded after site.css on /a2v/ pages.
   Consumes the design tokens defined in site.css (:root). Spec:
   a2v/specs/microsite/07-ux-and-visual-spec.md. */

:root {
  --a2v-amber: #8A5A00;      /* blocked / leak state — ≥4.5:1 on white */
  --a2v-amber-soft: #FBF3E4;
  --a2v-green: #1B7A3D;      /* healthy state — ≥4.5:1 on white */
  /* Body slate (--slate #64748b) is 4.39:1 on the mist background — just
     under AA. This darker slate clears 4.5:1 on mist; used for a2v text
     that sits on --mist (sub-nav, callouts, ownership strip). */
  --a2v-slate-on-mist: #525C6B;
}

/* Visible focus for all interactive elements on a2v pages (site.css
   suppresses outlines on form fields; a2v restores a clear indicator). */
.a2v-page a:focus-visible,
.a2v-page button:focus-visible,
.a2v-page input:focus-visible,
.a2v-page select:focus-visible,
.a2v-page textarea:focus-visible,
.a2v-page summary:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.a2v-skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy); color: var(--white);
  padding: 10px 18px; font-size: 13px; text-decoration: none;
}
.a2v-skip-link:focus { left: 0; }

/* ---- Sub-navigation -------------------------------------------------- */

.a2v-subnav {
  position: sticky; top: 70px; z-index: 90;
  background: var(--mist);
  border-bottom: 1px solid var(--line);
}
.a2v-subnav-inner {
  max-width: 980px; margin: 0 auto; padding: 0 2.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 48px;
}
.a2v-subnav-brand {
  font-size: 12px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--navy); text-decoration: none;
  white-space: nowrap;
}
.a2v-subnav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  font-family: var(--body); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--navy);
  padding: 7px 14px; cursor: pointer;
}
.a2v-subnav-links {
  display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0;
}
.a2v-subnav-links a {
  font-size: 13px; font-weight: 500; color: var(--a2v-slate-on-mist);
  text-decoration: none; transition: color .15s;
  display: inline-block; padding: 13px 0;
}
.a2v-subnav-links a:hover { color: var(--navy); }
.a2v-subnav-links a[aria-current="page"] {
  color: var(--navy); box-shadow: inset 0 -2px 0 var(--navy);
}

@media (max-width: 768px) {
  /* The generic `nav` rule (site.css) pins every <nav> — including
     .a2v-subnav — to a fixed 70px flex box, which stops the open mobile menu
     from growing the bar, so it overflowed onto the hero. Release that fixed
     height/flex on mobile and lay the bar out ourselves as a normal block, so
     the open menu grows the bar in ordinary flow and pushes the hero down —
     no absolute positioning, containing-block, z-index or stacking to depend
     on (robust across mobile browsers). */
  .a2v-subnav { height: auto; display: block; top: 70px; }
  .a2v-subnav-inner {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; min-height: 48px; padding: 6px 1.25rem;
  }
  .a2v-subnav-toggle { display: inline-block; }
  .a2v-subnav-links {
    display: none; flex-direction: column; gap: 0;
    width: 100%; padding: 4px 0 10px;
  }
  .a2v-subnav-links.is-open { display: flex; }
  .a2v-subnav-links li { width: 100%; }
  .a2v-subnav-links a { display: block; padding: 12px 0; font-size: 14px; }
}

/* ---- Hero variant ---------------------------------------------------- */

.a2v-hero { padding: 88px 2.5rem 64px; max-width: 980px; margin: 0 auto; }
.a2v-hero .hero-eyebrow { margin-bottom: 24px; }

/* ---- Generic building blocks ---------------------------------------- */

.a2v-lede {
  font-size: 1.0625rem; line-height: 1.75; color: var(--slate);
  max-width: 680px; font-weight: 300;
}

.a2v-callout {
  border: 1px solid var(--line); border-left: 3px solid var(--navy);
  background: var(--mist); padding: 18px 22px; max-width: 680px;
  font-size: .875rem; color: var(--a2v-slate-on-mist); line-height: 1.7; font-weight: 400;
  margin-top: 28px;
}
.a2v-callout strong { color: var(--navy-w); font-weight: 600; }

.a2v-cta-band {
  background: var(--navy); padding: 56px 2.5rem;
}
.a2v-cta-band-inner {
  max-width: 980px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.a2v-cta-band h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem); font-weight: 600;
  color: var(--white); line-height: 1.3; max-width: 560px;
}
.a2v-cta-band .btn-primary {
  background: var(--white); color: var(--navy);
}
.a2v-cta-band .btn-primary:hover { background: var(--slate-l); }

/* Two-column buys / does-not-buy */
.a2v-two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5px;
  background: var(--line); border: 1.5px solid var(--line); margin-top: 40px;
}
.a2v-two-col > div { background: var(--white); padding: 32px; }
.a2v-two-col h3 {
  font-size: .8125rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--navy); margin-bottom: 18px;
}
.a2v-two-col ul { list-style: none; margin: 0; padding: 0; }
.a2v-two-col li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: .9rem; color: var(--slate); line-height: 1.65;
  font-weight: 300; margin-bottom: 12px;
}
.a2v-two-col li::before {
  content: ''; display: block; flex-shrink: 0;
  width: 14px; height: 1.5px; margin-top: 11px; background: var(--navy);
  opacity: .5;
}
.a2v-two-col .a2v-not li::before { background: var(--a2v-amber); opacity: .7; }

/* Numbered step list (how it works) */
.a2v-steps { counter-reset: a2vstep; margin-top: 40px; display: grid; gap: 0; }
.a2v-step-row {
  display: grid; grid-template-columns: 56px 1fr; gap: 20px;
  padding: 24px 0; border-top: 1px solid var(--line);
}
.a2v-step-row::before {
  counter-increment: a2vstep; content: counter(a2vstep, decimal-leading-zero);
  font-family: var(--display); font-style: italic; font-size: 1.5rem;
  color: var(--slate-l); font-weight: 700; line-height: 1.1;
}
.a2v-step-row h3 {
  font-size: 1rem; font-weight: 600; color: var(--navy); margin-bottom: 6px;
}
.a2v-step-row p {
  font-size: .9rem; color: var(--slate); line-height: 1.7; font-weight: 300;
  max-width: 620px;
}

/* Adoption-to-value chain */
.a2v-chain {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-top: 36px;
}
.a2v-chain-node {
  border: 1.5px solid var(--line); background: var(--white);
  padding: 10px 16px; font-size: .8125rem; font-weight: 500;
  color: var(--navy); white-space: nowrap;
}
.a2v-chain-arrow { color: var(--slate-l); font-size: 15px; }

/* Flow list (method page) */
.a2v-flow-list { margin-top: 36px; border-top: 1px solid var(--line); }
.a2v-flow-item { border-bottom: 1px solid var(--line); }
.a2v-flow-item summary {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 16px;
  align-items: baseline; padding: 18px 4px; cursor: pointer;
  list-style: none;
}
.a2v-flow-item summary::-webkit-details-marker { display: none; }
.a2v-flow-id {
  font-size: .8125rem; font-weight: 600; color: var(--slate); letter-spacing: .05em;
}
.a2v-flow-name { font-size: .9375rem; font-weight: 600; color: var(--navy); }
.a2v-flow-range {
  font-size: .78rem; color: var(--slate); font-weight: 300; font-style: italic;
  text-align: right;
}
.a2v-flow-body { padding: 0 4px 20px 60px; max-width: 660px; }
.a2v-flow-body p {
  font-size: .875rem; color: var(--slate); line-height: 1.7; font-weight: 300;
  margin-bottom: 10px;
}
.a2v-signal { display: flex; gap: 10px; align-items: flex-start; font-size: .8125rem; line-height: 1.6; margin-bottom: 6px; }
.a2v-signal-label {
  flex-shrink: 0; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  font-size: 10.5px; padding: 2px 8px; margin-top: 2px;
}
.a2v-signal-healthy .a2v-signal-label { color: var(--a2v-green); border: 1px solid var(--a2v-green); }
.a2v-signal-blocked .a2v-signal-label { color: var(--a2v-amber); border: 1px solid var(--a2v-amber); }
.a2v-signal p { margin: 0; color: var(--slate); font-weight: 300; }

/* Principles grid */
.a2v-principles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 40px;
}
.a2v-principle { background: var(--white); padding: 24px 22px; }
.a2v-principle h3 {
  font-size: .875rem; font-weight: 600; color: var(--navy); margin-bottom: 8px;
}
.a2v-principle p {
  font-size: .8125rem; color: var(--slate); line-height: 1.65; font-weight: 300;
}

/* Theatre grid */
.a2v-theatres {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 40px;
}
.a2v-theatre { background: var(--white); padding: 22px; }
.a2v-theatre h3 {
  font-size: .875rem; font-weight: 600; color: var(--a2v-amber); margin-bottom: 7px;
}
.a2v-theatre p {
  font-size: .8125rem; color: var(--slate); line-height: 1.6; font-weight: 300;
}

/* So-What Chain (conceptual) */
.a2v-sowhat { display: grid; gap: 0; margin-top: 36px; max-width: 680px; }
.a2v-sowhat-step {
  display: grid; grid-template-columns: 24px 1fr; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--line); align-items: baseline;
}
.a2v-sowhat-step::before {
  content: '↓'; color: var(--slate-l); font-size: 15px;
}
.a2v-sowhat-step:first-child::before { content: '·'; }
.a2v-sowhat-step h3 { font-size: .9rem; font-weight: 600; color: var(--navy); display: inline; }
.a2v-sowhat-step p { font-size: .85rem; color: var(--slate); font-weight: 300; line-height: 1.65; margin-top: 4px; }

/* Ownership strip */
.a2v-ownership {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5px;
  background: var(--line); border: 1.5px solid var(--line); margin-top: 36px;
  max-width: 760px;
}
.a2v-ownership > div { background: var(--mist); padding: 24px 26px; }
.a2v-ownership h3 {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--navy); margin-bottom: 12px;
}
.a2v-ownership p { font-size: .85rem; color: var(--a2v-slate-on-mist); line-height: 1.75; font-weight: 400; }

/* Journey cards (landing → demo/readiness, pre-wired states) */
.a2v-journey {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5px; background: var(--line); border: 1.5px solid var(--line); margin-top: 40px;
}
.a2v-journey-card { background: var(--white); padding: 30px 28px; }
.a2v-journey-card h3 { font-size: .9375rem; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.a2v-journey-card p { font-size: .85rem; color: var(--slate); line-height: 1.7; font-weight: 300; margin-bottom: 14px; }
.a2v-soon {
  display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--slate); border: 1px solid var(--slate-l);
  padding: 3px 10px;
}
.a2v-journey-card a { font-size: .85rem; font-weight: 500; color: var(--navy); text-decoration: none; }
.a2v-journey-card a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .a2v-hero { padding: 56px 1.25rem 44px; }
  .a2v-cta-band { padding: 44px 1.25rem; }
  .a2v-two-col { grid-template-columns: 1fr; }
  .a2v-ownership { grid-template-columns: 1fr; }
  .a2v-flow-item summary { grid-template-columns: 36px 1fr; }
  .a2v-flow-range { display: none; }
  .a2v-flow-body { padding-left: 40px; }
}

/* ---- Utilities ------------------------------------------------------- */

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---- Guided demo ----------------------------------------------------- */

.a2v-demo { margin-top: 36px; }

.a2v-demo-progressbar {
  height: 3px; background: var(--line); margin-bottom: 10px; overflow: hidden;
}
.a2v-demo.is-enhanced .a2v-demo-bar {
  display: block; height: 100%; width: 10%; background: var(--navy);
  transition: width .25s ease;
}
.a2v-demo-bar { display: none; }
.a2v-demo-progress {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--a2v-slate-on-mist); margin-bottom: 24px;
}

/* Without JS every stage is visible as a linear narrative; the enhanced
   walkthrough shows one at a time. */
.a2v-demo-stage {
  padding: 24px 0; border-top: 1px solid var(--line);
}
.a2v-demo.is-enhanced .a2v-demo-stage {
  border-top: none; padding: 4px 0 8px;
}
.a2v-demo-stage-h {
  font-family: var(--display); font-style: italic; font-size: 1.4rem;
  color: var(--navy); font-weight: 700; margin-bottom: 14px; outline: none;
}
.a2v-demo-stage p {
  font-size: .95rem; color: var(--slate); line-height: 1.75; font-weight: 300;
  max-width: 660px; margin-bottom: 12px;
}
.a2v-demo-stage strong { color: var(--navy-w); font-weight: 600; }
.a2v-demo-aside {
  font-size: .875rem !important; color: var(--navy-w) !important;
  font-style: italic; border-left: 2px solid var(--slate-l); padding-left: 16px;
}
.a2v-demo-list { list-style: none; margin: 8px 0 12px; padding: 0; max-width: 660px; }
.a2v-demo-list li {
  font-size: .9rem; color: var(--slate); line-height: 1.7; font-weight: 300;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}

/* Choices */
.a2v-choice {
  border: 1.5px solid var(--line); padding: 20px 22px; margin: 8px 0 6px;
  max-width: 660px; display: grid; gap: 10px;
}
.a2v-choice legend {
  font-size: .8125rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--navy); padding: 0 6px;
}
.a2v-choice-opt {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: .9rem; color: var(--ink); line-height: 1.6; font-weight: 300;
  cursor: pointer; padding: 8px 10px; border: 1px solid transparent;
}
.a2v-choice-opt:hover { background: var(--white); border-color: var(--line); }
.a2v-choice-opt input { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--navy); }

.a2v-demo-feedback {
  background: var(--white); border: 1px solid var(--line);
  border-left: 3px solid var(--navy); padding: 14px 18px; max-width: 660px;
  margin-top: 4px;
}
.a2v-demo-feedback p { margin: 0; font-size: .875rem; color: var(--slate); line-height: 1.7; font-weight: 300; }

/* Evidence cards */
.a2v-evidence-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin: 18px 0 12px;
}
.a2v-evidence-card { background: var(--white); border: 1.5px solid var(--line); padding: 18px; }
.a2v-evidence-card p { font-size: .85rem; color: var(--slate); line-height: 1.65; font-weight: 300; margin: 0; }
.a2v-evidence-card em { color: var(--navy-w); font-style: italic; }
.a2v-ev-src {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; padding: 3px 9px; margin-bottom: 10px;
}
.a2v-ev-say { color: var(--navy); border: 1px solid var(--navy); }
.a2v-ev-record { color: var(--a2v-green); border: 1px solid var(--a2v-green); }
.a2v-ev-see { color: var(--a2v-amber); border: 1px solid var(--a2v-amber); }
.a2v-ev-blocked { color: var(--a2v-amber); border: 1px solid var(--a2v-amber); margin: 0 0 0 4px; }

/* Flow strip */
.a2v-flowstrip { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.a2v-flowchip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--a2v-amber); color: var(--a2v-amber);
  font-size: .8125rem; font-weight: 600; padding: 8px 12px; background: var(--white);
}
.a2v-flowchip.is-ok { border-color: var(--line); color: var(--slate); }
.a2v-flowchip-x {
  font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}

/* Outcome / commitment log */
.a2v-demo-outcome {
  background: var(--mist); border: 1.5px solid var(--line);
  border-left: 3px solid var(--navy); padding: 20px 24px; margin-bottom: 20px;
}
.a2v-demo-outcome-label { font-size: 1rem !important; font-weight: 600 !important; color: var(--navy) !important; margin-bottom: 8px !important; }
.a2v-demo-uc { margin-bottom: 20px; }
.a2v-uc-verdict {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 3px 10px; margin-right: 8px;
}
.a2v-uc-verdict.is-in { color: var(--a2v-green); border: 1px solid var(--a2v-green); }
.a2v-uc-verdict.is-out { color: var(--a2v-amber); border: 1px solid var(--a2v-amber); }

.a2v-log-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .82rem; }
.a2v-log-table th, .a2v-log-table td {
  text-align: left; padding: 12px 14px; border: 1px solid var(--line);
  vertical-align: top; line-height: 1.5;
}
.a2v-log-table th {
  background: var(--navy); color: var(--white); font-weight: 600;
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
}
.a2v-log-table td { color: var(--slate); font-weight: 300; }

/* Controls */
.a2v-demo-controls { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.a2v-demo.is-enhanced ~ * .a2v-demo-controls,
.a2v-demo-controls { }
.a2v-demo-btn {
  font-family: var(--body); font-size: 14px; font-weight: 500;
  padding: 12px 26px; border: 1.5px solid var(--navy); background: var(--white);
  color: var(--navy); cursor: pointer; transition: background .15s, color .15s;
}
.a2v-demo-btn:hover:not(:disabled) { background: var(--mist); }
.a2v-demo-btn.is-primary { background: var(--navy); color: var(--white); }
.a2v-demo-btn.is-primary:hover:not(:disabled) { background: var(--navy-d); }
.a2v-demo-btn:disabled { opacity: .45; cursor: not-allowed; }

/* Without JS, hide the walkthrough controls (nothing to drive). */
.a2v-demo:not(.is-enhanced) .a2v-demo-controls { display: none; }
.a2v-demo:not(.is-enhanced) .a2v-demo-progressbar { display: none; }

/* ---- Readiness check ------------------------------------------------- */

/* Static statement list is the no-JS fallback; hidden once enhanced. */
.a2v-demo.is-enhanced .a2v-readiness-static { display: none; }
.a2v-readiness-static .a2v-demo-list { list-style: decimal; padding-left: 22px; }
.a2v-readiness-static .a2v-demo-list li { padding-left: 6px; }
.a2v-readiness-static em { color: var(--navy-w); font-style: italic; }

.a2v-choice-statement {
  font-size: 1rem !important; font-weight: 600 !important;
  letter-spacing: 0 !important; text-transform: none !important;
  color: var(--navy) !important; line-height: 1.5; max-width: 620px;
}

.a2v-result-subhead {
  font-size: .8125rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--navy);
  margin: 26px 0 4px;
}
.a2v-result-note {
  font-size: .875rem; color: var(--slate); line-height: 1.7; font-weight: 300;
  max-width: 660px; margin-top: 14px;
  border-left: 2px solid var(--slate-l); padding-left: 16px; font-style: italic;
}

/* ---- Conversion forms (built inactive until the ADR-002 gate) -------- */

.a2v-form { max-width: 640px; }
.a2v-form-fields { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.a2v-form-fields:disabled { opacity: .55; }
.a2v-form-fields:disabled input,
.a2v-form-fields:disabled select,
.a2v-form-fields:disabled textarea,
.a2v-form-fields:disabled .form-submit { cursor: not-allowed; }
.a2v-field-why {
  font-size: 11.5px; color: var(--slate); font-weight: 300; line-height: 1.5;
  margin-top: 2px;
}
.a2v-optional {
  font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--slate);
}
.a2v-consent { border-top: 1px solid var(--line); padding-top: 14px; }
.a2v-consent-label {
  display: flex !important; gap: 12px; align-items: flex-start;
  font-size: 13px !important; font-weight: 300 !important;
  letter-spacing: 0 !important; text-transform: none !important;
  color: var(--slate) !important; line-height: 1.6; cursor: pointer;
}
.a2v-consent-label input {
  width: 16px !important; height: 16px; margin-top: 3px; flex-shrink: 0;
  accent-color: var(--navy);
}

@media (max-width: 768px) {
  .a2v-log-table { display: block; overflow-x: auto; }
  .a2v-demo-controls { position: sticky; bottom: 0; background: var(--mist); padding: 12px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .a2v-page * { transition: none !important; animation: none !important; }
}
