/* =========================================================
   Collaborating for Care: Navigating F-ILD Together
   Design system + layout + components
   Tokens verified visually from SG2a Style Guide
   ========================================================= */

:root {
  /* ---- Color palette (verified from Style Guide page 2) ---- */
  --brown-1: #4f2e2e;   /* dark brown - headings, borders, text */
  --brown-2: #331b1b;   /* near-black brown */
  --rose-1: #a36666;
  --rose-2: #cc9696;
  --rose-3: #e2b7b0;
  --mauve:  #bc7e7e;    /* toolbar background */
  --cream:  #fff1e3;    /* page background */
  --olive-1: #72672f;
  --olive-2: #918647;
  --olive-3: #b7ae6c;
  --olive-4: #ddd899;
  --coral-1: #ce6055;   /* instruction text */
  --coral-2: #fc8888;
  --coral-3: #ffc7c7;
  --purple-1: #a571a5;
  --purple-2: #bf95c1;
  --purple-3: #e2c3e5;
  --teal-1: #00949c;    /* primary teal */
  --teal-2: #48aaa3;
  --teal-3: #8bd8d0;
  --teal-4: #ceeae4;
  --teal-5: #e4f9f4;
  --brownmid-1: #965345;
  --brownmid-2: #aa6a59;
  --tan-1: #c99287;
  --tan-2: #e2b7b0;

  /* ---- Group / section theme colors (road) ---- */
  --g-intro: #ec9c98;
  --g-sdm: #e7a6a3;
  --g-using: #8bd8d0;
  --g-followup: #c4bb83;
  --g-concerns: #cfa6d2;
  --g-resources: #c08b87;

  /* ---- Typography ---- */
  --ff: 'Poppins', 'Segoe UI', sans-serif;

  /* ---- Shape ---- */
  --radius: 20px;
  --radius-sm: 12px;
  --card-border: 3px solid var(--brown-1);

  /* ---- Fluid sizing anchored to 1280px reference ---- */
  --road-w: clamp(220px, 17vw, 225px);
  --tool-w: clamp(54px, 5.4vw, 74px);

  /* Full-screen height. Capped to a landscape canvas on touch devices so
     the desktop layout scales down (letterboxed) instead of stretching tall. */
  --screen-h: 100vh;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--ff);
  color: var(--brown-1);
  background: var(--cream);
}

img { display: block; max-width: 100%; }
button { font-family: var(--ff); cursor: pointer; }

/* =========================================================
   APP SHELL LAYOUT
   ========================================================= */
#app {
  display: flex;
  width: 100%;
  height: var(--screen-h);
  min-height: var(--screen-h);
  background: var(--cream);
  overflow: hidden;
}

#road {
  width: var(--road-w);
  min-width: var(--road-w);
  flex-shrink: 0;
  height: 100%;
  background: var(--cream);
  overflow: hidden;
  position: relative;
}
.road-scroll {
  height: 100%;
  overflow: hidden;
}
.road-scroll::-webkit-scrollbar { width: 0; height: 0; }

.road-return-wrap {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% - 6px);
  box-sizing: border-box;
  padding: 6px 4px 10px;
  margin: 0;
  border: none;
  background: var(--cream);
  text-align: left;
  cursor: pointer;
}
.road-return-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -16px;
  height: 16px;
  background: linear-gradient(to bottom, var(--cream) 0%, transparent 100%);
  pointer-events: none;
}

.road-return-menu {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  box-sizing: border-box;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  pointer-events: none;
}
.road-return-menu.btn-primary {
  padding: 8px 10px;
  box-shadow: 0 2px 0 0 #006e74;
  border-radius: 6px;
}
.road-return-label {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  font-size: clamp(11px, 1.15vw, 13px);
  line-height: 1.2;
  letter-spacing: 0.3px;
  color: var(--teal-1);
  pointer-events: none;
}
.road-return-menu .returnMenu-icon {
  width: clamp(36px, 3.6vw, 48px);
  height: auto;
  display: block;
}
.road-return-wrap:hover .road-return-menu { filter: brightness(1.06); }
.road-return-wrap:active .road-return-menu { transform: translateY(1px); }
#app.chrome-none .road-return-wrap,
#app.chrome-map .road-return-wrap { display: none; }

.road-nodes {
  position: relative;
  z-index: 1;
  --lane-step: 46px;
  --road-base: 40%;
}
.road-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.road-marker {
  position: absolute;
  top: 50%;
  left: 0;
  right: 6px;
  width: auto;
  transform: translateY(-50%);
  z-index: 10;
  pointer-events: none;
  padding: 0;
  box-sizing: border-box;
}
#app.chrome-none #roadMarker,
#app.chrome-map #roadMarker { display: none; }

.road-marker-unit {
  position: relative;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  border: 2px solid var(--brown-1);
  border-radius: 8px 8px 0 0;
  background: transparent;
  overflow: hidden;
}
.road-marker-slot {
  min-height: 68px;
  height: 68px;
  background: transparent;
}

#stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

#topbar {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 24px 4px;
  position: relative;
  background: var(--cream);
}

#sectionTitle {
  margin: 0;
  text-align: center;
  font-weight: 600;
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.12;
  color: var(--brown-1);
}

#content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0 22px 12px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#app.chrome-full #content { overflow: visible; }
#app.chrome-full #stage { overflow: visible; }
#content::-webkit-scrollbar { width: 8px; }
#content::-webkit-scrollbar-thumb { background: var(--rose-3); border-radius: 4px; }

/* Toolbar */
#toolbar {
  width: var(--tool-w);
  flex-shrink: 0;
  background: var(--mauve);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 14px 0 18px;
}
.tool-spacer { flex: 1; }
.tool-btn {
  width: clamp(38px, 3.6vw, 50px);
  height: clamp(38px, 3.6vw, 50px);
  border-radius: 50%;
  background: #5d3838;
  border: 2px solid #432626;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform .15s, background .15s;
}
.tool-btn img { width: 56%; height: 56%; object-fit: contain; }
.tool-btn:hover { background: #4a2c2c; transform: scale(1.08); }
.tool-btn.active { background: var(--olive-2); border-color: var(--olive-1); }

.nav-btn {
  position: relative;
  width: 100%;
  height: clamp(40px, 3.8vw, 50px);
  border: none;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  color: #fff;
  font-weight: 700;
  font-size: clamp(9px, 0.85vw, 11px);
  line-height: 1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 48px;
  width: 112%;
  margin-left: -6%;
  box-sizing: border-box;
}
.nav-next-wrap {
  position: relative;
  width: 100%;
}
.nav-next-arrow {
  position: absolute;
  right: calc(100% + 6px);
  top: 50%;
  width: clamp(34px, 3.2vw, 48px);
  height: auto;
  transform: translateY(-50%) rotate(90deg);
  pointer-events: none;
  z-index: 2;
}
.nav-next-arrow[hidden] { display: none !important; }
.nav-next-arrow.anim-lr { animation: navNextArrowLR 1.1s ease-in-out infinite; }
@keyframes navNextArrowLR {
  0%, 100% { transform: translateY(-50%) translateX(-6px) rotate(90deg); }
  50% { transform: translateY(-50%) translateX(6px) rotate(90deg); }
}
#btnBack {
  align-items: flex-end;
  padding-bottom: 4%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%232e1a1a' d='M43 14 Q50 6 58 14 L95 86 Q96 98 90 98 L10 98 Q5 98 5 86 Z'/%3E%3Cpath fill='%235d3838' d='M43 8 Q50 0 58 8 L95 80 Q96 92 90 92 L10 92 Q5 92 5 80 Z'/%3E%3C/svg%3E");
}
#btnNext {
  align-items: flex-start;
  padding-top: 4%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%232e1a1a' d='M5 16 Q5 8 10 8 L90 8 Q96 8 95 16 L58 88 Q50 98 43 88 Z'/%3E%3Cpath fill='%235d3838' d='M5 10 Q5 2 10 2 L90 2 Q96 2 95 10 L58 82 Q50 92 43 82 Z'/%3E%3C/svg%3E");
}
.nav-btn:hover { filter: brightness(1.06); }
.nav-btn:active { transform: translateY(1px); }
.nav-btn:disabled { opacity: .35; cursor: not-allowed; }

/* Chrome visibility per screen type */
#app.chrome-none #road,
#app.chrome-none #topbar,
#app.chrome-none #toolbar { display: none; }
#app.chrome-none #content { padding: 0; }

#app.chrome-map #topbar { display: none; }

#app.chrome-map #road { display: none; width: 0; flex: 0 0 0; overflow: hidden; }
#app.chrome-map { overflow: visible; }
#app.chrome-map #stage { overflow: visible; }
#app.chrome-map #content { padding-left: 0; padding-right: 0; overflow: visible; }
#app.chrome-map .map-page { overflow: visible; }

html.chrome-map-active,
body.chrome-map-active {
  overflow-x: visible;
}

/* =========================================================
   NAVIGATION ROAD (left)
   ========================================================= */
.road-seg { position: relative; }
.road-node {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 8px 9px 0;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  min-height: 68px;
  box-sizing: border-box;
}
.road-node + .road-node { margin-top: 6px; }
.road-node .node-dot {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  margin-left: calc(var(--road-base, 50%) - 15px + var(--lane, 0) * var(--lane-step, 46px));
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--brown-1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: margin-left .35s ease;
}
.road-node.hub .node-dot {
  width: 50px;
  height: 50px;
  margin-left: calc(var(--road-base, 50%) - 25px + var(--lane, 0) * var(--lane-step, 46px));
  overflow: visible;
}
.road-node.hub .node-dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.road-node.visited .node-dot::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  box-sizing: border-box;
}
.road-node:not(.hub).visited .node-dot {
  background: transparent;
  border-color: transparent;
}
.road-node:not(.hub).visited .node-dot::after {
  inset: 0;
  width: 100%;
  height: 100%;
  background: url("assets/Asset75.svg") center/cover no-repeat;
  border: none;
}
.road-node.hub.visited .node-dot::after {
  inset: auto;
  left: auto;
  bottom: auto;
  right: -4px;
  top: -4px;
  width: 18px;
  height: 18px;
  background: url("assets/Asset75.svg") center/cover no-repeat;
  border: none;
  z-index: 3;
}
.road-node .node-label {
  flex: 1;
  min-width: 0;
  /* Knee (fractional-lane) nodes nudge their label back to the main column;
     full-lane nodes keep the normal dot-to-label gap. */
  margin-left: calc(var(--label-comp, 0) * var(--lane-step, 46px));
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 600;
  color: var(--brown-1);
  line-height: 1.1;
  opacity: .55;
}
.road-node.hub .node-label { font-weight: 700; opacity: .85; }
.road-node.hub[data-id="intro"] .node-label,
.road-node.hub[data-id="sdm-divider"] .node-label,
.road-node.hub[data-id="resources"] .node-label { white-space: nowrap; }
.road-node.current .node-label { opacity: 1; }
/* Terminal "Completed!" marker (not a button). Path ends here; no visible dot. */
.road-end {
  cursor: default;
  position: relative;
  min-height: 52px;
  margin-top: 6px;
  margin-bottom: 0;
}
.road-end-anchor {
  position: absolute;
  left: var(--road-base, 50%);
  top: 0;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  visibility: hidden;
  pointer-events: none;
}
.road-end .node-label {
  position: absolute;
  left: var(--road-base, 50%);
  top: 18px;
  transform: translateX(-50%);
  z-index: 2;
  color: #000;
  font-weight: 700;
  opacity: 1;
  white-space: nowrap;
  text-align: center;
  margin: 0;
}
.road-node.current .node-dot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14px;
  transform: translateX(-50%);
  width: 22px;
  height: 32px;
  background: url("assets/Asset60.svg") center/contain no-repeat;
  z-index: 5;
  pointer-events: none;
}
/* current "YOU ARE HERE" marker */
.road-here {
  position: relative;
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: var(--brown-1);
  z-index: 1;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 4px 8px;
  margin: 0;
  text-align: center;
}
.road-node .pin {
  position: absolute;
  left: 18px;
  z-index: 2;
  width: 26px;
}

/* =========================================================
   CONTENT CARD (shared)
   ========================================================= */
.card {
  background: #fff;
  border: var(--card-border);
  border-radius: 0;
  padding: 18px 26px 24px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--rose-3) transparent;
  display: flex;
  flex-direction: column;
}
#app.chrome-full .card-shell {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: visible;
}
#app.chrome-full .card-shell > .card-outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
#app.chrome-full .card-shell .card-outline-path {
  fill: none;
  stroke: var(--brown-1);
  stroke-width: 3;
  stroke-linejoin: miter;
}
#app.chrome-full .card-shell > .card.card--outlined {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: none;
  background: #fff;
  position: relative;
  z-index: 1;
}
.card::-webkit-scrollbar { width: 8px; }
.card::-webkit-scrollbar-thumb { background: var(--rose-3); border-radius: 4px; }
.card.lung-card {
  flex: 1;
  min-height: 0;
  padding: 4px 8px 6px;
  overflow-y: auto;
}
.card.card-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--rose-3) transparent;
}
.card.card-scroll::-webkit-scrollbar { width: 8px; }
.card.card-scroll::-webkit-scrollbar-thumb { background: var(--rose-3); border-radius: 4px; }

.remember-body .icon-row {
  padding-bottom: 14px;
}
.remember-body .icon-row + .icon-row {
  border-top: 2px solid var(--brown-1);
  padding-top: 14px;
}

.card-survey {
  font-weight: 400;
}
.card-survey .subhead {
  font-weight: 500;
}
.card-survey .instruction,
.card-survey .body-text,
.card-survey .survey-q {
  font-weight: 400;
}
.card-survey .survey-block {
  margin-bottom: 16px;
}
.card-survey .survey-opts {
  display: grid;
  gap: 10px;
}
.card-survey .answer.survey-opt {
  border-radius: 6px;
  color: #fff;
  font-weight: 500;
  justify-content: center;
}
.card-survey .answer.survey-opt .atext {
  justify-content: center;
  text-align: center;
  color: #fff;
  width: 100%;
  font-size: 13px;
  line-height: 1.25;
  padding: 6px 10px;
}
.card-survey .answer.survey-opt.selected {
  padding-left: 0;
  color: #fff;
  border: 3px solid var(--brown-1);
  box-shadow: 0 2px 0 0 var(--brown-1);
}
.card-survey .btn {
  border-radius: 8px;
  text-align: center;
  color: #fff;
  font-weight: 500;
}

.card-head { text-align: center; margin-bottom: 6px; }
.subhead {
  text-align: center;
  font-weight: 600;
  font-size: clamp(17px, 1.85vw, 25px);
  line-height: 1.15;
  color: var(--brown-1);
  margin: 4px 0 10px;
}
.lede {
  text-align: center;
  font-weight: 700;
  font-size: clamp(14px, 1.4vw, 18px);
  color: #000;
  margin: 0 0 14px;
}
.lede-left { text-align: left; font-weight: 400; }
.instruction-left,
.instruction.instruction-left { text-align: left; }
.instruction {
  text-align: center;
  text-transform: uppercase;
  color: #000;
  font-weight: 400;
  font-size: clamp(11px, 1.1vw, 14px);
  letter-spacing: .3px;
  margin: 2px 0 14px;
}
.body-text { font-size: clamp(13px, 1.25vw, 16px); line-height: 1.45; }
.body-text ul { margin: 4px 0 10px; padding-left: 20px; }
.body-text li { margin: 3px 0; }
.body-text ul ul {
  list-style: none;
  padding-left: 0;
  margin: 4px 0 0;
}
.body-text ul ul li {
  position: relative;
  padding-left: 1.1em;
}
.body-text ul ul li::before {
  content: "▪";
  color: var(--coral-1);
  position: absolute;
  left: 0;
}
.body-text b, .body-text strong { color: var(--brown-1); }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.flow-cols {
  columns: 2;
  column-gap: 28px;
}
.flow-cols li { break-inside: avoid; }
.cols-2-lined {
  gap: 2px;
  background: var(--rose-2);
}
.cols-2-lined .icon-row {
  padding: 16px 20px;
  box-sizing: border-box;
  background: #fff;
}
.conclusion-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr;
  gap: 2px;
  flex: 1;
  min-height: 300px;
  margin-top: clamp(32px, 8vh, 72px);
  margin-bottom: clamp(24px, 6vh, 56px);
  background: var(--brown-1);
}
.conclusion-cols .conclusion-item {
  flex-direction: column;
  text-align: center;
  align-items: center;
  justify-content: center;
  padding: 24px 14px;
  box-sizing: border-box;
  background: #fff;
  min-height: 100%;
}
.conclusion-cols .conclusion-item .ico {
  width: clamp(120px, 12vw, 140px);
  flex-shrink: 0;
}
.icon-row { display: flex; gap: 12px; align-items: flex-start; }
.icon-row .ico { width: clamp(48px, 5vw, 70px); flex-shrink: 0; }
.icon-row .ico img { width: 100%; }

.sdm-body {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(12px, 2vw, 28px);
  align-items: stretch;
  flex: 1;
  min-height: 0;
}
.sdm-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.sdm-rows .icon-row {
  padding-bottom: 14px;
}
.sdm-rows .icon-row + .icon-row {
  border-top: 2px solid var(--rose-2);
  padding-top: 14px;
}
.sdm-rows .icon-row--center {
  align-items: center;
}
.sdm-rows .body-text p {
  font-weight: 400;
}
.sdm-rows .body-text b,
.sdm-rows .body-text strong {
  font-weight: 600;
}
.sdm-rows .icon-row--center .body-text p {
  margin: 0;
  font-weight: 600;
}
.sdm-asset {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.sdm-asset img {
  width: 100%;
  max-width: clamp(160px, 22vw, 300px);
  height: auto;
}

/* Centered single-illustration "divider" screens */
.divider-layout {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  text-align: left;
}
.divider-layout .divider-ill { width: clamp(180px, 24vw, 320px); }
.divider-layout .divider-text {
  max-width: 360px;
  font-size: clamp(16px, 1.7vw, 22px);
  font-weight: 600;
  line-height: 1.4;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  border: none;
  border-radius: var(--radius);
  font-family: var(--ff);
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s, filter .12s, box-shadow .12s;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--teal-1);
  color: #fff;
  font-size: clamp(15px, 1.5vw, 20px);
  letter-spacing: 1px;
  padding: 12px 40px;
  box-shadow: 0 4px 0 0 #006e74;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled { background: var(--rose-3); box-shadow: 0 4px 0 0 #b9968f; color: #fff; cursor: not-allowed; }

.btn-skip {
  background: var(--rose-2);
  color: var(--brown-1);
  font-size: 14px;
  padding: 10px 26px;
  box-shadow: 0 4px 0 0 var(--rose-1);
}

/* Answer pills */
.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  column-gap: 22px;
  row-gap: 14px;
  margin: 6px 0 12px;
}
.answers-col {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  row-gap: 14px;
  min-width: 0;
}
.answer {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 100%;
  min-height: 54px;
  padding: 0;
  padding-left: 42px;
  border-radius: 12px;
  overflow: visible;
  background: var(--rose-2);
  border: 3px solid transparent;
  box-shadow: 0 2px 0 0 var(--rose-1);
  text-align: left;
  font-size: clamp(13px, 1.3vw, 16px);
  font-weight: 600;
  color: var(--brown-1);
  transition: box-shadow .15s, border-color .15s, transform .12s;
}
.answer .letter {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 42px;
  border-radius: 12px 0 0 12px;
  background: var(--rose-1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}
.answer .atext { flex: 1; display: flex; align-items: center; padding: 8px 14px; }
.answer.survey-opt { padding-left: 0; }
.answer.glow { animation: glowPulse 1.6s ease-in-out infinite; }
.answer:hover:not(.locked) { transform: translateY(-1px); }
.answer.selected {
  border: 3px solid var(--brown-1);
  padding-left: 42px;
  box-shadow: 0 2px 0 0 var(--brown-1);
}
.answer.selected .letter {
  left: -3px;
  top: -3px;
  bottom: -3px;
  width: 45px;
  box-sizing: border-box;
  border: 3px solid var(--brown-1);
  border-right: none;
  box-shadow: 0 2px 0 0 var(--brown-1);
}
.answer.correct {
  background: #b7ae6c;
  border-color: #918647;
  box-shadow: 0 2px 0 0 #918647;
}
.answer.correct .letter {
  left: -3px;
  top: -3px;
  bottom: -3px;
  width: 45px;
  background: #918647;
}
.answer.incorrect {
  background: #fc8888;
  border-color: var(--coral-1);
  box-shadow: 0 2px 0 0 var(--coral-1);
}
.answer.incorrect .letter {
  left: -3px;
  top: -3px;
  bottom: -3px;
  width: 45px;
  background: #ce6055;
}
/* User's choice keeps brown active border after submit */
.answer.selected.correct {
  background: #b7ae6c;
  border: 3px solid var(--brown-1);
  box-shadow: 0 2px 0 0 var(--brown-1);
}
.answer.selected.correct .letter {
  border: 3px solid var(--brown-1);
  border-right: none;
  box-shadow: 0 2px 0 0 var(--brown-1);
  background: #918647;
}
.answer.selected.incorrect {
  background: #fc8888;
  border: 3px solid var(--brown-1);
  box-shadow: 0 2px 0 0 var(--brown-1);
}
.answer.selected.incorrect .letter {
  border: 3px solid var(--brown-1);
  border-right: none;
  box-shadow: 0 2px 0 0 var(--brown-1);
  background: #ce6055;
}
.answer.locked { cursor: default; }

.result-msg { font-weight: 700; font-size: clamp(15px,1.5vw,20px); margin: 12px 0 4px; }
.result-msg.ok { color: var(--teal-1); }
.result-msg.no { color: var(--coral-1); }
.q-feedback-box {
  margin-top: 12px;
  padding: 14px 18px;
  border: none;
  border-radius: 0;
}
.q-feedback-box.is-correct {
  background: #ddd899;
}
.q-feedback-box.is-incorrect {
  background: #ffc7c7;
}
.q-feedback-box .result-msg,
.q-feedback-box .rationale {
  color: #000;
  margin: 0;
}
.q-feedback-box .result-msg {
  font-weight: 500;
  margin-bottom: 10px;
}
.q-feedback-box .result-msg.ok,
.q-feedback-box .result-msg.no {
  color: #000;
}
.rationale { font-size: clamp(13px,1.25vw,16px); line-height: 1.45; margin: 4px 0; }
.thank-you { text-align: center; color: var(--teal-1); font-weight: 700; letter-spacing: .5px; font-size: clamp(14px,1.4vw,18px); margin: 6px 0 10px; }

.qfooter { margin-top: auto; display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding-top: 12px; }

/* =========================================================
   TITLE PAGE
   ========================================================= */
.title-page {
  position: relative;
  width: 100%;
  height: var(--screen-h);
  display: flex;
  flex-direction: column;
  background: var(--cream);
  overflow: hidden;
}
.title-main {
  flex: 1;
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.title-illustration {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.title-ill {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
}
.title-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: none;
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 40px) clamp(24px, 5vw, 64px);
  box-sizing: border-box;
  --title-content-nudge: clamp(24px, 3.5vw, 48px);
}
.title-center h1 {
  color: var(--brown-1);
  font-weight: 600;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.15;
  margin: 0 0 22px;
  margin-left: var(--title-content-nudge);
  width: 100%;
  max-width: min(100%, 460px);
  align-self: center;
}
.title-grant {
  color: #a36666;
  font-weight: 600;
  font-size: clamp(12px,1.3vw,16px);
  margin-top: 18px;
  margin-left: var(--title-content-nudge);
  width: 100%;
  max-width: min(100%, 400px);
}
.title-begin {
  position: relative;
  margin-left: var(--title-content-nudge);
}
.title-begin .btn-primary {
  background: #48aaa3;
  box-shadow: 0 4px 0 0 #00949c;
  border-radius: 20px;
  padding-left: 56px;
  padding-right: 56px;
}
.title-arrow {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  width: 70px;
  animation: arrowLR 1.1s ease-in-out infinite;
}
.title-isi {
  background: var(--mauve);
  color: #fff;
  font-size: clamp(10px, 1vw, 12px);
  line-height: 1.3;
  padding: 10px 28px;
}
.title-footer {
  background: var(--brown-1);
  padding: 14px 24px;
  color: #fff;
  font-size: clamp(10px, 1vw, 12px);
  line-height: 1.3;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}
.title-footer-browsers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
}
.title-footer-browser-icons {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 20px;
  row-gap: 6px;
}
.title-footer-browser-pair {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.title-footer-browser-hint {
  line-height: 1.3;
  white-space: nowrap;
}
.title-footer-browser-link {
  display: inline-flex;
  line-height: 0;
  flex-shrink: 0;
  opacity: 1;
  transition: opacity 0.15s ease;
}
.title-footer-browser-link:hover { opacity: 0.85; }
.title-footer-browser-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 4px;
}
.title-footer-browser-link img {
  display: block;
  width: 22px;
  height: 22px;
}
.title-footer-bottom {
  display: flex;
  align-items: center;
  margin-top: 6px;
}
.title-footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.title-footer-logo {
  display: block;
  height: 14px;
  width: auto;
  /* Colored PNG → solid white on dark footer (transparent areas stay clear). */
  filter: brightness(0) invert(1);
}

/* =========================================================
   HOW-TO-USE (overview p4 + animated tutorial p5-11)
   ========================================================= */
.howto-page { display: flex; flex-direction: column; height: var(--screen-h); padding: 14px 28px 18px; }
.pulse { animation: pulseScale 1.4s ease-in-out infinite; }

/* ---- Overview (p4) ---- */
.howto-overview .howto-top { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.howto-title { font-size: clamp(26px, 3vw, 40px); font-weight: 600; color: var(--brown-1); }
.howto-guide-btn { background: var(--teal-1); font-size: clamp(12px,1.2vw,15px); padding: 9px 22px; letter-spacing: .5px; }
.howto-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, 1fr);
  gap: 12px;
  margin: 12px 0;
  min-height: 0;
}
.howto-cell:nth-child(1) { grid-column: 1; }
.howto-cell:nth-child(2) { grid-column: 2 / span 2; }
.howto-cell:nth-child(3) { grid-column: 4; }
.howto-cell:nth-child(4) { grid-column: 1; }
.howto-cell:nth-child(5) { grid-column: 2; }
.howto-cell:nth-child(6) { grid-column: 3 / span 2; }
.howto-cell {
  background: #fff;
  border: 2px solid var(--brown-1);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}
.howto-cell-visual { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.howto-cell-visual .htu-demo { font-size: 7.5px; width: 100%; height: 100%; }
.howto-cell-visual .htu-demo--window { font-size: 11px; }
.howto-cell-visual .htu-demo--nav {
  font-size: 11px;
  width: 100%;
  min-height: 0;
  align-items: stretch;
}
.howto-cell-visual .htu-navsim {
  max-width: none;
  width: 100%;
  min-height: 18em;
  position: relative;
  display: grid;
  grid-template-columns: 15em minmax(0, 1fr) 5.5em;
  grid-template-rows: 1fr;
  gap: 0;
  align-items: stretch;
}
.howto-cell-visual .htu-navsim-road {
  grid-column: 1;
  grid-row: 1;
  flex: none;
  min-width: 0;
  width: 100%;
  overflow: visible;
  padding: .75em .65em;
}
.howto-cell-visual .htu-nsr-nodes { --road-base: 26%; }
.howto-cell-visual .htu-nsr-return-label { font-size: .62em; line-height: 1.2; }
.howto-cell-visual .htu-nsr-label { font-size: .72em; line-height: 1.15; white-space: normal; }
.howto-cell-visual .htu-navsim-stage { grid-column: 2; grid-row: 1; }
.howto-cell-visual .htu-navsim-tools { grid-column: 3; grid-row: 1; flex: none; }
/* Match animated tutorial callout sizing and placement. */
.howto-cell-visual .htu-navsim .htu-callout {
  position: absolute;
  z-index: 7;
  display: flex;
  align-items: flex-start;
  gap: .6em;
  background: #fff;
  border: .16em solid var(--brown-1);
  border-radius: .5em;
  padding: .55em .75em;
  color: var(--brown-1);
  width: 15em;
  box-shadow: none;
  filter: drop-shadow(0 .2em .45em rgba(51, 27, 27, .18));
  opacity: 1;
  transform: none;
  animation: none;
  overflow: visible;
  --callout-border: .16em;
  --callout-square: .62em;
}
.howto-cell-visual .htu-navsim .htu-callout b,
.howto-cell-visual .htu-navsim .htu-callout > span { position: relative; z-index: 1; }
.howto-cell-visual .htu-navsim .htu-callout b { width: 1.6em; height: 1.6em; }
.howto-cell-visual .htu-navsim .htu-callout--1 { left: 12.5em; right: auto; top: 0.4em; bottom: auto; width: 17.5em; }
.howto-cell-visual .htu-navsim .htu-callout--2 { left: 12.5em; right: auto; top: 6.8em; bottom: auto; }
.howto-cell-visual .htu-navsim .htu-callout--3 { left: auto; right: 4.6em; top: auto; bottom: 1em; }
.howto-cell-visual .htu-demo--popup { font-size: 11px; }
.howto-cell-visual .htu-popup-card { min-width: 12em; min-height: 6.5em; padding: 0.75em 0.8em 1.8em; }
.howto-cell-visual .htu-demo--pdf { gap: 10px; padding: 0 8px; }
.howto-cell-visual .htu-pdf-tile { width: 52px; height: 52px; }
.howto-cell-visual .htu-demo--toolbar { font-size: 10px; gap: 1.6em; }
.howto-cell-visual .htu-tb-divider { width: 5px; }
.howto-cell-visual .htu-tb-ico { width: 4.8em; height: 4.8em; }
.howto-cell-visual .htu-tb-home,
.howto-cell-visual .htu-tb-stack { max-width: none; gap: 8px; }
.howto-cell-visual .htu-tb-stack {
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 10px;
}
.howto-cell-visual .htu-tb-text { text-align: left; }
.howto-cell-visual .htu-demo--checks { font-size: 10px; align-items: stretch; justify-content: stretch; }
.howto-cell-visual .htu-checks-card {
  flex: 1;
  align-self: stretch;
  width: 100%;
  height: 100%;
  flex-direction: column;
  gap: 0.9em;
  padding: 0.55em 0.65em;
  align-items: stretch;
  justify-content: center;
  box-sizing: border-box;
}
.howto-cell-visual .htu-checks-card::before {
  border-width: 0 2.8em 2.8em 0;
}
.howto-cell-visual .htu-checks-card::after {
  border-width: 0 1.55em 1.55em 0;
}
.howto-cell-visual .htu-checks-col {
  display: grid;
  grid-template-columns: 8.5em 1fr;
  align-items: center;
  max-width: none;
  flex: none;
  min-width: 0;
  gap: 8px;
  width: 100%;
}
.howto-cell-visual .htu-check-box,
.howto-cell-visual .htu-type-box { align-self: center; flex-shrink: 0; justify-self: center; }
.howto-cell-visual .htu-checks-label { flex: 1; min-width: 0; text-align: left; }
.howto-cell-visual .htu-check-box { width: 3.2em; height: 3.2em; }
.howto-cell-visual .htu-type-box { width: 8.5em; height: 3em; font-size: .75em; border-width: calc(.26em / .75); }
.howto-cell-cap,
.howto-cell-visual .htu-pdf-text,
.howto-cell-visual .htu-tb-text,
.howto-cell-visual .htu-checks-label,
.howto-cell-visual .htu-popup-text,
.howto-cell-visual .htu-navsim .htu-callout {
  font-size: clamp(10px, 1vw, 12.5px);
  line-height: 1.25;
}
.howto-cell-cap { margin: 0; color: var(--brown-1); text-align: center; flex-shrink: 0; }
.howto-cell-visual .htu-popup-text { max-width: 11em; }
.howto-foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding-top: 4px;
  transform: translateX(clamp(32px, 2.8vw, 44px));
}
.howto-arrow { width: clamp(36px, 4vw, 52px); height: auto; flex-shrink: 0; margin-right: 14px; transform: rotate(90deg); transform-origin: center; transition: opacity .6s ease; }
.howto-arrow.anim-lr { animation: howtoArrowLR 1.1s ease-in-out infinite; }
.howto-arrow.is-gone { opacity: 0; }
@keyframes howtoArrowLR { 0%,100% { transform: rotate(90deg) translateY(-5px);} 50% { transform: rotate(90deg) translateY(3px);} }

/* ---- Tutorial step shell (p5-11) ---- */
.howto-step { align-items: center; justify-content: flex-start; gap: 12px; }
.howto-step-title { font-size: clamp(24px, 2.8vw, 38px); font-weight: 600; color: var(--brown-1); text-align: center; margin-top: 4px; }
.howto-step-card {
  width: min(880px, 94%);
  flex: 1;
  min-height: 0;
  background: #fff;
  border: 3px solid var(--brown-1);
  border-radius: 4px;
  padding: 22px 26px 18px;
  display: flex;
  flex-direction: column;
}
.howto-dots { display: flex; gap: 9px; justify-content: center; margin: 6px 0 12px; }
.howto-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--rose-3); }
.howto-dot.active { background: var(--brown-1); }
.howto-continue {
  align-self: center;
  background: var(--rose-1);
  box-shadow: 0 4px 0 0 #7d4a4a;
  letter-spacing: 1px;
}
.howto-skip {
  background: var(--rose-1);
  color: #fff;
  box-shadow: 0 4px 0 0 #7d4a4a;
  letter-spacing: .5px;
  margin-bottom: 2px;
}

/* ---- Step stage layouts ---- */
.htu-step-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: clamp(20px,4vw,56px); }
.htu-step-stage--row { flex-direction: row; }
.htu-step-stage--col { flex-direction: column; gap: 14px; align-items: stretch; }
.htu-step-stage--col .htu-step-copy { max-width: none; width: fit-content; align-self: center; flex: 0 0 auto; }
.htu-step-stage--demo { flex-direction: row; }
.htu-step-copy { flex: 0 0 auto; max-width: 420px; width: fit-content; }
.htu-copy-lg { font-size: clamp(15px,1.7vw,22px); color: var(--brown-1); line-height: 1.35; margin: 0; }
.htu-copy-head {
  font-size: clamp(16px, 1.8vw, 23px);
  color: var(--brown-1);
  margin: 0;
  align-self: flex-start;
  font-weight: 600;
  white-space: nowrap;
}
.htu-step-stage--row .htu-demo { flex: 1; }
.htu-step-stage--demo .htu-demo { flex: 1; max-width: 760px; }
.htu-step-stage .htu-demo { font-size: clamp(11px,1.25vw,15px); }

/* ---- Shared demo stage + cursor ---- */
.htu-demo { position: relative; display: flex; align-items: center; justify-content: center; }
.htu-cursor { position: absolute; width: 3.4em; z-index: 8; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }

/* ---- Demo: expand window (step 1) ---- */
.htu-demo--window { width: 100%; }
.htu-window { display: flex; align-items: center; justify-content: center; width: 100%; }
.htu-window-box {
  position: relative;
  background: var(--teal-5);
  padding: 2.4em 2.2em;
  max-width: 22em;
  text-align: center;
  animation: pulseScale 1.5s ease-in-out infinite;
}
.htu-window-box p { margin: 0; font-size: 1.05em; color: var(--brown-1); line-height: 1.3; }
.htu-corner { position: absolute; width: 0; height: 0; }
.htu-corner--tl { top: .4em; left: .4em; border-top: .9em solid var(--brown-1); border-right: .9em solid transparent; }
.htu-corner--tr { top: .4em; right: .4em; border-top: .9em solid var(--brown-1); border-left: .9em solid transparent; }
.htu-corner--bl { bottom: .4em; left: .4em; border-bottom: .9em solid var(--brown-1); border-right: .9em solid transparent; }
.htu-corner--br { bottom: .4em; right: .4em; border-bottom: .9em solid var(--brown-1); border-left: .9em solid transparent; }

/* ---- Demo: 3 ways to navigate (step 2) — mock app shell ---- */
.htu-demo--nav { width: 100%; min-height: 20em; }
.htu-navsim {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 40em;
  min-height: 18em;
  background: #fff;
  border: .18em solid var(--brown-1);
  border-radius: .55em;
}

/* LEFT: mini navigation road / menu */
.htu-navsim-road {
  position: relative;
  flex: 0 0 13em;
  background: var(--cream);
  border-right: .14em solid var(--rose-3);
  border-radius: .4em 0 0 .4em;
  padding: .9em .8em;
  display: flex;
  flex-direction: column;
  gap: .9em;
}
.htu-nsr-return { display: flex; align-items: center; gap: .5em; }
.htu-nsr-return-ico {
  flex-shrink: 0;
  background: var(--teal-2);
  border-radius: .4em;
  padding: .35em .45em;
  box-shadow: 0 .14em 0 0 #006e74;
  display: inline-flex;
}
.htu-nsr-return-ico img { width: 2em; height: 2em; object-fit: contain; display: block; }
.htu-nsr-return-label { font-size: .68em; font-weight: 600; color: var(--teal-1); line-height: 1.15; letter-spacing: .02em; }

.htu-nsr-nodes {
  position: relative;
  --road-base: 32%;
  --lane-step: 1.1em;
  display: flex;
  flex-direction: column;
  gap: .7em;
}
.htu-road-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.htu-nsr-node { position: relative; display: flex; align-items: center; gap: .55em; min-height: 2.4em; }
.htu-nsr-dot {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 1.7em; height: 1.7em;
  border-radius: 50%;
  background: #fff;
  border: .2em solid var(--brown-1);
  margin-left: calc(var(--road-base, 40%) - 0.85em + var(--lane, 0) * var(--lane-step, 1.1em));
}
.htu-nsr-node--hub .htu-nsr-dot {
  width: 2.5em; height: 2.5em;
  margin-left: calc(var(--road-base, 40%) - 1.25em + var(--lane, 0) * var(--lane-step, 1.1em));
  overflow: hidden;
  background: var(--g-intro);
  border-color: var(--brown-1);
}
.htu-nsr-node--hub .htu-nsr-dot img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.htu-nsr-label {
  flex: 1;
  min-width: 0;
  margin-left: calc(var(--label-comp, 0) * var(--lane-step, 1.1em));
  font-size: .76em; font-weight: 600; color: var(--brown-1); opacity: .55; line-height: 1.1;
}
.htu-nsr-node.is-current .htu-nsr-label { opacity: 1; }

/* YOU ARE HERE treatment around the current node */
.htu-nsr-node.is-current {
  border: .16em solid var(--brown-1);
  border-radius: .4em;
  padding: 1.7em .5em .5em;
}
.htu-nsr-here-tag {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: var(--brown-1);
  color: #fff;
  font-size: .58em;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
  padding: .35em 0;
  border-radius: .25em .25em 0 0;
}

/* CENTER: blank content stage */
.htu-navsim-stage { flex: 1; background: #fff; }

/* RIGHT: toolbar with BACK / NEXT */
.htu-navsim-tools {
  flex: 0 0 6em;
  background: var(--mauve);
  border-radius: 0 .4em .4em 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6em;
  padding: .8em 0;
}
.htu-nst-ico { width: 1.9em; height: 1.9em; border-radius: 50%; background: #5d3838; border: .14em solid #432626; flex-shrink: 0; }
.htu-navsim-tools .htu-nst-bn.nav-stack {
  margin-top: auto;
  width: 112%;
  margin-left: -6%;
  gap: .35em;
  padding: 0;
}
.htu-navsim-tools .nav-btn {
  width: 100%;
  height: 3.6em;
  font-size: .64em;
  pointer-events: none;
}
.htu-navsim-tools .htu-nst-back {
  align-items: flex-end;
  padding-bottom: 4%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%232e1a1a' d='M43 14 Q50 6 58 14 L95 86 Q96 98 90 98 L10 98 Q5 98 5 86 Z'/%3E%3Cpath fill='%235d3838' d='M43 8 Q50 0 58 8 L95 80 Q96 92 90 92 L10 92 Q5 92 5 80 Z'/%3E%3C/svg%3E");
}
.htu-navsim-tools .htu-nst-next {
  align-items: flex-start;
  padding-top: 4%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%232e1a1a' d='M5 16 Q5 8 10 8 L90 8 Q96 8 95 16 L58 88 Q50 98 43 88 Z'/%3E%3Cpath fill='%235d3838' d='M5 10 Q5 2 10 2 L90 2 Q96 2 95 10 L58 82 Q50 92 43 82 Z'/%3E%3C/svg%3E");
}

/* Each control highlights as the cursor reaches it (phase-locked to the 6s loop). */
.htu-nsr-return-ico { animation: htuNavPulse 6s ease-in-out infinite; animation-delay: .72s; }
.htu-nsr-node.is-current { animation: htuNavPulse 6s ease-in-out infinite; animation-delay: 2.4s; }
.htu-nst-bn { animation: htuNavPulse 6s ease-in-out infinite; animation-delay: 4.08s; }
@keyframes htuNavPulse {
  0%   { box-shadow: 0 0 0 0 rgba(252,136,136,0); }
  3%   { box-shadow: 0 0 0 .4em rgba(252,136,136,.55); }
  11%  { box-shadow: 0 0 0 0 rgba(252,136,136,0); }
  100% { box-shadow: 0 0 0 0 rgba(252,136,136,0); }
}

.htu-callout {
  position: absolute;
  z-index: 7;
  display: flex;
  align-items: flex-start;
  gap: .6em;
  background: #fff;
  border: .16em solid var(--brown-1);
  border-radius: .5em;
  padding: .55em .75em;
  font-size: .8em;
  color: var(--brown-1);
  line-height: 1.25;
  width: 15em;
  box-shadow: none;
  filter: drop-shadow(0 .2em .45em rgba(51,27,27,.18));
  opacity: 0;
  transform: translateX(-.6em);
  overflow: visible;
  --callout-border: .16em;
  --callout-square: .62em;
}
.htu-callout b,
.htu-callout > span { position: relative; z-index: 1; }
.htu-callout--1 { left: 15em; top: 1em; width: 17.5em; animation: htuCallout1 6s ease-in-out infinite; }
.htu-callout--1::before,
.htu-callout--2::before {
  content: "";
  position: absolute;
  left: calc(var(--callout-border) * -0.5);
  top: 1.15em;
  width: var(--callout-square);
  height: var(--callout-square);
  box-sizing: border-box;
  background: #fff;
  border-left: var(--callout-border) solid var(--brown-1);
  border-bottom: var(--callout-border) solid var(--brown-1);
  transform: translate(-50%, -50%) rotate(45deg);
}
.htu-callout--3::before {
  content: "";
  position: absolute;
  right: calc(var(--callout-border) * -0.5);
  top: 50%;
  width: var(--callout-square);
  height: var(--callout-square);
  box-sizing: border-box;
  background: #fff;
  border-top: var(--callout-border) solid var(--brown-1);
  border-right: var(--callout-border) solid var(--brown-1);
  transform: translate(50%, -50%) rotate(45deg);
}
.htu-callout--2 { left: 15em; top: 7.4em; animation: htuCallout2 6s ease-in-out infinite; }
.htu-callout--3 { right: 4.6em; bottom: 1em; animation: htuCallout3 6s ease-in-out infinite; }
.htu-callout b {
  flex-shrink: 0;
  width: 1.6em; height: 1.6em;
  background: var(--brown-1); color: #fff;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .85em;
}
@keyframes htuCallout1 {
  0%, 9%    { opacity: 0; transform: translateX(-.6em); }
  13%, 95%  { opacity: 1; transform: translateX(0); }
  100%      { opacity: 0; transform: translateX(-.6em); }
}
@keyframes htuCallout2 {
  0%, 37%   { opacity: 0; transform: translateX(-.6em); }
  41%, 95%  { opacity: 1; transform: translateX(0); }
  100%      { opacity: 0; transform: translateX(-.6em); }
}
@keyframes htuCallout3 {
  0%, 65%   { opacity: 0; transform: translateX(-.6em); }
  69%, 95%  { opacity: 1; transform: translateX(0); }
  100%      { opacity: 0; transform: translateX(-.6em); }
}
.htu-cursor--nav { left: 1.4em; top: 1.2em; animation: htuNavCursor 6s ease-in-out infinite; }
@keyframes htuNavCursor {
  0%   { left: 18em;   top: 16em;  opacity: 0; }
  4%   { opacity: 1; }
  12%  { left: 1.4em;  top: 1.2em; }
  24%  { left: 1.4em;  top: 1.2em; }
  40%  { left: 1.4em;  top: 7em; }
  52%  { left: 1.4em;  top: 7em; }
  68%  { left: 35.4em; top: 13.4em; }
  82%  { left: 35.4em; top: 13.4em; opacity: 1; }
  92%  { left: 18em;   top: 16em;  opacity: 1; }
  100% { left: 18em;   top: 16em;  opacity: 0; }
}

/* ---- Demo: checkboxes & answer boxes (step 3) ---- */
.htu-demo--checks { width: 100%; }
.htu-checks-card {
  position: relative;
  display: flex; gap: 3em; background: var(--teal-5); padding: 2.4em 2.6em;
  flex-wrap: wrap; justify-content: center;
  overflow: hidden;
}
.htu-checks-card::before,
.htu-checks-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  pointer-events: none;
}
/* Lifted corner — white page beneath */
.htu-checks-card::before {
  z-index: 1;
  border-width: 0 2.4em 2.4em 0;
  border-color: transparent #fff transparent transparent;
}
/* Folded underside */
.htu-checks-card::after {
  z-index: 2;
  border-width: 0 1.35em 1.35em 0;
  border-color: transparent var(--teal-3) transparent transparent;
}
.htu-checks-col { position: relative; display: flex; align-items: center; gap: .8em; max-width: 16em; }
.htu-check-box {
  position: relative; width: 2.6em; height: 2.6em;
  border: .26em solid var(--teal-2); border-radius: .35em;
  flex-shrink: 0; background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.htu-check-tick {
  position: relative; width: .8em; height: 1.5em;
  border: solid var(--teal-1); border-width: 0 .28em .28em 0;
  transform: rotate(45deg) scale(0); transform-origin: center;
  animation: htuTick .4s ease forwards; animation-delay: 1.4s;
}
@keyframes htuTick { to { transform: rotate(45deg) scale(1);} }
.htu-checks-label { font-size: .95em; color: var(--brown-1); line-height: 1.3; }
.htu-type-box {
  width: 7em; height: 2.4em;
  border: calc(.26em / .8) solid var(--teal-2); border-radius: .35em;
  background: #fff; color: var(--teal-2); font-size: .8em;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: .05em; text-transform: uppercase; flex-shrink: 0;
}
.htu-cursor--check { left: 1.2em; top: 2.4em; animation: htuCheckCursor 2.4s ease-in-out forwards; }
@keyframes htuCheckCursor {
  0% { left: 5em; top: 6em; opacity: 0; }
  20% { opacity: 1; }
  60% { left: .6em; top: 1.6em; }
  70% { transform: scale(.85); }
  80% { transform: scale(1); }
  100% { left: .6em; top: 1.6em; opacity: 1; }
}

/* ---- Demo: pop-ups (step 4) ---- */
.htu-demo--popup { width: 100%; }
.htu-popup-card {
  position: relative;
  background: var(--teal-5);
  padding: 0.9em 1em 1.2em;
  min-width: 14em;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 0.35em 0.5em;
  transform: scale(.7); opacity: 0;
  animation: htuPopupIn .5s ease forwards;
}
.htu-popup-text {
  grid-column: 1; grid-row: 1;
  font-size: 1em; color: var(--brown-1); max-width: 12em;
}
.htu-popup-x {
  grid-column: 2; grid-row: 1;
  flex-shrink: 0;
  width: 2em; height: 2em; border-radius: 50%;
  background: var(--olive-3); border: .18em solid var(--olive-1);
  color: var(--brown-1); font-size: 1.1em; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  animation: htuPopupBtnPulse 2.6s ease-in-out infinite;
  animation-delay: .5s;
}
@keyframes htuPopupIn { to { transform: scale(1); opacity: 1;} }
@keyframes htuPopupBtnPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(252,136,136,0); }
  50% { transform: scale(1.12); box-shadow: 0 0 0 .35em rgba(252,136,136,.55); }
}

/* ---- Demo: PDF & email (step 5) ---- */
.htu-demo--pdf { width: 100%; flex-direction: column; gap: 1.6em; align-items: stretch; }
.htu-pdf-row { display: flex; align-items: center; gap: 1.4em; }
.htu-pdf-tile { flex-shrink: 0; width: 4.4em; height: 4.4em; display: inline-flex; align-items: center; justify-content: center; animation: htuPdfGlow 2.6s ease-in-out infinite; }
.htu-pdf-row:nth-child(2) .htu-pdf-tile { animation-delay: 1.3s; }
.htu-pdf-tile img { width: 100%; height: 100%; object-fit: contain; }
.htu-pdf-text { font-size: clamp(14px, 1.55vw, 19px); color: var(--brown-1); line-height: 1.35; }
@keyframes htuPdfGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(252,136,136,0)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 .5em rgba(252,136,136,.9)); transform: scale(1.06); }
}

/* ---- Demo: toolbar & home (step 6) ---- */
.htu-demo--toolbar { width: 100%; gap: 2.4em; align-items: center; justify-content: center; }
.htu-tb-home, .htu-tb-stack { display: flex; flex-direction: column; align-items: center; gap: .7em; text-align: center; max-width: 13em; }
.htu-tb-icons { display: flex; flex-direction: column; gap: .8em; }
.htu-tb-ico { width: 3.6em; height: 3.6em; border-radius: 50%; background: var(--brown-1); display: inline-flex; align-items: center; justify-content: center; animation: htuTbGlow 2.6s ease-in-out infinite; }
.htu-tb-ico img { width: 64%; height: 64%; object-fit: contain; }
.htu-tb-icons .htu-tb-ico:nth-child(1) { animation-delay: .6s; }
.htu-tb-icons .htu-tb-ico:nth-child(2) { animation-delay: 1s; }
.htu-tb-icons .htu-tb-ico:nth-child(3) { animation-delay: 1.4s; }
.htu-tb-text { font-size: clamp(14px, 1.55vw, 19px); color: var(--brown-1); line-height: 1.35; }
.htu-tb-divider { width: .16em; align-self: stretch; background: var(--rose-3); }
@keyframes htuTbGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(252,136,136,0); transform: scale(1); }
  50% { box-shadow: 0 0 0 .4em rgba(252,136,136,.6); transform: scale(1.08); }
}

/* ---- Static (overview) freeze: show end states, no motion ---- */
.is-static .htu-demo * { animation: none !important; }
.is-static .htu-cursor { display: none !important; }
.is-static .htu-callout { opacity: 1 !important; transform: none !important; }
.is-static .htu-nsr-return-ico, .is-static .htu-nsr-node.is-current, .is-static .htu-nst-bn { box-shadow: none !important; transform: none !important; }
.is-static .htu-window-box { animation: none !important; }
.is-static .htu-check-tick { transform: rotate(45deg) scale(1) !important; }
.is-static .htu-popup-card { transform: scale(1) !important; opacity: 1 !important; }

/* =========================================================
   WHAT IS F-ILD (tabs)
   ========================================================= */
.tab-row { display: flex; gap: 30px; justify-content: center; align-items: flex-start; margin: 6px 0 14px; flex-wrap: wrap; }
.lung-instr { text-align: center; margin: 0 0 6px; }

/* Tab buttons row with horizontal connecting line behind the circles */
.lung-tabs-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 600px;
  margin: 0 auto;
}
.lung-tabs-row::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 16.67%;
  right: 16.67%;
  height: 3px;
  background: var(--brown-1);
  z-index: 0;
}
.lung-tab { background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; z-index: 1; cursor: pointer; }
.lung-tab .num {
  position: relative;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--rose-1); color: #fff; font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid transparent;
  box-shadow: 0 3px 0 0 #8a6464;
}
.lung-tab.active .num {
  background: var(--teal-1);
  border-color: var(--teal-3);
  box-shadow: 0 3px 0 0 #006e74;
}
.lung-tab .tlabel { font-weight: 500; font-size: clamp(12px,1.2vw,15px); color: var(--brown-1); }
.lung-tab.visited .num::after {
  content:""; position:absolute; right:-10px; top:-10px; width:18px; height:18px; border-radius:50%;
  background: url("assets/Asset75.svg") center/cover no-repeat; border:2px solid #fff;
  z-index: 2;
}
.lung-fig-slot .lung-arrow {
  position: absolute;
  top: 2px;
  left: 50%;
  width: clamp(28px, 3.6vw, 46px);
  z-index: 6;
  pointer-events: none;
  transition: opacity .5s ease;
  animation: lungArrowUD 1.2s ease-in-out infinite;
}
.lung-fig-slot .lung-arrow--tab3 {
  left: calc(50% + min(200px, 33.333%));
}
.lung-arrow.is-gone { opacity: 0; visibility: hidden; }

/* Layout: lung-body and types-box side by side */
.lung-layout {
  display: flex;
  gap: 14px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: auto;
}

/* Body: nav row, then person+figure, then body text */
.lung-body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "nav"
    "fig"
    "text";
  gap: 4px 14px;
  align-content: start;
  align-items: stretch;
  min-height: auto;
  min-width: 0;
  background: var(--cream);
  padding: 14px 16px;
  box-sizing: border-box;
}
.lung-nav { grid-area: nav; }
.lung-nav .instruction { margin: 0 0 6px; }

.lung-fig-slot {
  grid-area: fig;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  height: clamp(240px, 28vh, 320px);
  align-self: start;
  margin-top: 10px;
}
.lung-fig-slot .lung-fig {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  display: block;
}
@keyframes lungArrowUD {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-9px); }
}

.lung-text {
  grid-area: text;
  min-width: 0;
}
.types-box { background: var(--coral-3); border-radius: var(--radius-sm); padding: 14px 16px; font-size: clamp(12px,1.2vw,15px); box-sizing: border-box; }
.lung-layout .types-box {
  flex: 0 0 clamp(168px,22%,240px);
  border-radius: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100%;
}

/* =========================================================
   FLIP CARDS
   ========================================================= */
.flip-grid {
  --flip-row-h: clamp(240px, 28vh, 300px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.flip-card {
  perspective: 1200px;
  height: 100%;
  min-height: 0;
  width: 100%;
  cursor: pointer;
}
.flip-inner { position: relative; width: 100%; height: 100%; transition: transform .6s; transform-style: preserve-3d; }
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  box-sizing: border-box;
  padding: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px;
}
.flip-front { background: var(--teal-3); }
.flip-card.viewed .flip-front::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: url("assets/Asset75.svg") center/cover no-repeat;
  z-index: 2;
  pointer-events: none;
}
.flip-front img { width: clamp(60px,7vw,92px); }
.flip-front .ftitle { font-weight: 700; font-size: clamp(13px,1.3vw,17px); }
.flip-back {
  background: #ffc7c7;
  border: 3px solid #a36766;
  transform: rotateY(180deg);
  align-items: flex-start;
  justify-content: flex-start;
  overflow: hidden;
  padding: 12px 14px;
  text-align: left;
}
.flip-back .ftitle {
  font-weight: 700;
  margin-bottom: 4px;
  width: 100%;
  font-size: clamp(13px, 1.3vw, 16.5px);
  flex-shrink: 0;
}
.flip-back .body-text {
  font-size: clamp(11px, 1.05vw, 13.5px);
  line-height: 1.32;
  width: 100%;
  text-align: left;
}
.flip-back .body-text ul { margin: 2px 0 6px; padding-left: 18px; }
.flip-back .body-text li { margin: 1px 0; }
.flip-back .body-text ul ul { margin: 2px 0 0; }
.flip-card.glow .flip-inner { animation: flipGlowPulse 1.6s ease-in-out infinite; }

/* =========================================================
   PEOPLE SCENE
   ========================================================= */
.scene-wrap {
  position: relative;
  flex: 0 0 auto;
  align-self: center;
  width: 100%;
  aspect-ratio: 1415.5 / 794.5;
  max-height: 100%;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--teal-5);
}
.scene-bg { width: 100%; height: 100%; object-fit: fill; position: absolute; inset: 0; }
.scene-people { position: absolute; inset: 0; padding: 0; }
.person-btn {
  background: none;
  border: none;
  padding: 0;
  position: absolute;
  bottom: 3%;
  transform: translateX(-50%);
  transform-origin: bottom center;
  transition: transform .15s;
}
.person-btn img { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 0 transparent); }
.person-btn[data-i="0"] { left: 26.5%; width: 12.6%; }
.person-btn[data-i="1"] { left: 47.3%; width: 22.5%; }
.person-btn[data-i="2"] { left: 76.2%; width: 26%; }
.person-btn.glow img { animation: glowDrop 1.6s ease-in-out infinite; }
.person-btn:hover { transform: translateX(-50%) translateY(-4px); }
.person-btn.viewed::after {
  content:""; position:absolute; right:6px; top:6px; width:26px; height:26px; border-radius:50%;
  background: url("assets/Asset75.svg") center/cover no-repeat;
}
.person-btn.viewed[data-i="0"]::after { right: 32px; }
.person-btn.viewed[data-i="1"]::after { top: 32px; right: 28px; }
.person-btn.viewed[data-i="2"]::after { top: 34px; right: 32px; }
.support-panel {
  margin-top: 14px; background: var(--teal-5); border: 2px solid var(--teal-2); border-radius: var(--radius-sm);
  padding: 14px 18px; font-size: clamp(12px,1.2vw,15px); min-height: 60px;
}
/* Overlaid pop-up modals for the people scene (p37) */
.support-pop {
  position: absolute;
  top: 2.5%;
  width: 32%;
  background: #fff;
  border: 2px solid var(--teal-2);
  border-radius: 0;
  padding: 14px 34px 14px 16px;
  z-index: 6;
  box-shadow: 0 8px 20px rgba(51,27,27,.25);
  font-size: clamp(10px,1.05vw,13px);
  animation: bubbleIn .3s ease forwards;
}
.support-pop .body-text { font-size: inherit; }
.support-pop .body-text ul { margin: 0; padding-left: 18px; }
.support-pop-close {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--olive-1); background: var(--olive-3);
  color: var(--brown-1); cursor: pointer; z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0;
  line-height: 0;
}
.support-pop-close::after {
  content: "×";
  font: 500 16px/1 var(--ff);
  color: var(--brown-1);
}
.support-pop-tail {
  position: absolute; bottom: -15px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 15px solid #fff;
  filter: drop-shadow(0 2px 1px rgba(51,27,27,.12));
}
.support-pop-tail--right {
  width: 26px;
  height: 15px;
  background: #fff;
  border: none;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  transform: translateX(-100%);
}
.support-pop-tail--left {
  width: 26px;
  height: 15px;
  background: #fff;
  border: none;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  transform: translateX(0);
}

/* =========================================================
   SDM GOALS (Asset22 backdrop + free-positioned boxes)
   ========================================================= */
.goals-card { padding-bottom: 0; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.goals-stage {
  position: relative;
  flex: 0 0 auto;
  align-self: center;
  width: 100%;
  aspect-ratio: 1404.2 / 864.2;
  max-height: 100%;
  margin: 6px -26px 0;
  overflow: hidden;
}
.goals-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.goals-bg > img,
.goals-bg > svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
}
/* Inlined Asset22 layers fade in alongside their numbered box */
.goals-bg .goal-layer {
  opacity: 0;
  transition: opacity .6s ease;
}
.goals-bg .goal-layer.reveal { opacity: 1; }
.goal-box {
  position: absolute;
  width: 30%;
  background: var(--coral-3, #ffc7c7);
  border-radius: 0;
  padding: 12px 14px;
  font-size: clamp(10px,1.1vw,14px);
  line-height: 1.35;
  color: var(--brown-1);
  opacity: 0;
  transform: translateY(8px);
}
.goal-box.show { animation: bubbleIn .5s forwards; }
.goal-num {
  position: absolute; top: -12px; left: -12px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brown-1); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.goal-text { display: block; }

/* =========================================================
   REVIEWED CONTENT (embedded overall map)
   ========================================================= */
.review-map-instr { text-align: center; margin: 0 0 8px; }
.review-map {
  margin: 4px 0 8px;
  border-radius: var(--radius-sm);
  overflow: visible;
  background: var(--cream);
}
.review-map .map-canvas {
  height: clamp(440px, 58vh, 600px);
  flex: none;
  margin-top: 0;
  padding: 8px 16px 32px;
  box-sizing: border-box;
  overflow: visible;
}
.review-survey-cta {
  text-align: center;
  margin-top: 12px;
}
/* Scale-down overrides for embedded map */
.review-map .map-node {
  width: clamp(22px, 2.5vw, 32px);
  height: clamp(22px, 2.5vw, 32px);
}
.review-map .map-node.hub {
  width: clamp(42px, 4.6vw, 58px);
  height: clamp(42px, 4.6vw, 58px);
}
.review-map .map-dot {
  border-width: 3px;
}
.review-map .map-label {
  font-size: clamp(7px, 0.72vw, 9.5px);
  max-width: clamp(56px, 6.5vw, 84px);
}
.review-map .map-label--wide {
  max-width: clamp(74px, 8.5vw, 108px);
}
.review-map .map-label--stack {
  max-width: none;
}
.review-map .map-node.hub.visited .map-dot::after {
  width: clamp(13px, 1.5vw, 17px);
  height: clamp(13px, 1.5vw, 17px);
  right: -4px;
  top: -4px;
}

/* =========================================================
   CHECK BACK (speech bubbles + person, p51)
   ========================================================= */
.checkback-card {
  overflow: hidden;
  padding-bottom: 0;
}
.checkback-card .lede.lede-light { font-weight: 400; }
.checkback-row { display: flex; gap: clamp(12px,3vw,52px); justify-content: center; align-items: flex-end; margin-top: 14px; flex-wrap: nowrap; }
.checkback-item { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 300px; min-width: 0; flex: 0 1 auto; }
.checkback-label { font-weight: 400; text-align: center; color: var(--brown-1); font-size: clamp(14px,1.5vw,19px); margin: 0; line-height: 1.2; }
.checkback-bubble {
  position: relative; background: var(--purple-3); border-radius: 18px;
  padding: clamp(12px,2.2vw,22px) clamp(14px,2.8vw,28px); display: flex; align-items: center; justify-content: center;
}
.checkback-bubble img { width: clamp(80px, 14vw, 200px); display: block; }
.checkback-bubble::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 18px;
  background: var(--purple-3);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.checkback-item:nth-child(2) .checkback-bubble::after {
  width: 0;
  height: 0;
  background: none;
  clip-path: none;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 18px solid var(--purple-3);
}
.checkback-item:nth-child(3) .checkback-bubble::after {
  width: 28px;
  height: 18px;
  background: var(--purple-3);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.checkback-person {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-top: auto;
  margin-bottom: 0;
  line-height: 0;
  width: 100%;
}
.checkback-person img {
  height: clamp(280px, 38vh, 400px);
  width: auto;
  max-width: none;
  display: block;
  object-fit: contain;
  object-position: bottom center;
}

/* =========================================================
   HCP / SPEECH BUBBLES (revisiting)
   ========================================================= */
.revisit-stage { position: relative; flex: 1; min-height: 360px; }
.speech {
  background: var(--olive-4); color: var(--brown-1); border-radius: 16px;
  padding: 12px 16px; font-size: clamp(12px,1.2vw,15px); position: relative; opacity: 0; transform: translateY(8px);
}
.speech.show { animation: bubbleIn .5s forwards; }
.revisit-top {
  margin: 0 0 10px;
  align-self: center;
  width: min(100%, 900px);
  container-type: inline-size;
}
.revisit-qa-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2.5cqw;
  width: 100%;
  overflow: visible;
}
.revisit-qa-q {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85cqw;
  width: fit-content;
  max-width: 100%;
  overflow: visible;
}
.revisit-qa-q .instruction {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  font-size: 1.5cqw;
  opacity: 0;
  transform: translateY(8px);
}
.revisit-qa-q .instruction.show {
  animation: bubbleIn .5s forwards;
}
.revisit-q-head { font-weight: 700; text-align: left; margin: 0 0 8px; }
.speech.ask {
  display: block;
  margin: 0;
  position: relative;
  width: fit-content;
  max-width: clamp(520px, 68vw, 700px);
  padding: 10px 14px;
  font-size: clamp(11px, 1.05vw, 13px);
}
.speech.ask .body-text { font-size: inherit; }
.speech.ask::after {
  content: ""; position: absolute; bottom: -16px; left: 14.2cqw;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 14px solid transparent; border-right: 14px solid transparent;
  border-top: 18px solid var(--olive-4);
}
.speech.q { display: inline-block; font-weight: 700; }
.speech.a { display: inline-block; font-weight: 700; background: var(--olive-4); }
.speech.reply { display: block; background: var(--olive-2); color: #fff; font-weight: 600; max-width: 34cqw; font-size: 1.3cqw; padding: 1.2cqw 1.6cqw; }
#bubble4.speech.reply {
  position: relative;
  overflow: visible;
}
#bubble4.speech.reply::after {
  content: "";
  position: absolute;
  left: -1.05cqw;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 0.95cqw solid transparent;
  border-bottom: 0.95cqw solid transparent;
  border-right: 1.16cqw solid var(--olive-2);
}
.revisit-scene {
  display: grid;
  grid-template-columns: minmax(0,0.9fr) minmax(0,1.1fr) minmax(0,1.1fr);
  align-items: stretch;
  gap: 10px;
  flex: 0 0 auto;
  align-self: center;
  width: 100%;
  max-width: min(100%, 900px);
  aspect-ratio: 1.9 / 1;
  max-height: 100%;
  min-height: 0;
  container-type: inline-size;
}
#bubble2.speech.q,
#bubble3.speech.a {
  position: relative;
  min-height: 4.7cqw;
  padding: 1.05cqw 1.5cqw;
  font-size: 1.3cqw;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  overflow: visible;
}
#bubble2.speech.q::after {
  content: "";
  position: absolute;
  left: -1.05cqw;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 0.95cqw solid transparent;
  border-bottom: 0.95cqw solid transparent;
  border-right: 1.16cqw solid var(--olive-4);
}
#bubble3.speech.a {
  background: var(--olive-3);
  text-align: center;
  min-width: 5.7cqw;
}
#bubble3.speech.a::after {
  content: "";
  position: absolute;
  right: -1.05cqw;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 0.95cqw solid transparent;
  border-bottom: 0.95cqw solid transparent;
  border-left: 1.16cqw solid var(--olive-3);
}
.revisit-person { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; min-height: 0; }
.revisit-bubbles { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 1.26cqw; width: 100%; overflow: visible; }
.revisit-hcp {
  background: none; border: none; position: relative; padding: 0; cursor: pointer;
  flex: 1; align-self: stretch; display: flex; align-items: flex-end; justify-content: center;
  min-height: 0; width: 100%;
}
.revisit-doctor { transform: translateY(1.5cqw); }
.revisit-doctor .revisit-hcp img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
}
.revisit-hcp.glow img { animation: glowDrop 1.6s ease-in-out infinite; }
.revisit-arrow {
  position: absolute; right: -4%; top: 48%;
  width: 6.9cqw !important; height: auto;
  transform: rotate(-90deg); transform-origin: center; z-index: 4;
  opacity: 0;
}
.revisit-arrow.show {
  animation: arrowFadeIn .5s forwards, arrowLeftNudge 1.4s ease-in-out .5s infinite;
}
.revisit-patient {
  justify-content: flex-end;
  align-items: flex-end;
  width: 100%;
  min-height: 0;
}
.revisit-patient-fig {
  position: relative;
  align-self: stretch;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  margin-right: -2.7cqw;
  line-height: 0;
  transform: translateY(1.5cqw);
  min-height: 0;
  width: 100%;
}
.revisit-patient-fig img {
  height: 100%;
  width: auto;
  max-width: none;
  display: block;
  object-fit: contain;
  object-position: bottom right;
  transform: translateX(26%);
}

/* =========================================================
   CHECKLIST / TYPE-IN
   ========================================================= */
.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 16px 32px;
  margin: 8px 0;
  flex: 1;
  min-height: 0;
}
.check-grid--inactive {
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}
.check-col { display: flex; flex-direction: column; min-height: 0; }
.check-col-left,
.check-col-right { justify-content: space-between; gap: clamp(6px, 0.9vh, 10px); }
.check-item { display: flex; gap: 10px; align-items: flex-start; }
.check-item-rb { align-items: center; }
.check-item-rb-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  flex: 1;
  min-width: 0;
  align-items: center;
}
.check-item-rb-row .check-label {
  min-width: 0;
  padding-top: 0;
}
.rb-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}
.rb-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
}
.rb-pills .toggle-pill {
  border-radius: 7px;
  margin-right: 0;
  padding: 4px 12px;
}
.rb-controls .type-box {
  width: auto;
  flex: 1;
  min-width: 110px;
  padding: 4px 10px;
  line-height: 1.2;
  font-size: 13px;
  border-radius: 4px;
}
.rb-hint {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: clamp(10px, 1vw, 12px);
}
.check-item-other {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.check-item-other .check-label { padding-top: 0; }
.check-box {
  width: 30px; height: 30px; flex-shrink: 0; border: 3px solid var(--teal-2); border-radius: 6px;
  background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.check-box.checked { background: var(--teal-3); }
.check-box.checked::after {
  content: "";
  width: 8px;
  height: 14px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}
.check-box.glow { animation: glowPulse 1.6s ease-in-out infinite; }
.check-label { font-size: clamp(12px,1.2vw,15px); font-weight: 600; padding-top: 0; line-height: 1.25; }
.type-box {
  width: 100%; border: 2px solid var(--teal-2); border-radius: var(--radius-sm); background: var(--teal-5);
  padding: 10px 12px; font-family: var(--ff); font-size: 14px; color: var(--brown-1); resize: none;
}
.type-box::placeholder { color: var(--teal-2); text-transform: uppercase; letter-spacing: .5px; }
.toggle-pill {
  border: none; background: var(--teal-2); color: #fff; border-radius: 14px; padding: 5px 14px;
  font-weight: 600; font-size: 13px; margin-right: 6px;
}
.toggle-pill.on { background: var(--teal-1); box-shadow: 0 0 0 2px var(--olive-4); }
.goals-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 8px 0;
  flex: 1;
  min-height: 0;
}
.goals-body--inactive {
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}
.goals-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30%;
  column-gap: 32px;
  row-gap: 16px;
  align-items: stretch;
}
.goals-list {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.goal-row { display: flex; align-items: center; }
.goal-row .goal-in { width: 100%; }
.goals-submit {
  grid-column: 1;
  grid-row: 2;
  justify-self: center;
}
.goals-pop-actions {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
}
.goals-instruction {
  text-align: center;
}
.goals-thank-head {
  display: block;
  color: var(--teal-1);
  font-weight: 700;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.goals-examples {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  margin: 0;
  background: var(--teal-5);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 28px;
}
.goal-tag { width: 70px; font-weight: 700; color: var(--brown-1); }

/* =========================================================
   TABLE (decision points)
   ========================================================= */
.dp-table { width: 100%; border-collapse: collapse; font-size: clamp(10px, 1.05vw, 13px); }
.dp-table th {
  background: var(--mauve); color: #fff; text-align: left; padding: 10px 14px; font-weight: 600;
  border: 2px solid #fff;
}
.dp-table th .th-inner { display: flex; align-items: center; gap: 8px; }
.dp-table th img { width: 30px; }
.dp-table td {
  padding: 8px 14px;
  background: var(--cream);
  border: 2px solid #fff;
}
.dp-table td:first-child { text-align: right; font-weight: 600; width: 32%; }

/* =========================================================
   TIMELINE (touchpoints)
   ========================================================= */
.tl-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.tl-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 18px;
  align-items: stretch;
  position: relative;
  flex: 1;
  align-content: center;
  font-size: clamp(12px, 1.2vw, 16px);
}
.tl-col {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  min-width: 0;
}
.tl-card {
  width: 100%;
  justify-self: stretch;
  align-self: stretch;
  background: var(--olive-4); border-radius: var(--radius-sm); padding: 16px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px;
  opacity: 0;
}
.tl-card.show { animation: fadeUp .5s forwards; }
.tl-ico { width: 78px; height: 78px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; }
.tl-ico img { width: 70%; }
.tl-stem {
  width: 3px;
  height: 20px;
  flex-shrink: 0;
  background: var(--olive-4);
  justify-self: center;
  opacity: 0;
}
.tl-card.show + .tl-stem { animation: fadeUp .5s forwards; }
.tl-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0;
  z-index: 0;
  pointer-events: none;
}
.tl-line::before {
  content: "";
  position: absolute;
  left: var(--tl-rail-left, calc(100% / 8));
  right: var(--tl-rail-right, 10px);
  top: 0;
  transform: translateY(-50%);
  height: 4px;
  background: #918647;
}
.tl-line::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 0;
  height: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 14px solid #918647;
  transform: translateY(-50%);
}
.tl-point { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; width: auto; justify-self: center; opacity: 0; }
.tl-card.show ~ .tl-point { animation: fadeUp .5s forwards; }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--olive-3); position: relative; z-index: 1; }
.tl-label {
  font-weight: 500;
  font-size: 1em;
  line-height: 1.2;
  text-align: center;
}

/* =========================================================
   NAV MORPH (map <-> road transition)
   ========================================================= */
.nav-morph-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  overflow: hidden;
}
.nav-morph-ghost {
  position: fixed;
  box-sizing: border-box;
  will-change: transform, opacity;
}
.nav-morph-ghost img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================================================
   OVERALL MAP
   ========================================================= */
.map-page { padding: 6px 0 12px; display: flex; flex-direction: column; height: 100%; box-sizing: border-box; }
.map-head { text-align: center; flex-shrink: 0; padding: 0 16px; }
.map-head h2 { font-size: clamp(19px, 2.3vw, 32px); font-weight: 600; margin: 2px 0; color: var(--brown-1); }
.map-head .instruction { margin: 2px 0 0; }

.map-canvas { position: relative; flex: 1; min-height: 0; width: 100%; margin-top: 4px; padding: 10px 0 14px; box-sizing: border-box; overflow: visible; background: var(--cream); }
.map-svg { position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; overflow: visible; }
.map-page.map-intro-active .map-node { pointer-events: none; }

.map-node {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 1;
  background: none; border: none; padding: 0;
  width: clamp(38px, 4.2vw, 54px);
  height: clamp(38px, 4.2vw, 54px);
  cursor: pointer;
}
.map-node.hub { width: clamp(72px, 7.5vw, 96px); height: clamp(72px, 7.5vw, 96px); overflow: visible; }
.map-node[data-id="questions-ask"] { z-index: 2; }
.map-dot {
  width: 100%; height: 100%; box-sizing: border-box;
  border-radius: 50%; background: var(--cream); border: 4px solid var(--brown-1);
  display: flex; align-items: center; justify-content: center; position: relative;
  transition: transform .15s;
}
.map-node:hover .map-dot { transform: scale(1.07); }
.map-node.hub .map-dot { overflow: hidden; border: none; }
.map-node.hub:not(.visited) .map-dot {
  animation: mapHubPulse 2.6s ease-in-out infinite;
}
.map-page.map-intro-active .map-node.hub .map-dot,
.map-node.hub:hover .map-dot { animation: none; }
@keyframes mapHubPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(252, 136, 136, 0);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 0 10px rgba(252, 136, 136, .42);
  }
}
.map-node.hub.visited .map-dot { overflow: visible; }
.map-node.hub .map-dot img { width: 100%; height: 100%; object-fit: cover; }
.map-node[data-id="resources"] .map-dot img,
.map-node[data-id="survey"] .map-dot img { transform: scale(1.05); }
.map-node.visited .map-dot::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  box-sizing: border-box;
}
.map-node:not(.hub).visited .map-dot {
  background: transparent;
}
.map-node:not(.hub).visited .map-dot::after {
  inset: 0;
  width: 100%;
  height: 100%;
  background: url("assets/Asset75.svg") center/cover no-repeat;
  border: none;
}
.map-node.hub.visited .map-dot::after {
  inset: auto;
  left: auto;
  bottom: auto;
  right: -5px;
  top: -5px;
  width: clamp(24px, 2.8vw, 30px);
  height: clamp(24px, 2.8vw, 30px);
  background: url("assets/Asset75.svg") center/cover no-repeat;
  border: none;
  z-index: 3;
}
.map-label {
  position: absolute;
  display: inline-block;
  font-size: clamp(10px, 1vw, 13px); font-weight: 600; line-height: 1.15;
  color: var(--brown-1);
  width: max-content;
  max-width: clamp(100px, 11vw, 140px);
  white-space: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.map-label--wide {
  max-width: clamp(130px, 14vw, 180px);
}
.map-label--stack {
  width: max-content;
  max-width: none;
}
.map-node[data-id="sdm-goals"] .map-label {
  width: max-content;
  max-width: none;
}
.map-node.hub .map-label { font-weight: 700; }
.map-node[data-lp="below"] .map-label { top: calc(100% + 5px); left: 50%; transform: translateX(-50%); text-align: center; }
.map-node[data-lp="above"] .map-label { bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%); text-align: center; }
.map-node[data-lp="left"]  .map-label { right: calc(100% + 8px); top: 50%; transform: translateY(-50%); text-align: right; }
.map-node[data-lp="right"] .map-label { left: calc(100% + 8px); top: 50%; transform: translateY(-50%); text-align: left; }

/* =========================================================
   GLOSSARY / REFERENCES / POPUPS
   ========================================================= */
.popup-overlay {
  position: fixed; inset: 0; background: rgba(51,27,27,.45);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 24px;
}
.popup-overlay[hidden] { display: none; }
#popupGeneric.popup-overlay--aligned {
  inset: auto;
  align-items: center;
  justify-content: center;
  background: rgba(51, 27, 27, .45);
}
#popupGeneric.popup-overlay--aligned .popup-panel {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(51, 27, 27, .18);
}
.popup-panel {
  background: var(--cream); border: var(--card-border); border-radius: var(--radius);
  max-width: 560px; width: 100%; max-height: 86vh; overflow: hidden; position: relative;
  display: flex; flex-direction: column;
}
.popup-panel.popup-wide { max-width: 1000px; }
.popup-close {
  position: absolute; right: 12px; top: 10px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--olive-1);
  background: var(--olive-3); color: var(--brown-1); font-size: 22px; line-height: 1;
}
.popup-body { overflow-y: auto; padding: 24px 28px; }
.popup-body h3 { margin: 0 0 14px; padding-right: 44px; color: var(--brown-1); font-size: clamp(18px,2vw,26px); }
/* How-to-Use Guide popup shows the same visual grid as the howto-overview page. */
#popupHelp .popup-panel { max-width: 1160px; width: 96vw; }
#helpBody .howto-grid--help { height: min(74vh, 600px); margin: 6px 0 0; }
/* Header pinned flush to the very top of the scroll area so content can't show
   through above it (the body's own top padding is removed for the glossary). */
#glossaryBody, #refsBody { padding-top: 0; }
#glossaryBody h3, #refsBody h3 {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--cream);
  margin: 0 -28px 14px;
  padding: 24px 72px 14px 28px;
}

/* Glossary and References popups share a distinct background tint. */
#popupGlossary .popup-panel,
#popupRefs .popup-panel { background: #a36666; }
#glossaryBody h3,
#refsBody h3 { background: #a36666; color: #fff; font-weight: 500; }
#refsBody { color: #fff; }
#refsBody .ref-list a { color: #ceeae4; }
#refsBody p { color: rgba(255, 255, 255, .85); }

/* Match the decision-points table styling. */
.gloss-table { width: 100%; border-collapse: collapse; font-size: clamp(10px, 1.05vw, 13px); }
.gloss-table td {
  padding: 8px 14px;
  border: 2px solid #cc9696;
  vertical-align: top;
  line-height: 1.4;
}
.gloss-table tr:nth-child(odd) td { background: #fff1e3; }
.gloss-table tr:nth-child(even) td { background: #fff; }
.gloss-term { text-align: right; font-weight: 600; width: 32%; padding-right: 14px; color: var(--brown-1); }

.ref-list { font-size: clamp(11px,1.15vw,14px); line-height: 1.5; padding-left: 22px; }
.ref-list li { margin-bottom: 8px; }
.ref-list a { color: var(--teal-1); word-break: break-all; }

/* Resources */
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 30px; margin-top: 10px; }
.res-item { display: flex; gap: 14px; align-items: flex-start; }
.res-btn { background: none; border: none; padding: 0; flex-shrink: 0; }
.res-btn img { width: clamp(60px,7vw,92px); }
.res-text { font-size: clamp(12px,1.2vw,15px); }

/* =========================================================
   PROMPT ARROWS / ANIMATIONS
   ========================================================= */
.prompt-arrow { position: absolute; width: 60px; z-index: 5; pointer-events: none; }
.anim-lr { animation: arrowLR 1.1s ease-in-out infinite; }
.anim-ud { animation: arrowUD 1.1s ease-in-out infinite; }
.fade-out-soon { animation: fadeOutDelay 4s forwards; }

.scroll-hint {
  position: sticky; bottom: 6px; margin: 8px auto 0; width: max-content;
  background: var(--teal-2); color: #fff; padding: 6px 16px; border-radius: 14px; font-weight: 600; font-size: 13px;
  animation: arrowUD 1.2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(252,136,136,.0); }
  50% { box-shadow: 0 0 0 5px rgba(252,136,136,.55); }
}
@keyframes flipGlowPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(35, 148, 156, 0); }
  50% { box-shadow: 0 0 0 5px rgba(35, 148, 156, 0.55); }
}
@keyframes glowDrop {
  0%,100% { filter: drop-shadow(0 0 0 rgba(252,136,136,0)); }
  50% { filter: drop-shadow(0 0 10px rgba(252,136,136,.85)); }
}
@keyframes arrowLR { 0%,100% { transform: translateX(-6px) translateY(-50%);} 50% { transform: translateX(6px) translateY(-50%);} }
@keyframes arrowLeftNudge { 0%,100% { transform: rotate(-90deg) translateY(-6px);} 50% { transform: rotate(-90deg) translateY(6px);} }
@keyframes arrowFadeIn {
  from { opacity: 0; transform: rotate(-90deg) translateY(-5px); }
  to { opacity: 1; transform: rotate(-90deg) translateY(0); }
}
@keyframes arrowUD { 0%,100% { transform: translateY(-5px);} 50% { transform: translateY(5px);} }
@keyframes pulseScale { 0%,100% { transform: scale(1);} 50% { transform: scale(1.04);} }
@keyframes bubbleIn { to { opacity: 1; transform: translateY(0);} }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0);} }
@keyframes fadeOutDelay { 0%,70% { opacity: 1;} 100% { opacity: 0; visibility: hidden;} }

/* =========================================================
   PDF RENDER PAGES (off-screen + print)
   ========================================================= */
#pdfStage { position: fixed; left: -9999px; top: 0; }
.pdf-page {
  width: 794px; min-height: 1123px; background: #fff; color: var(--brown-1);
  font-family: var(--ff); box-sizing: border-box;
  display: flex; flex-direction: column;
  /* Non-zero letter-spacing forces html2canvas to render text per-character,
     which advances correctly across spaces. With 0 spacing it renders
     word-by-word and drops inter-word spaces in long/wrapping text. */
  letter-spacing: 0.01px;
}
.pdf-banner, .pdf-footer { display: block; width: 100%; height: auto; }
.pdf-footer { margin-top: auto; }
.pdf-body { flex: 1 1 auto; padding: 36px 64px 28px; }
.pdf-page h1 { color: #340e35; font-size: 26px; line-height: 1.05; }
.pdf-page h2 { color: var(--brown-1); font-size: 20px; margin-top: 22px; }
.pdf-page .pdf-kicker { color: var(--coral-1); font-weight: 600; font-size: 13px; }
.pdf-page ul { line-height: 1.5; }
.pdf-page .pdf-line { border-bottom: 1px solid var(--rose-2); min-height: 26px; margin: 10px 0; }
.pdf-gloss-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 14px; }
.pdf-gloss-table td { padding: 4px 14px 8px; border: 1px solid #cc9696; vertical-align: top; line-height: 1.35; }
.pdf-gloss-table tr:nth-child(odd) td { background: #fff1e3; }
.pdf-gloss-table tr:nth-child(even) td { background: #fff; }
.pdf-gloss-term { font-weight: 700; width: 28%; color: var(--brown-1); }

/* Glossary PDF — html2canvas shifts text down; translateY (em) lifts it back. */
.pdf-page--gloss h1 { margin: 0 0 14px; line-height: 1.05; transform: translateY(-0.45em); }
.pdf-gloss-t { display: inline-block; transform: translateY(-0.2em); }

/* Combined resource PDF (pages 58-61) */
.pdf-title { display: flex; align-items: center; gap: 14px; }
.pdf-title-ico { width: 54px; height: 54px; flex: none; object-fit: contain; }
/* Tight line-height + translateY (em) counter html2canvas's downward text shift,
   realigning the title with its icon. */
.pdf-title h1 { margin: 0; line-height: 1.05; transform: translateY(-0.55em); }
.pdf-rows { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.pdf-row { display: flex; align-items: stretch; gap: 10px; }
.pdf-row-box {
  flex: none; width: 52px; border-radius: 6px; background: var(--teal-2);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 22px; line-height: 1;
}
/* html2canvas renders text lower than the browser does; translateY (in em, so it
   scales with font size) lifts each text block back to true vertical center. */
.pdf-box-n { display: block; transform: translateY(-0.45em); }
.pdf-row-bar {
  flex: 1; border-radius: 6px; background: #fff1e3; padding: 12px 22px 16px;
  display: flex; flex-direction: column; justify-content: center;
  color: var(--brown-1); font-size: 15px; line-height: 1.15;
}
.pdf-bar-c { width: 100%; display: flex; align-items: center; flex-wrap: wrap; }
.pdf-bar-text { display: inline-block; line-height: 1.15; transform: translateY(-0.4em); }
.pdf-rows--concerns .pdf-bar-c,
.pdf-row-bar--block .pdf-bar-c { display: block; transform: translateY(-0.4em); }
/* Highlight box: vertical-align:middle renders ~0.55em too high in html2canvas,
   so the box is pushed down and the inner text lifted back up (calibrated to the
   user's actual PDF output, not headless Chrome). */
.pdf-rb {
  display: inline-block;
  background: #ffe2c8;
  border-radius: 5px;
  padding: 3px 10px 2px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  transform: translateY(0.55em);
}
.pdf-rb-t { display: inline-block; line-height: 1; transform: translateY(-0.62em); }
.pdf-rows--goals .pdf-row-bar { min-height: 52px; }
.pdf-sec-head {
  background: var(--rose-1); color: #fff; font-weight: 700; font-size: 15px;
  border-radius: 6px; padding: 5px 16px; margin: 10px 0 8px; line-height: 1;
  display: flex; align-items: center; gap: 10px; min-height: 36px;
}
/* height + auto width preserves the icon's native aspect ratio; html2canvas does
   not honor object-fit, so fixing both width and height would squish it.
   translateY corrects html2canvas drawing the title/icon ~0.5em low in the bar. */
.pdf-sec-ico { flex: none; height: 26px; width: auto; }
.pdf-sec-head > .pdf-sec-t { display: inline-block; line-height: 1; transform: translateY(-0.5em); }
.pdf-rows--concerns { gap: 6px; margin-top: 0; }
.pdf-rows--concerns .pdf-row-bar { padding: 5px 16px 9px; font-size: 12.5px; display: block; }
.pdf-lead { font-weight: 700; margin: 0 0 2px; line-height: 1.2; }
/* Custom bullets drawn as text so html2canvas shifts them in sync with the line text. */
.pdf-bullets { margin: 0; padding-left: 8px; line-height: 1.25; list-style: none; }
.pdf-bullets li { margin: 1px 0; position: relative; padding-left: 14px; }
.pdf-bullets li::before { content: "\2022"; position: absolute; left: 0; top: 0; font-weight: 700; }

/* =========================================================
   RESPONSIVE
   The previous mobile-reflow layout (stacked columns, collapsible road
   drawer, horizontal toolbar) has been removed. Small screens now render
   the full desktop (landscape) layout scaled down to fit, driven by the
   fixed-width viewport meta tag in index.html. A dedicated mobile-optimized
   layout will be added later.
   ========================================================= */
.road-toggle { display: none; }

/* Touch devices (phones/tablets): keep the landscape aspect instead of
   stretching tall. The fixed-width (1280) viewport already scales the layout
   to the screen width; here we cap the full-screen height to a 16:10 landscape
   canvas and center it so the page never reflows into a portrait column. */
@media (hover: none) and (pointer: coarse) {
  :root { --screen-h: min(800px, 100vh); }
  body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--cream);
  }
}
