/* ============================================================
 * Landlord Studio — Vacancy Rate Calculator (US) — Stylesheet
 * https://github.com/rylandlord/landlord-tools
 *
 * All styles scoped under .ls-vacancy to avoid conflicts with the
 * host site's own CSS. Loaded via the Webflow embed page's <head>.
 *
 * IMPORTANT: do not add @import / @font-face here — those are
 * inherently global (the spec doesn't allow scoping them) and will
 * redefine fonts for the entire host page. Webflow already loads
 * Lato site-wide; we fall through the system stack if it's missing.
 * ============================================================ */

.ls-vacancy {
  --lsv-dark-blue: #0f2e5a;
  --lsv-blue: #2272e2;
  --lsv-soft-blue: #b1d2ff;
  --lsv-steel-blue: #e9f1fc;
  --lsv-back-grey: #f3f5f7;
  --lsv-text-secondary: #4b6283;
  --lsv-dark-grey: #5f718a;
  --lsv-neutral-10: #7d97bb;
  --lsv-neutral-7: #dfe3e8;
  --lsv-coral: #f1506b;
  --lsv-coral-dark: #da3753;
  --lsv-light-pink: #facbd3;
  --lsv-green: #29cc9e;
  --lsv-green-dark: #21a37e;
  --lsv-yellow: #ffac33;
  --lsv-yellow-dark: #e2921d;
  --lsv-white: #fff;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--lsv-dark-blue);
  background: var(--lsv-back-grey);
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 24px;
  line-height: 1.5;
  font-size: 16px;
  box-sizing: border-box;
}
.ls-vacancy *, .ls-vacancy *::before, .ls-vacancy *::after { box-sizing: border-box; }

.ls-vacancy .ls-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--lsv-blue);
  margin-bottom: 12px;
}
.ls-vacancy h1.ls-title {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: clamp(32px, 5vw, 45px);
  line-height: 1.15;
  color: var(--lsv-dark-blue);
  margin: 0 0 16px 0;
  letter-spacing: -.01em;
}
.ls-vacancy .ls-lede {
  font-size: 17px;
  color: var(--lsv-text-secondary);
  max-width: 64ch;
  margin: 0 0 40px 0;
  font-weight: 400;
}

/* ---- Step indicator ---- */
.ls-vacancy .ls-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  padding: 6px;
  background: var(--lsv-white);
  border: 1px solid var(--lsv-neutral-7);
  border-radius: 8px;
}
.ls-vacancy .ls-step {
  flex: 1;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--lsv-dark-grey);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .2s;
  min-width: 0;
}
@media (max-width: 640px) {
  .ls-vacancy .ls-steps { gap: 4px; }
  .ls-vacancy .ls-step {
    flex-direction: column;
    gap: 4px;
    padding: 8px 4px;
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
  }
}
.ls-vacancy .ls-step.is-active { color: var(--lsv-dark-blue); background: var(--lsv-steel-blue); }
.ls-vacancy .ls-step.is-done { color: var(--lsv-green-dark); }
.ls-vacancy .ls-step.is-clickable { cursor: pointer; }
.ls-vacancy .ls-step.is-clickable:hover { background: var(--lsv-back-grey); }
.ls-vacancy .ls-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
  flex: none;
}
.ls-vacancy .ls-step.is-done .ls-step-num { background: var(--lsv-green); color: var(--lsv-white); border-color: var(--lsv-green); }
.ls-vacancy .ls-step.is-active .ls-step-num { background: var(--lsv-blue); color: var(--lsv-white); border-color: var(--lsv-blue); }

/* ---- Panels ---- */
.ls-vacancy .ls-panel { display: none; }
.ls-vacancy .ls-panel.is-active { display: block; animation: lsv-fade .3s ease; }
@keyframes lsv-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.ls-vacancy .ls-card-main {
  background: var(--lsv-white);
  border: 1px solid var(--lsv-neutral-7);
  border-radius: 8px;
  padding: 32px;
}
@media (max-width: 640px) { .ls-vacancy .ls-card-main { padding: 24px 20px; } }

/* ---- Form fields ---- */
.ls-vacancy .ls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 24px;
}
@media (max-width: 640px) { .ls-vacancy .ls-grid { grid-template-columns: 1fr; } }
.ls-vacancy .ls-field { display: flex; flex-direction: column; gap: 6px; }
.ls-vacancy .ls-field--full { grid-column: 1 / -1; }
.ls-vacancy .ls-label { font-size: 13px; font-weight: 700; color: var(--lsv-dark-blue); margin-bottom: 2px; }
.ls-vacancy .ls-required {
  color: var(--lsv-coral-dark);
  font-weight: 900;
  margin-left: 2px;
}
.ls-vacancy input,
.ls-vacancy select,
.ls-vacancy textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 16px;
  background: var(--lsv-back-grey);
  border: 1px solid var(--lsv-neutral-10);
  border-radius: 6px;
  color: var(--lsv-dark-blue);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
  line-height: 1.4;
}
.ls-vacancy input:focus,
.ls-vacancy select:focus,
.ls-vacancy textarea:focus {
  outline: 0;
  border-color: var(--lsv-blue);
  box-shadow: 0 0 0 3px rgba(34, 114, 226, 0.12);
}
.ls-vacancy .ls-hint { font-size: 13px; color: var(--lsv-dark-grey); }

/* ---- Buttons ---- */
.ls-vacancy .ls-btn-row {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  align-items: center;
  flex-wrap: wrap;
}
.ls-vacancy .ls-btn {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  min-height: 48px;
  padding: 12px 28px;
  background-color: var(--lsv-coral);
  color: var(--lsv-white);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s, color .2s, background-color .2s;
  box-shadow: inset 0 0 0 1px rgba(15, 46, 90, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
}
@media (max-width: 640px) { .ls-vacancy .ls-btn { font-size: 15px; padding: 10px 18px; width: 100%; } }
.ls-vacancy .ls-btn:hover { background-color: var(--lsv-coral-dark); }
.ls-vacancy .ls-btn[disabled] { opacity: .4; cursor: not-allowed; }
.ls-vacancy .ls-btn--ghost {
  background-color: transparent;
  color: var(--lsv-dark-blue);
  box-shadow: inset 0 0 0 1px var(--lsv-neutral-10);
}
.ls-vacancy .ls-btn--ghost:hover { background-color: var(--lsv-steel-blue); color: var(--lsv-dark-blue); }
.ls-vacancy .ls-spinner-inline {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--lsv-white);
  border-radius: 50%;
  animation: lsv-spin .8s linear infinite;
  vertical-align: middle;
  margin-right: 10px;
}

/* ---- Step 2 headline card (vacancy rate hero) ---- */
.ls-vacancy .ls-estimate {
  background: linear-gradient(135deg, var(--lsv-dark-blue) 0, #143f7a 100%);
  color: var(--lsv-white);
  padding: 40px 32px;
  border-radius: 8px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.ls-vacancy .ls-estimate::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle at top right, rgba(34, 114, 226, 0.4), transparent 70%);
  pointer-events: none;
}
.ls-vacancy .ls-estimate-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--lsv-soft-blue);
  margin-bottom: 20px;
  position: relative;
}
.ls-vacancy .ls-estimate-value {
  font-family: 'Lato', sans-serif;
  font-size: clamp(56px, 9vw, 84px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
  position: relative;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0;
}
.ls-vacancy .ls-estimate-value small {
  font-size: .35em;
  font-weight: 700;
  color: var(--lsv-soft-blue);
  margin-left: 6px;
  align-self: flex-end;
  margin-bottom: .15em;
}
.ls-vacancy .ls-range {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(177, 210, 255, 0.2);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}
@media (max-width: 640px) { .ls-vacancy .ls-range { grid-template-columns: 1fr; gap: 12px; } }
.ls-vacancy .ls-range-item .ls-range-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--lsv-soft-blue);
  margin-bottom: 4px;
}
.ls-vacancy .ls-range-item .ls-range-num { font-size: 24px; font-weight: 900; }

/* ---- Section headings (step 2 + 3) ---- */
.ls-vacancy h3.ls-section-title {
  font-family: 'Lato', sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--lsv-dark-blue);
  margin: 32px 0 4px 0;
  line-height: 1.3;
}
.ls-vacancy .ls-section-sub { color: var(--lsv-text-secondary); font-size: 14px; margin: 0 0 20px 0; }

/* ---- Benchmark cards (NEW for vacancy tool) ---- */
.ls-vacancy .ls-bench {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0 16px 0;
}
@media (max-width: 640px) { .ls-vacancy .ls-bench { grid-template-columns: 1fr; } }
.ls-vacancy .ls-bench-card {
  background: var(--lsv-back-grey);
  border: 1px solid var(--lsv-neutral-7);
  border-radius: 6px;
  padding: 16px 18px;
}
.ls-vacancy .ls-bench-card.is-yours {
  border-color: var(--lsv-blue);
  background: var(--lsv-steel-blue);
}
.ls-vacancy .ls-bench-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--lsv-dark-grey);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.ls-vacancy .ls-bench-value {
  font-size: 26px;
  font-weight: 900;
  color: var(--lsv-dark-blue);
  line-height: 1.1;
}
/* When the value is a verbal label (e.g. "12.3% above market") rather
   than a short number, shrink it so it doesn't overflow the card. */
.ls-vacancy .ls-bench-value.is-good,
.ls-vacancy .ls-bench-value.is-warn,
.ls-vacancy .ls-bench-value.is-bad {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
}
.ls-vacancy .ls-bench-value.is-good { color: var(--lsv-green-dark); }
.ls-vacancy .ls-bench-value.is-warn { color: var(--lsv-yellow-dark); }
.ls-vacancy .ls-bench-value.is-bad { color: var(--lsv-coral-dark); }
.ls-vacancy .ls-bench-sub { font-size: 12px; color: var(--lsv-text-secondary); margin-top: 2px; }

/* ---- Insights callout ---- */
.ls-vacancy .ls-insights {
  background: rgba(34, 114, 226, 0.08);
  border-left: 3px solid var(--lsv-blue);
  color: var(--lsv-dark-blue);
  padding: 14px 18px;
  border-radius: 6px;
  margin: 16px 0 8px 0;
  font-size: 14px;
  line-height: 1.5;
}
.ls-vacancy .ls-insights.is-good { background: rgba(41, 204, 158, 0.1); border-left-color: var(--lsv-green-dark); }
.ls-vacancy .ls-insights.is-warn { background: rgba(255, 172, 51, 0.12); border-left-color: var(--lsv-yellow-dark); }
.ls-vacancy .ls-insights.is-bad { background: var(--lsv-light-pink); border-left-color: var(--lsv-coral-dark); }

/* ---- Loading + error ---- */
.ls-vacancy .ls-loading { text-align: center; padding: 80px 20px; }
.ls-vacancy .ls-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid var(--lsv-neutral-7);
  border-top-color: var(--lsv-coral);
  border-radius: 50%;
  animation: lsv-spin .8s linear infinite;
}
@keyframes lsv-spin { to { transform: rotate(360deg); } }
.ls-vacancy .ls-loading-text { margin-top: 16px; font-size: 14px; font-weight: 700; color: var(--lsv-dark-grey); }
.ls-vacancy .ls-error {
  background: var(--lsv-light-pink);
  border-left: 3px solid var(--lsv-coral);
  color: var(--lsv-coral-dark);
  padding: 14px 18px;
  border-radius: 6px;
  margin: 20px 0;
  font-size: 14px;
  font-weight: 700;
}

/* ---- Seasonality flag (college-town context) ---- */
.ls-vacancy .ls-seasonality {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: var(--lsv-steel-blue);
  border: 1px solid var(--lsv-soft-blue);
  border-radius: 8px;
  margin: 0 0 24px 0;
}
.ls-vacancy .ls-seasonality-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--lsv-blue);
  color: var(--lsv-white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ls-vacancy .ls-seasonality-icon svg { width: 22px; height: 22px; }
.ls-vacancy .ls-seasonality-body { min-width: 0; flex: 1; }
.ls-vacancy .ls-seasonality-body strong {
  display: block;
  font-size: 15px;
  color: var(--lsv-dark-blue);
  margin-bottom: 4px;
}
.ls-vacancy .ls-seasonality-body p {
  margin: 0;
  font-size: 14px;
  color: var(--lsv-text-secondary);
  line-height: 1.5;
}

/* ---- Recommendations list ---- */
.ls-vacancy .ls-recs {
  list-style: decimal;
  padding-left: 24px;
  margin: 0 0 24px 0;
  font-size: 15px;
  color: var(--lsv-dark-blue);
}
.ls-vacancy .ls-recs li {
  margin-bottom: 16px;
  padding-left: 4px;
  line-height: 1.5;
}
.ls-vacancy .ls-recs li::marker {
  font-weight: 900;
  color: var(--lsv-blue);
}
.ls-vacancy .ls-recs li strong {
  display: block;
  font-size: 15px;
  font-weight: 900;
  color: var(--lsv-dark-blue);
  margin-bottom: 4px;
}
.ls-vacancy .ls-recs li p {
  margin: 0;
  color: var(--lsv-text-secondary);
  font-size: 14px;
}

/* ---- Pack table (cost breakdown) ---- */
.ls-vacancy .ls-pack-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 24px; }
.ls-vacancy .ls-pack-table tr { border-bottom: 1px solid var(--lsv-neutral-7); }
.ls-vacancy .ls-pack-table tr:last-child { border-bottom: 0; }
.ls-vacancy .ls-pack-table td { padding: 12px 0; vertical-align: top; }
.ls-vacancy .ls-pack-label { color: var(--lsv-dark-grey); width: 40%; font-weight: 400; }
.ls-vacancy .ls-pack-val { color: var(--lsv-dark-blue); font-weight: 700; }

/* ---- Footnote ---- */
.ls-vacancy .ls-foot {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--lsv-neutral-7);
  font-size: 13px;
  color: var(--lsv-dark-grey);
  line-height: 1.6;
}
.ls-vacancy .ls-foot strong { color: var(--lsv-dark-blue); }

/* ---- Step 3 pack hero (PDF cover bar) ---- */
.ls-vacancy .ls-pack-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--lsv-coral) 0%, var(--lsv-coral-dark) 100%);
  color: var(--lsv-white);
  border-radius: 8px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.ls-vacancy .ls-pack-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  pointer-events: none;
}
.ls-vacancy .ls-pack-hero-icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lsv-white);
  position: relative;
  z-index: 1;
}
.ls-vacancy .ls-pack-hero-icon svg { width: 34px; height: 34px; }
.ls-vacancy .ls-pack-hero-text { position: relative; z-index: 1; flex: 1; min-width: 0; }
.ls-vacancy .ls-pack-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .9;
  margin-bottom: 6px;
}
.ls-vacancy .ls-pack-hero-title {
  font-family: 'Lato', sans-serif;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 900;
  line-height: 1.1;
}
.ls-vacancy .ls-pack-hero-action {
  margin-left: auto;
  flex: 0 0 auto;
  background: var(--lsv-white);
  color: var(--lsv-coral-dark);
  border: 0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform .15s, box-shadow .15s;
  position: relative;
  z-index: 1;
  white-space: nowrap;
}
.ls-vacancy .ls-pack-hero-action:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22); }
.ls-vacancy .ls-pack-hero-action:active { transform: translateY(0); }
@media (max-width: 640px) {
  .ls-vacancy .ls-pack-hero { padding: 20px; gap: 16px; flex-wrap: wrap; }
  .ls-vacancy .ls-pack-hero-icon { width: 52px; height: 52px; }
  .ls-vacancy .ls-pack-hero-icon svg { width: 28px; height: 28px; }
  .ls-vacancy .ls-pack-hero-action { width: 100%; margin-left: 0; margin-top: 4px; }
}

/* ---- Modal (lead capture) ---- */
.ls-vacancy .ls-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 46, 90, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  animation: lsv-backdrop-in .2s ease;
  box-sizing: border-box;
}
.ls-vacancy .ls-modal-backdrop.is-open { display: flex; }
@keyframes lsv-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.ls-vacancy .ls-modal {
  background: var(--lsv-white);
  border-radius: 12px;
  max-width: 460px;
  width: 100%;
  padding: 36px 32px 32px;
  position: relative;
  box-shadow: 0 24px 64px rgba(15, 46, 90, 0.25);
  animation: lsv-modal-in .3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  box-sizing: border-box;
  overflow-x: hidden;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
@media (max-width: 640px) {
  .ls-vacancy .ls-modal-backdrop { padding: 12px; }
  .ls-vacancy .ls-modal { padding: 28px 22px 22px; max-height: calc(100vh - 24px); }
}
.ls-vacancy .ls-modal:has(.om-embedded-campaign) {
  max-width: 760px;
  padding: 8px 8px 12px;
}
.ls-vacancy .ls-modal:has(.om-embedded-campaign) .ls-modal-icon,
.ls-vacancy .ls-modal:has(.om-embedded-campaign) #lsv-modal-title,
.ls-vacancy .ls-modal:has(.om-embedded-campaign) > p { display: none; }
.ls-vacancy .ls-modal:has(.om-embedded-campaign) .om-embedded-campaign { margin: 0 0 8px; }
.ls-vacancy .ls-modal:has(.om-embedded-campaign) .ls-modal-trust { margin-top: 8px; padding: 0 16px 8px; }
@media (max-width: 640px) {
  .ls-vacancy .ls-modal:has(.om-embedded-campaign) { padding: 6px; }
}
@keyframes lsv-modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.ls-vacancy .ls-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: var(--lsv-dark-grey);
  font-size: 20px;
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.ls-vacancy .ls-modal-close:hover { background: var(--lsv-back-grey); color: var(--lsv-dark-blue); }
.ls-vacancy .ls-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--lsv-steel-blue);
  color: var(--lsv-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.ls-vacancy .ls-modal-icon svg { width: 28px; height: 28px; }
.ls-vacancy .ls-modal h3 {
  font-family: 'Lato', sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--lsv-dark-blue);
  margin: 0 0 8px 0;
  line-height: 1.2;
}
.ls-vacancy .ls-modal p {
  color: var(--lsv-text-secondary);
  font-size: 15px;
  margin: 0 0 24px 0;
  line-height: 1.5;
}
.ls-vacancy .ls-modal-trust {
  text-align: center;
  font-size: 12px;
  color: var(--lsv-dark-grey);
  margin-top: 16px;
  line-height: 1.5;
}
.ls-vacancy .ls-modal-trust strong { color: var(--lsv-dark-blue); }

/* ---- Print isolation (PDF download) ---- */
/* ============================================================
 * Print isolation
 * ============================================================
 * Webflow's page layout wraps our embed in multiple containers.
 * The earlier `visibility: hidden` trick left invisible content
 * still occupying layout, causing blank top space and trailing
 * empty pages in the printed PDF.
 *
 * Strategy here:
 *  1. JS marks every ancestor of #lsVacancy with class
 *     `lsv-print-ancestor` on `beforeprint` (cleared on
 *     `afterprint`).
 *  2. CSS hides ALL body descendants by default, then re-shows
 *     ONLY the ancestor chain + the tool + the report panel.
 *  3. We zero-out ancestor margins/padding/positioning so the
 *     printed output renders flush at the top of the page.
 *
 * This eliminates the gap at top AND the trailing blank pages.
 */
@media print {
  /* Hide every descendant of body by default. */
  body * { display: none !important; }

  /* Re-show the ancestor chain leading to .ls-vacancy. */
  body .lsv-print-ancestor {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    width: auto !important;
    max-width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    box-shadow: none !important;
    transform: none !important;
    position: static !important;
    float: none !important;
  }

  /* Re-show the tool root and the report panel + descendants. */
  body .ls-vacancy,
  body .ls-vacancy [data-panel="3"],
  body .ls-vacancy [data-panel="3"] * { display: revert !important; }

  /* Format the tool container for print. */
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
  }
  body .ls-vacancy {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 24px !important;
    background: white !important;
    font-size: 12pt;
  }

  /* Hide intra-tool elements that shouldn't appear in the printed report. */
  .ls-vacancy > .ls-eyebrow,
  .ls-vacancy > h1.ls-title,
  .ls-vacancy > .ls-lede,
  .ls-vacancy > .ls-steps,
  .ls-vacancy .ls-modal-backdrop,
  .ls-vacancy .ls-panel:not([data-panel="3"]) { display: none !important; }

  /* Higher-specificity rule needed to beat `body .ls-vacancy [data-panel="3"] *` */
  .ls-vacancy [data-panel="3"] .ls-no-print,
  .ls-vacancy [data-panel="3"] .ls-btn-row { display: none !important; }

  /* Print-friendly styling for the pack hero (turn coral background into outline). */
  .ls-vacancy .ls-card-main { border: 0; padding: 0; box-shadow: none; }
  .ls-vacancy .ls-pack-hero {
    background: white !important;
    color: var(--lsv-dark-blue) !important;
    border: 0;
    border-bottom: 2px solid var(--lsv-dark-blue);
    border-radius: 0;
    padding: 0 0 16px 0;
    margin-bottom: 24px;
    page-break-after: avoid;
    box-shadow: none;
  }
  .ls-vacancy .ls-pack-hero::before { display: none !important; }
  .ls-vacancy .ls-pack-hero-icon { background: var(--lsv-dark-blue) !important; color: white !important; }
  .ls-vacancy .ls-pack-hero-eyebrow { color: var(--lsv-text-secondary) !important; }
  .ls-vacancy .ls-pack-hero-title { color: var(--lsv-dark-blue) !important; }
}
