/* V3-only additions. V1 and V2 styles remain untouched. */
:root {
  --v3-access: #ef7040;
  --v3-data-panel-bg: #1f211e;
  --v3-data-panel-radius: 0px;
}

.v3-retired { display: none !important; }
.v3-skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 999px;
  background: #dfff5c;
  color: #12110e;
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.v3-skip-link:focus { transform: translateY(0); }
#main-content:focus { outline: none; }
:where(a, button, summary):focus-visible {
  outline: 3px solid #dfff5c;
  outline-offset: 4px;
}

/* Market: one argument, organised by decision weight. */
#mercado { overflow: hidden; }
.v3-market-layout { display: grid; gap: clamp(34px, 5vw, 72px); }
.v3-market-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .7fr);
  column-gap: clamp(36px, 8vw, 120px);
  align-items: end;
}
.v3-market-intro .kicker { grid-column: 1 / -1; margin-bottom: 20px; }
.v3-market-intro h2 { max-width: 12ch; }
.v3-market-thesis {
  max-width: 58ch;
  color: var(--text-muted-dark);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.7;
}
.v3-market-thesis strong { color: var(--text-on-dark); font-weight: 600; }
.v3-market-leads,
.v3-market-ledger {
  display: grid;
  gap: 0;
  background: transparent;
  border-top: 1px solid var(--border-on-dark);
  border-left: 1px solid var(--border-on-dark);
}
.v3-market-leads { grid-template-columns: 1.25fr repeat(2, 1fr); }
.v3-market-ledger { grid-template-columns: repeat(4, 1fr); }
.v3-market-metric {
  min-width: 0;
  min-height: 250px;
  padding: clamp(24px, 3vw, 42px);
  background: var(--dark);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-on-dark);
  border-bottom: 1px solid var(--border-on-dark);
  border-radius: 0;
  font-family: 'DM Sans',system-ui,sans-serif;
}
.axis-step .card,
.float-label {
  border-radius: var(--v3-data-panel-radius);
  font-family: 'DM Sans',system-ui,sans-serif;
}
.v3-market-value {
  color: var(--text-on-dark);
  font-size: clamp(2rem, 3.7vw, 4.6rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.06em;
}
.v3-market-metric--accent .v3-market-value { color: var(--accent); }
.v3-market-metric--scope {
  grid-column: 1 / -1;
  min-height: 230px;
  background: #1f211e;
}
.v3-market-metric--scope .v3-market-value { color: var(--accent); }
.v3-market-metric--scope .v3-market-value i {
  padding: 0 .18em;
  color: rgba(255,255,255,.34);
  font-style: normal;
  font-weight: 400;
}
.v3-market-metric h3 {
  margin-top: 28px;
  color: var(--text-on-dark);
  font-size: 1rem;
  letter-spacing: -.02em;
}
.v3-market-metric p {
  margin-top: 10px;
  color: var(--text-muted-dark);
  font-size: .9rem;
  line-height: 1.55;
}
.v3-market-metric small {
  margin-top: auto;
  padding-top: 26px;
  color: rgba(255,255,255,.42);
  font-size: .68rem;
  line-height: 1.45;
  letter-spacing: .04em;
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .v3-market-intro { grid-template-columns: 1fr; row-gap: 24px; }
  .v3-market-leads { grid-template-columns: 1fr 1fr; }
  .v3-market-metric--scope { grid-column: 1 / -1; }
  .v3-market-ledger { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .v3-market-leads,
  .v3-market-ledger { grid-template-columns: 1fr; }
  .v3-market-metric--scope { grid-column: auto; }
  .v3-market-metric { min-height: 215px; }
}

/* Axis story: one contained scroll beat per narrative scene. */
#axis-story { height: calc(11 * 100vh); height: calc(11 * 100svh); }
.axis-steps { overflow: clip; }
.axis-step .card {
  background: var(--v3-data-panel-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: rgba(255,255,255,.12);
  box-shadow: none;
}
.axis-step .card h2 {
  font-size: clamp(1.7rem, 2.4vw, 2.55rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.05em;
}
.axis-step .card p {
  font-size: .9rem;
  line-height: 1.55;
}
.float-label { background: var(--v3-data-panel-bg); }

.v3-axis-context-video {
  position: absolute;
  top: clamp(110px, 13svh, 240px);
  left: clamp(32px, 15vw, 320px);
  right: auto;
  z-index: 3;
  width: min(50vw, 760px);
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border-on-dark);
  border-radius: var(--v3-data-panel-radius);
  background: #12110e;
  box-shadow: 0 26px 80px rgba(0,0,0,.38);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity .45s ease, transform .45s ease, visibility .45s;
  pointer-events: none;
}
#axis-story[data-active-step="1"] .v3-axis-context-video {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.v3-axis-context-leader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s;
  pointer-events: none;
}
.v3-axis-context-leader path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.v3-axis-context-leader marker path {
  fill: var(--accent);
  stroke: none;
}
#axis-story[data-active-step="1"] .v3-axis-context-leader {
  opacity: 1;
  visibility: visible;
}
.v3-axis-context-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #12110e;
}
.v3-axis-context-video figcaption {
  padding: 11px 14px 12px;
  border-top: 1px solid var(--border-on-dark);
  color: rgba(250,251,248,.62);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.v3-access-overlay {
  position: absolute;
  left: clamp(24px, 6vw, 92px);
  right: auto;
  bottom: clamp(28px, 7vh, 86px);
  z-index: 3;
  width: min(48vw, 720px);
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(239,112,64,.5);
  border-radius: var(--v3-data-panel-radius);
  background: rgba(18,17,14,.86);
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity .35s ease, transform .35s ease, visibility .35s;
  pointer-events: none;
}
#axis-story[data-active-step="9"] .v3-access-overlay {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.v3-access-map-sequence {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--v3-data-panel-radius);
  background: #f5f4ee;
}
.v3-access-map-frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  will-change: opacity;
}
.v3-access-map-frame:first-child { opacity: 1; }
.v3-access-overlay figcaption {
  padding: 9px 4px 2px;
  color: rgba(255,255,255,.52);
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.v3-access-card { border-color: rgba(239,112,64,.55) !important; }
.v3-access-status {
  display: inline-flex;
  margin-top: 22px;
  padding: 7px 10px;
  border: 1px solid rgba(239,112,64,.55);
  border-radius: 999px;
  color: #ffad8c;
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}
@media (max-width: 810px) {
  #axis-story { height: calc(11 * 74vh); height: calc(11 * 74svh); }
  .v3-axis-context-video {
    inset: 68px 14px auto;
    width: auto;
  }
  .v3-axis-context-leader { display: none; }
  .v3-axis-context-video figcaption { padding: 9px 11px 10px; }
  .v3-access-overlay {
    inset: 70px 14px auto;
    width: auto;
    max-height: 38svh;
    overflow: hidden;
  }
  .v3-access-map-sequence { max-height: 31svh; }
}
@media (prefers-reduced-motion: reduce) {
  .v3-axis-context-video { transition: none; transform: none; }
  .v3-axis-context-leader { transition: none; }
  .v3-access-overlay { transition: none; transform: none; }
  .v3-access-map-frame { opacity: 0 !important; }
  .v3-access-map-frame:last-child { opacity: 1 !important; }
}

/* Concept film: the territory approaches the site, then hands off to the 3D model. */
.v3-video-transition {
  position: relative;
  z-index: 4;
  isolation: isolate;
  height: 220vh;
  height: 220svh;
  background: var(--bg-dark);
}
.v3-video-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #12110e;
}
.v3-video-media,
.v3-video-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.v3-video-media {
  object-fit: cover;
  background: #12110e;
  filter: saturate(.9) contrast(1.02);
}
.v3-video-shade {
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(18,17,14,.24), rgba(18,17,14,0) 44%, rgba(18,17,14,.8));
}
.v3-video-copy {
  position: absolute;
  z-index: 2;
  left: clamp(22px, 6vw, 96px);
  right: clamp(22px, 6vw, 96px);
  bottom: clamp(36px, 8vh, 92px);
  max-width: 820px;
  will-change: transform, opacity;
}
.v3-video-copy h2 { margin-top: 18px; max-width: 13ch; }
.v3-video-copy p {
  margin-top: 16px;
  color: rgba(250,251,248,.72);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.v3-video-progress {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(250,251,248,.12);
}
.v3-video-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}
@media (max-width: 810px) {
  .v3-video-transition { height: 165vh; height: 165svh; }
  .v3-video-media { object-fit: contain; }
  .v3-video-copy { bottom: clamp(28px, 6vh, 58px); }
}
@media (prefers-reduced-motion: reduce) {
  .v3-video-transition { height: auto; }
  .v3-video-stage { position: relative; min-height: 78vh; min-height: 78svh; }
  .v3-video-copy { transform: none !important; opacity: 1 !important; }
  .v3-video-progress { display: none; }
}

/* Asset brief: dimensional, operational and planning facts stay together. */
.v3-asset-brief { padding-top: clamp(80px, 10vw, 150px); }
.v3-asset-summary {
  display: grid;
  grid-template-columns: .45fr 1fr;
  gap: 30px;
  align-items: start;
  padding-bottom: clamp(40px, 6vw, 76px);
}
.v3-asset-summary h2 { max-width: 18ch; }
.v3-asset-ledger {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--border-on-dark);
  border-left: 1px solid var(--border-on-dark);
}
.v3-asset-fact {
  grid-column: span 2;
  min-height: 310px;
  padding: clamp(24px, 3vw, 40px);
  border-right: 1px solid var(--border-on-dark);
  border-bottom: 1px solid var(--border-on-dark);
}
.v3-asset-fact:nth-child(4),
.v3-asset-fact:nth-child(5) { grid-column: span 3; }
.v3-asset-num {
  color: rgba(255,255,255,.35);
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .14em;
}
.v3-asset-fact h3 {
  margin-top: 46px;
  color: var(--text-on-dark);
  font-size: clamp(1.7rem, 3vw, 3.5rem);
  letter-spacing: -.05em;
}
.v3-asset-fact p,
.v3-asset-fact li {
  color: var(--text-muted-dark);
  font-size: .9rem;
  line-height: 1.6;
}
.v3-asset-fact p { margin-top: 16px; max-width: 44ch; }
.v3-asset-fact strong { color: var(--text-on-dark); font-weight: 600; }
.v3-asset-fact ul { margin: 18px 0 0; padding-left: 1.1em; }
.v3-asset-price { padding-top: 16px; border-top: 1px solid var(--border-on-dark); }
.v3-asset-fact--access { background: rgba(239,112,64,.06); }
.v3-asset-status {
  display: inline-block;
  margin-top: 26px;
  color: #ffad8c;
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}
@media (max-width: 810px) {
  .v3-asset-summary { grid-template-columns: 1fr; }
  .v3-asset-ledger { grid-template-columns: 1fr 1fr; }
  .v3-asset-fact,
  .v3-asset-fact:nth-child(4),
  .v3-asset-fact:nth-child(5) { grid-column: span 1; }
  .v3-asset-fact--access { grid-column: 1 / -1 !important; }
}
@media (max-width: 560px) {
  .v3-asset-ledger { grid-template-columns: 1fr; }
  .v3-asset-fact--access { grid-column: auto !important; }
}

/* Operator scenarios use imagery as orientation, not as decoration between claims. */
.v3-operators-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.12);
}
.v3-op-card {
  position: relative;
  grid-column: span 2;
  min-height: 390px;
  overflow: hidden;
  background: #1c1c18;
}
.v3-op-card--wide { grid-column: span 4; }
.v3-op-card img {
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
  filter: saturate(.72) brightness(.58);
  transition: transform .7s ease, filter .7s ease;
}
.v3-op-card::after {
  content: "";
  position: absolute;
  inset: 28% 0 0;
  background: linear-gradient(transparent, rgba(18,17,14,.96));
  opacity: 1;
  transition: opacity .7s ease;
}
.v3-op-copy {
  position: absolute;
  inset: auto clamp(22px, 3vw, 38px) clamp(24px, 3vw, 38px);
  z-index: 1;
}
.v3-op-copy > span { color: var(--accent); font-size: .68rem; font-weight: 700; letter-spacing: .16em; }
.v3-op-copy h3 { margin-top: 10px; color: var(--text-on-dark); font-size: clamp(1.35rem, 2vw, 2rem); }
.v3-op-copy p { margin-top: 9px; max-width: 42ch; color: var(--text-muted-dark); font-size: .84rem; }
.v3-op-card:hover img { transform: scale(1.025); filter: saturate(1.04) brightness(1.02); }
.v3-op-card:hover::after { opacity: .54; }

/* Source register: the section 03 ledger language, continued on light. */
.v3-evidence-head {
  display: grid;
  grid-template-columns: .45fr 1fr;
  gap: 30px;
  align-items: start;
  padding-bottom: clamp(40px, 6vw, 76px);
}
.v3-evidence-heading h2 { max-width: 18ch; }
.v3-evidence-heading p {
  margin-top: 18px;
  max-width: 50ch;
  color: var(--text-muted-light);
}
.v3-source-register {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-on-light);
  border-left: 1px solid var(--border-on-light);
}
.v3-source-item {
  grid-column: span 2;
  min-height: 260px;
  padding: clamp(24px, 3vw, 40px);
  border-right: 1px solid var(--border-on-light);
  border-bottom: 1px solid var(--border-on-light);
  display: flex;
  flex-direction: column;
}
.v3-source-item > span { color: rgba(18,17,14,.38); font-size: .68rem; letter-spacing: .14em; }
.v3-source-item h3 {
  margin-top: 46px;
  color: var(--text-on-light);
  font-size: clamp(1.7rem, 3vw, 3.5rem);
  letter-spacing: -.05em;
}
.v3-source-item p {
  margin-top: 16px;
  max-width: 44ch;
  color: var(--text-muted-light);
  font-size: .9rem;
  line-height: 1.6;
}

/* Native details keep the FAQ usable before and without JavaScript. */
.v3-faq-list { max-width: 920px; }
.v3-faq-item { border-bottom: 1px solid var(--border-on-light); }
.v3-faq-item:first-child { border-top: 1px solid var(--border-on-light); }
.v3-faq-item summary {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 0;
  color: var(--text-on-light);
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  font-weight: 550;
  cursor: pointer;
  list-style: none;
}
.v3-faq-item summary::-webkit-details-marker { display: none; }
.v3-faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  color: #71851c;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1;
  transition: transform .2s ease;
}
.v3-faq-item[open] summary::after { transform: rotate(45deg); }
.v3-faq-item > div { padding: 0 56px 26px 0; }
.v3-faq-item p { max-width: 72ch; color: var(--text-muted-light); font-size: .92rem; }

@media (max-width: 810px) {
  .v3-operators-grid { grid-template-columns: 1fr 1fr; }
  .v3-op-card,
  .v3-op-card--wide { grid-column: span 1; }
  .v3-op-card--wide { grid-column: 1 / -1; }
  .v3-evidence-head { grid-template-columns: 1fr; }
  .v3-source-register { grid-template-columns: 1fr 1fr; }
  .v3-source-item { grid-column: span 1; }
}
@media (max-width: 560px) {
  .v3-operators-grid,
  .v3-source-register { grid-template-columns: 1fr; }
  .v3-op-card--wide { grid-column: auto; }
  .v3-op-card, .v3-op-card img { min-height: 330px; }
}
@media (prefers-reduced-motion: reduce) {
  .v3-op-card img,
  .v3-op-card::after,
  .v3-faq-item summary::after { transition: none; }
}

/* The hospital cluster fans out from the real map coordinates. Desktop and
   compact layouts share one marker, with responsive leader-line geometry. */
.float-fan .float-inner {
  --marker-dx-active: var(--marker-dx-desktop);
  --marker-bottom-active: var(--marker-bottom-desktop);
  --stalk-len-active: var(--stalk-len-desktop);
  --stalk-angle-active: var(--stalk-angle-desktop);
}
.float-fan .float-label {
  bottom: var(--marker-bottom-active);
  transform: translateX(calc(-50% + var(--marker-dx-active)));
}
.float-fan .float-stalk {
  height: var(--stalk-len-active);
  transform: translateX(-50%) rotate(var(--stalk-angle-active));
}
@media (max-width: 810px) {
  .float-fan .float-inner {
    --marker-dx-active: var(--marker-dx-mobile);
    --marker-bottom-active: var(--marker-bottom-mobile);
    --stalk-len-active: var(--stalk-len-mobile);
    --stalk-angle-active: var(--stalk-angle-mobile);
  }
}
