/* Shared closing boards; typography follows the INFO cards (38/18, mobile 26/16). */
html body :is(#z4, #z-thanks).has-ending-design {
  --ending-title-size: 38px;
  --ending-text-size: 18px;
  --ending-text-leading: 1.7;
  --ending-desktop-intro-space: 16px;
  --ending-desktop-footer-space: 38px;
}
html body :is(#z4, #z-thanks) .ending-legacy { display: none !important; }
html body section:is(#z4, #z-thanks).has-ending-design .ending-board {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0 0 auto;
  width: var(--funnel-content-width);
  max-width: var(--funnel-content-max, 817px);
  min-height: min(780px, calc(100dvh - 120px));
  margin: 12px auto 8px;
  padding: 20px 32px;
  border: 1px solid rgba(167,190,161,.17);
  border-radius: 28px;
  background: radial-gradient(ellipse at 50% 0, rgba(76,113,77,.13), transparent 63%), linear-gradient(160deg, #101c17, #090f0d 88%);
  box-shadow: 0 28px 70px -30px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.035);
  color: #f3eee3;
  font: 400 var(--ending-text-size)/var(--ending-text-leading) 'Plus Jakarta Sans', Inter, sans-serif;
  text-align: start;
}
html body :is(#z4, #z-thanks).ending-answers-open .ending-board { justify-content: flex-start; }
html body :is(#z4, #z-thanks) .ending-board * { box-sizing: border-box; }
html body :is(#z4, #z-thanks) .ending-intro { text-align: center; }
html body :is(#z4, #z-thanks) .ending-ornament { width: 34px; height: 34px; margin: 0 auto 10px; color: #d9c49a; }
html body :is(#z4, #z-thanks) .ending-ornament svg { width: 100%; height: 100%; }
html body :is(#z4, #z-thanks) .ending-kicker { margin: 0 0 12px; color: #b5c4b6; font: 500 12px/1.6 'Plus Jakarta Sans', sans-serif; letter-spacing: .16em; }
html body :is(#z4, #z-thanks) .ending-title { margin: 0 !important; padding: 0; max-width: none; width: auto; color: #f3eee3; font: 400 var(--ending-title-size)/1.25 'Cormorant Garamond', Georgia, serif !important; letter-spacing: -.02em; text-align: center; }
html body :is(#z4, #z-thanks) .ending-title em { color: #dcc697; font-weight: 400; font-style: italic; }
html body :is(#z4, #z-thanks) .ending-lead { max-width: 720px; margin: 12px auto 16px; padding: 0; color: #b6bfb8; font: inherit; }
html body :is(#z4, #z-thanks) .ending-guidance { border: 0; }
html body :is(#z4, #z-thanks) .ending-guidance-row { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 16px; align-items: start; padding: 15px 0; }
html body :is(#z4, #z-thanks) .ending-guidance-row + .ending-guidance-row { border-top: 0; }
html body :is(#z4, #z-thanks) .ending-number { color: #c7b382; font: italic 28px/1.2 'Cormorant Garamond', Georgia, serif; text-align: center; }
html body :is(#z4, #z-thanks) .ending-guidance h2 { margin: 0 0 6px; color: #eceee5; font: 600 var(--ending-text-size)/1.5 'Plus Jakarta Sans', sans-serif; letter-spacing: 0; }
html body :is(#z4, #z-thanks) .ending-guidance p { margin: 0; color: #b6bfb8; font: inherit; overflow-wrap: anywhere; }
html body #z4 .ending-preference-row { grid-template-columns: 34px minmax(0,1fr) auto; }
html body #z4 .ending-number-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(215,195,149,.28);
  border-radius: 50%;
  background: rgba(215,195,149,.025);
  color: #d7c395;
  font: 500 16px/1 'Plus Jakarta Sans', Inter, sans-serif;
  font-variant-numeric: lining-nums tabular-nums;
}
html body :is(#z4, #z-thanks) .ending-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(215,195,149,.28);
  border-radius: 999px;
  background: rgba(215,195,149,.055);
  color: #ddcc9f;
  font: 500 14px/1.2 'Plus Jakarta Sans', Inter, sans-serif;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
html body :is(#z4, #z-thanks) .ending-edit:hover { border-color: rgba(215,195,149,.46); background: rgba(215,195,149,.11); color: #f2e5c7; }
html body :is(#z4, #z-thanks) .ending-footer { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,var(--funnel-cta-min-width,236px)),1fr)); align-items: stretch; gap: 20px; margin-top: 16px; }
html body #z4 #z-send.ending-control,
html body :is(#z4, #z-thanks) .ending-control {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: static !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 54px !important;
  height: auto !important;
  flex: 0 0 auto !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 13px 18px !important;
  border: 1px solid rgba(224,198,145,.24) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg,rgba(55,77,61,.58),rgba(27,43,33,.68)) !important;
  color: #eee6d7 !important;
  font: 500 calc(var(--ending-text-size) - 1px)/1.45 'Plus Jakarta Sans', Inter, sans-serif !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-decoration: none !important;
  white-space: normal !important;
  text-align: center !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 12px 26px -24px rgba(0,0,0,.72) !important;
  cursor: pointer !important;
}
html body :is(#z4, #z-thanks) .ending-control span { font: inherit !important; }
html body :is(#z4, #z-thanks) .ending-board :is(button,a):focus-visible { outline: 2px solid #f5d688 !important; outline-offset: 5px !important; }
html body #z4 #z-send.ending-control:hover,
html body :is(#z4, #z-thanks) .ending-control:hover { background: linear-gradient(180deg,rgba(65,89,71,.66),rgba(33,52,40,.74)) !important; border-color: rgba(224,198,145,.42) !important; }
html body :is(#z4, #z-thanks) .ending-answers[hidden] { display: none !important; }
html body :is(#z4, #z-thanks) .ending-answers { margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(199,211,192,.15); scroll-margin-top: 100px; }
html body :is(#z4, #z-thanks) #ending-answers-title { margin: 0 0 20px; color: #eceee5; font: 400 30px/1.25 'Cormorant Garamond', Georgia, serif; }
html body #z4 .ending-dossier { display: grid; gap: 0; margin: 0 0 26px; }
html body #z4 .ending-dossier[hidden],
html body #z4 .ending-dossier-reference:empty,
html body #z4 .ending-dossier-position:empty { display: none !important; }
html body #z4 .ending-dossier .lead-position-card {
  padding: 18px 22px 6px !important;
  border: 1px solid rgba(215,195,149,.22) !important;
  border-radius: 18px 18px 0 0 !important;
  background: rgba(12,25,18,.72) !important;
  box-shadow: none !important;
}
html body #z4 .ending-dossier .lead-pos-header { padding-bottom: 12px !important; margin-bottom: 0 !important; border-bottom: 1px solid rgba(215,195,149,.18) !important; }
html body #z4 .ending-dossier .lead-pos-badge { font-size: 11px !important; }
html body #z4 .ending-dossier .lead-pos-kicker { color: #d7c395 !important; font-size: 10px !important; }
html body #z4 .ending-dossier .lead-pos-grid { display: block !important; }
html body #z4 .ending-dossier .lead-pos-item {
  display: grid !important;
  grid-template-columns: 34px minmax(0,1fr) !important;
  gap: 12px !important;
  padding: 13px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(199,211,192,.10) !important;
  border-radius: 0 !important;
  background: transparent !important;
}
html body #z4 .ending-dossier .lead-pos-item:last-child { border-bottom: 0 !important; }
html body #z4 .ending-dossier .lead-pos-num { color: #d7c395 !important; font: italic 24px/1 'Cormorant Garamond',Georgia,serif !important; text-align: center !important; }
html body #z4 .ending-dossier .lead-pos-title { margin: 0 0 4px !important; color: #eceee5 !important; font: 600 15px/1.35 'Plus Jakarta Sans',sans-serif !important; }
html body #z4 .ending-dossier .lead-pos-text { margin: 0 !important; color: #b6bfb8 !important; font: 400 14px/1.55 'Plus Jakarta Sans',sans-serif !important; }
html body #z4 .ending-dossier .z-thanks-mailed {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-top: 10px !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  background: rgba(74, 222, 128, 0.08) !important;
  border: 1px solid rgba(74, 222, 128, 0.28) !important;
  color: #4ade80 !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
}
html body #z4 .ending-dossier .z-thanks-mailed[hidden] {
  display: none !important;
}
html body #z4 .ending-dossier .file-panel.z-dossier-ref-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  margin: 0 !important;
  padding: 14px 18px !important;
  border: 1px solid rgba(215,195,149,.22) !important;
  border-top: 0 !important;
  border-radius: 0 0 18px 18px !important;
  background: rgba(215,195,149,.06) !important;
}
html body #z4 .ending-dossier .z-ref-header { display: flex !important; flex-direction: column !important; gap: 3px !important; }
html body #z4 .ending-dossier .lbl { color: #d7c395 !important; font: 600 11px/1.4 'Plus Jakarta Sans',sans-serif !important; letter-spacing: .14em !important; }
html body #z4 .ending-dossier .do { color: #b6bfb8 !important; font: 400 13px/1.45 'Plus Jakarta Sans',sans-serif !important; }
html body #z4 .ending-dossier .num-row { display: inline-flex !important; align-items: center !important; gap: 10px !important; flex: 0 0 auto !important; }
html body #z4 .ending-dossier .num { color: #fff !important; font: 600 16px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace !important; }
html body #z4 .ending-dossier .copy-num { position: static !important; width: 38px !important; height: 38px !important; }
html body :is(#z4, #z-thanks) .ending-answer-group { margin-top: 22px; }
html body :is(#z4, #z-thanks) .ending-answer-group h3 { color: #cfbb8d; font: 600 var(--ending-text-size)/1.5 'Plus Jakarta Sans', sans-serif; margin: 0 0 10px; }
html body :is(#z4, #z-thanks) .ending-answer-group dl { margin: 0; }
html body :is(#z4, #z-thanks) .ending-answer-group dl > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; padding: 12px 0; border-top: 1px solid rgba(199,211,192,.08); }
html body :is(#z4, #z-thanks) .ending-answer-group dt { color: #b6bfb8; }
html body :is(#z4, #z-thanks) .ending-answer-group dd { color: #e8ece5; margin: 0; overflow-wrap: anywhere; }
html body :is(#z4, #z-thanks) .ending-summary-note { margin: 22px 0 0; color: #b6bfb8; font: inherit; }
html body :is(#z4, #z-thanks) .ending-empty { color: #bdc7bf; font: inherit; margin: 0; }
@media (min-width: 800px) {
  html body section:is(#z4, #z-thanks).has-ending-design .ending-board { min-height: min(740px, calc(100dvh - 156px)); }
  html body section#z4.has-ending-design:not(.ending-answers-open) .ending-board { transform: translate(0, 24px); }
}
@media (min-width: 800px) and (min-height: 800px) {
  html body section:is(#z4, #z-thanks).has-ending-design:not(.ending-answers-open) .ending-board { justify-content: flex-start; }
  html body section:is(#z4, #z-thanks).has-ending-design:not(.ending-answers-open) .ending-intro { margin-top: var(--ending-desktop-intro-space); }
  html body section#z4.has-ending-design:not(.ending-answers-open) .ending-guidance { margin-top: 16px; }
  html body section:is(#z4, #z-thanks).has-ending-design:not(.ending-answers-open) .ending-footer {
    margin-top: auto;
    margin-bottom: var(--ending-desktop-footer-space);
  }
}
@media (max-width: 799px) {
  html body :is(#z4, #z-thanks).has-ending-design :is(.funnel-mobile-label,.funnel-mobile-stages) { display: none !important; }
  html body section:is(#z4, #z-thanks).has-ending-design .ending-board { width: 100%; min-height: 0; margin: 0 auto; padding: 16px 18px 14px; border-radius: 24px; }
  html body :is(#z4, #z-thanks) .ending-ornament { width: 28px; height: 28px; margin-bottom: 4px; }
  html body :is(#z4, #z-thanks) .ending-lead { margin: 8px auto 10px; }
  html body :is(#z4, #z-thanks) .ending-guidance-row { gap: 10px; padding: 8px 0; }
  html body :is(#z4, #z-thanks) .ending-guidance h2 { margin-bottom: 2px; line-height: 1.35; }
  html body :is(#z4, #z-thanks) .ending-guidance p { line-height: 1.45; }
  html body #z4 .ending-preference-row { grid-template-columns: 34px minmax(0,1fr); }
  html body :is(#z4, #z-thanks) .ending-edit { grid-column: 2; padding: 0; justify-self: start; }
  html body :is(#z4, #z-thanks) .ending-footer { gap: 8px; margin-top: 10px; }
  html body :is(#z4, #z-thanks) .ending-control { padding: 10px 8px !important; }
  html body :is(#z4, #z-thanks) .ending-answer-group dl > div { grid-template-columns: minmax(0,1fr); gap: 3px; }
  html body #z4 .ending-dossier .lead-position-card { padding: 16px 16px 4px !important; }
  html body #z4 .ending-dossier .lead-pos-header { align-items: flex-start !important; text-align: start !important; }
  html body #z4 .ending-dossier .file-panel.z-dossier-ref-bar { flex-direction: column !important; align-items: stretch !important; }
  html body #z4 .ending-dossier .num-row { justify-content: space-between !important; }
}
@media (min-width: 390px) and (max-width: 799px) {
  html body :is(#z4, #z-thanks) .ending-footer { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 799px) and (max-height: 720px) {
  html body :is(#z4, #z-thanks) :is(.ending-ornament,.ending-lead) { display: none; }
  html body section:is(#z4, #z-thanks).has-ending-design .ending-board { padding: 12px 16px 10px; }
  html body :is(#z4, #z-thanks) .ending-guidance-row { padding: 6px 0; }
  html body :is(#z4, #z-thanks) .ending-footer { margin-top: 8px; }
}
@media (max-width: 640px) {
  html body :is(#z4, #z-thanks).has-ending-design { --ending-title-size: 26px; --ending-text-size: 16px; --ending-text-leading: 1.45; }
}
