/* ============================================================
 * Landlord Studio — MTD for Income Tax Checker (UK)
 *
 * Scoped under .ls-mtd-uk. Matches the rent / mileage / receipt-organizer
 * design tokens (Lato, dark-blue + coral) for consistency.
 *
 * No @import / @font-face here — Webflow loads Lato site-wide, and an
 * unscoped font rule would clobber the host page.
 *
 * Every selector starts with the root class. Class NAMES are shared with the
 * other tools (.ls-btn, .ls-panel, .ls-step…) but they can never collide,
 * because the root differs.
 * ============================================================ */

.ls-mtd-uk {
  --lsmtd-dark-blue: #0f2e5a;
  --lsmtd-blue: #2272e2;
  --lsmtd-blue-dark: #1b5fc0;
  --lsmtd-soft-blue: #b1d2ff;
  --lsmtd-steel-blue: #e9f1fc;
  --lsmtd-back-grey: #f3f5f7;
  --lsmtd-text-secondary: #4b6283;
  --lsmtd-dark-grey: #5f718a;
  --lsmtd-neutral-10: #7d97bb;
  --lsmtd-neutral-7: #dfe3e8;
  --lsmtd-neutral-6: #e3e9f1;
  --lsmtd-coral: #f1506b;
  --lsmtd-coral-dark: #da3753;
  --lsmtd-light-pink: #facbd3;
  --lsmtd-green: #29cc9e;
  --lsmtd-green-dark: #21a37e;
  --lsmtd-mint: #eafaf4;
  --lsmtd-yellow: #ffac33;
  --lsmtd-white: #fff;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--lsmtd-dark-blue);
  background: var(--lsmtd-back-grey);
  max-width: 980px;
  margin: 0 auto;
  /* Modest top padding: the Webflow section above supplies the heading and its
   * own spacing, so a full 48px here would leave a visible gap. Zero it in
   * Webflow if the containing section already has bottom padding. */
  padding: 24px 24px 48px;
  line-height: 1.5;
  font-size: 16px;
  box-sizing: border-box;
}
.ls-mtd-uk *,
.ls-mtd-uk *::before,
.ls-mtd-uk *::after { box-sizing: border-box; }

/* The JS toggles visibility with the `hidden` attribute. Any rule below that
 * sets `display` would otherwise beat the UA's [hidden] { display: none },
 * so restate it once with enough weight to win. */
.ls-mtd-uk [hidden] { display: none !important; }

/* The embed is the tool only — heading, lede and trust copy are native
 * Webflow elements on the page, so there are deliberately no .ls-eyebrow /
 * .ls-title / .ls-lede rules here. Don't re-add them without re-adding the
 * markup; these classes are scoped to this root and would never reach
 * Webflow-authored elements anyway. Reference copy lives in the comment block
 * at the top of tools/mtd-checker-uk/embed.html. */

/* ---- Step indicator ---- */
.ls-mtd-uk .ls-steps {
  display: flex; align-items: center; gap: 8px; margin: 0 0 24px;
  padding: 12px 14px; background: var(--lsmtd-white); border-radius: 12px;
  border: 1px solid var(--lsmtd-neutral-7); list-style: none;
}
.ls-mtd-uk .ls-step {
  display: flex; align-items: center; gap: 8px; flex: 1 1 0; min-width: 0;
  padding: 6px 8px; border-radius: 8px;
  font-size: 13px; font-weight: 700; color: var(--lsmtd-neutral-10);
  transition: background .15s, color .15s;
}
.ls-mtd-uk .ls-step.is-active { color: var(--lsmtd-dark-blue); background: var(--lsmtd-steel-blue); }
.ls-mtd-uk .ls-step.is-active .ls-step-num { background: var(--lsmtd-blue); color: var(--lsmtd-white); }
.ls-mtd-uk .ls-step.is-done .ls-step-num { background: var(--lsmtd-green); color: var(--lsmtd-white); }
.ls-mtd-uk .ls-step.is-clickable { cursor: pointer; }
.ls-mtd-uk .ls-step.is-clickable:hover { color: var(--lsmtd-dark-blue); background: var(--lsmtd-back-grey); }
.ls-mtd-uk .ls-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--lsmtd-neutral-7); color: var(--lsmtd-dark-grey);
  font-size: 13px; font-weight: 900; flex: 0 0 auto;
}
.ls-mtd-uk .ls-step-label {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

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

.ls-mtd-uk .ls-card-main {
  background: var(--lsmtd-white); border: 1px solid var(--lsmtd-neutral-7);
  border-radius: 16px; padding: 28px; margin-bottom: 16px;
}
.ls-mtd-uk .ls-card-main:last-child { margin-bottom: 0; }

.ls-mtd-uk .ls-q-meta {
  font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
  color: var(--lsmtd-neutral-10); margin-bottom: 10px;
}
.ls-mtd-uk .ls-section-title {
  font-size: 21px; font-weight: 900; color: var(--lsmtd-dark-blue);
  margin: 0 0 6px 0; line-height: 1.25; letter-spacing: -.01em;
}
.ls-mtd-uk .ls-section-sub {
  font-size: 15px; color: var(--lsmtd-text-secondary); margin: 0 0 20px 0;
}

/* ---- Fields ---- */
.ls-mtd-uk .ls-field { margin-bottom: 20px; }
.ls-mtd-uk .ls-label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--lsmtd-text-secondary); margin-bottom: 6px;
}
.ls-mtd-uk .ls-money { position: relative; display: block; }
.ls-mtd-uk .ls-money-sigil {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 20px; font-weight: 900; color: var(--lsmtd-neutral-10); pointer-events: none;
}
.ls-mtd-uk .ls-input {
  width: 100%; padding: 14px 16px; border-radius: 10px;
  border: 1px solid var(--lsmtd-neutral-6); background: var(--lsmtd-white);
  font-family: inherit; font-size: 16px; color: var(--lsmtd-dark-blue);
  min-height: 52px; transition: border-color .15s, box-shadow .15s;
}
.ls-mtd-uk .ls-input--money { padding-left: 34px; font-size: 20px; font-weight: 700; }
.ls-mtd-uk .ls-input:focus {
  outline: none; border-color: var(--lsmtd-blue);
  box-shadow: 0 0 0 3px rgba(34, 114, 226, .15);
}
.ls-mtd-uk .ls-input:disabled { background: var(--lsmtd-back-grey); color: var(--lsmtd-neutral-10); }

.ls-mtd-uk .ls-hint {
  font-size: 13px; color: var(--lsmtd-text-secondary); margin: 10px 0 0;
}
.ls-mtd-uk .ls-hint strong { color: var(--lsmtd-dark-blue); }

/* ---- Quick-fill chips ----
 * The thing that keeps three income questions under thirty seconds. */
.ls-mtd-uk .ls-quickfill { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ls-mtd-uk .ls-chip {
  border: 1px solid var(--lsmtd-soft-blue); background: var(--lsmtd-steel-blue);
  color: var(--lsmtd-blue-dark); border-radius: 999px;
  padding: 8px 14px; font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; min-height: 40px; transition: background .15s, border-color .15s;
}
.ls-mtd-uk .ls-chip:hover { background: #dceaff; border-color: var(--lsmtd-blue); }

/* ---- Checkboxes ---- */
.ls-mtd-uk .ls-checkgroup {
  border: 0; padding: 0; margin: 0 0 20px;
}
.ls-mtd-uk .ls-checkgroup-legend {
  padding: 0; font-size: 12px; font-weight: 900; letter-spacing: .06em;
  text-transform: uppercase; color: var(--lsmtd-neutral-10); margin-bottom: 10px;
}
.ls-mtd-uk .ls-check {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--lsmtd-neutral-6); border-radius: 10px;
  background: var(--lsmtd-white); cursor: pointer;
  font-size: 15px; line-height: 1.45; min-height: 48px;
  transition: border-color .15s, background .15s;
}
.ls-mtd-uk .ls-check:hover { border-color: var(--lsmtd-soft-blue); background: var(--lsmtd-steel-blue); }
.ls-mtd-uk .ls-check input[type="checkbox"] {
  width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto;
  accent-color: var(--lsmtd-blue); cursor: pointer;
}
.ls-mtd-uk .ls-check:has(input:checked) {
  border-color: var(--lsmtd-blue); background: var(--lsmtd-steel-blue);
}
.ls-mtd-uk .ls-check--inline {
  border: 0; background: transparent; padding: 10px 0 0; margin: 0;
  font-size: 14px; color: var(--lsmtd-text-secondary); min-height: 0;
}
.ls-mtd-uk .ls-check--inline:hover { background: transparent; border: 0; }
.ls-mtd-uk .ls-check--none { margin-top: 4px; }

/* ---- "What counts" expander ---- */
.ls-mtd-uk .ls-what-counts {
  border: 1px solid var(--lsmtd-neutral-6); border-radius: 10px;
  background: var(--lsmtd-back-grey); margin-bottom: 20px;
}
.ls-mtd-uk .ls-what-counts summary {
  padding: 14px 16px; cursor: pointer; font-size: 14px; font-weight: 700;
  color: var(--lsmtd-blue-dark); list-style: revert;
}
.ls-mtd-uk .ls-what-counts summary::marker { color: var(--lsmtd-neutral-10); }
.ls-mtd-uk .ls-what-counts-body { padding: 0 16px 16px; font-size: 14px; }
.ls-mtd-uk .ls-wc-head {
  font-size: 12px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase;
  color: var(--lsmtd-neutral-10); margin: 8px 0 6px;
}
.ls-mtd-uk .ls-what-counts-body ul { margin: 0 0 10px; padding-left: 20px; }
.ls-mtd-uk .ls-what-counts-body li { margin-bottom: 4px; color: var(--lsmtd-text-secondary); }
.ls-mtd-uk .ls-what-counts-body li strong { color: var(--lsmtd-dark-blue); }
.ls-mtd-uk .ls-wc-foot {
  margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--lsmtd-neutral-6);
  font-size: 13px; color: var(--lsmtd-text-secondary);
}

/* ---- Buttons ---- */
.ls-mtd-uk .ls-actions {
  display: flex; gap: 12px; align-items: center; margin-top: 24px;
}
.ls-mtd-uk .ls-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 8px; border: 1px solid transparent;
  font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  min-height: 48px; text-decoration: none; transition: background .15s, border-color .15s;
}
.ls-mtd-uk .ls-btn--primary { background: var(--lsmtd-blue); color: var(--lsmtd-white); }
.ls-mtd-uk .ls-btn--primary:hover { background: var(--lsmtd-blue-dark); }
.ls-mtd-uk .ls-btn--primary:disabled { opacity: .6; cursor: default; }
.ls-mtd-uk .ls-btn--ghost {
  background: var(--lsmtd-white); color: var(--lsmtd-text-secondary);
  border-color: var(--lsmtd-neutral-6);
}
.ls-mtd-uk .ls-btn--ghost:hover { border-color: var(--lsmtd-neutral-10); color: var(--lsmtd-dark-blue); }
.ls-mtd-uk .ls-btn--sm { padding: 8px 16px; font-size: 14px; min-height: 40px; }
.ls-mtd-uk .ls-btn--cta { padding: 15px 32px; font-size: 17px; }

.ls-mtd-uk .ls-spinner-inline {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: var(--lsmtd-white);
  animation: lsmtd-spin .7s linear infinite;
}
@keyframes lsmtd-spin { to { transform: rotate(360deg); } }

/* ---- Errors ---- */
.ls-mtd-uk .ls-form-error {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px;
  background: #fbe9eb; border-left: 3px solid var(--lsmtd-coral-dark);
  font-size: 14px; color: var(--lsmtd-coral-dark);
}

/* ============================================================
 * Result
 * ============================================================ */

/* ---- Verdict banner ---- */
.ls-mtd-uk .ls-verdict {
  border-radius: 16px; padding: 28px; margin-bottom: 16px;
  border: 1px solid var(--lsmtd-neutral-7); background: var(--lsmtd-white);
  border-top: 4px solid var(--lsmtd-blue);
}
.ls-mtd-uk .ls-verdict--urgent { border-top-color: var(--lsmtd-coral); background: #fff7f8; }
.ls-mtd-uk .ls-verdict--info { border-top-color: var(--lsmtd-blue); background: var(--lsmtd-steel-blue); }
.ls-mtd-uk .ls-verdict--clear { border-top-color: var(--lsmtd-green); background: var(--lsmtd-mint); }

.ls-mtd-uk .ls-verdict-flag {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
  background: var(--lsmtd-dark-blue); color: var(--lsmtd-white); margin-bottom: 14px;
}
.ls-mtd-uk .ls-verdict--urgent .ls-verdict-flag { background: var(--lsmtd-coral-dark); }
.ls-mtd-uk .ls-verdict--clear .ls-verdict-flag { background: var(--lsmtd-green-dark); }

.ls-mtd-uk .ls-verdict-head {
  font-size: clamp(24px, 4.5vw, 32px); font-weight: 900; line-height: 1.15;
  letter-spacing: -.015em; margin: 0 0 8px; color: var(--lsmtd-dark-blue);
}
.ls-mtd-uk .ls-verdict-sub {
  font-size: 17px; color: var(--lsmtd-text-secondary); margin: 0;
}

.ls-mtd-uk .ls-verdict-facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px; margin: 22px 0 0; padding-top: 20px;
  border-top: 1px solid rgba(15, 46, 90, .12);
}
.ls-mtd-uk .ls-verdict-facts dt {
  font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
  color: var(--lsmtd-neutral-10); margin-bottom: 3px;
}
.ls-mtd-uk .ls-verdict-facts dd {
  margin: 0; font-size: 17px; font-weight: 900; color: var(--lsmtd-dark-blue);
}

/* ---- Why block: the two-years-prior reveal ---- */
.ls-mtd-uk .ls-why-body { margin: 0; font-size: 16px; color: var(--lsmtd-text-secondary); }
.ls-mtd-uk .ls-reassure {
  margin: 16px 0 0; padding: 14px 16px; border-radius: 10px;
  background: var(--lsmtd-mint); border: 1px solid #b8ecd9;
  font-size: 15px; color: #185c47;
}

/* ---- Recheck-your-figures nudge ---- */
.ls-mtd-uk .ls-recheck {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 16px 20px; margin-bottom: 16px; border-radius: 12px;
  background: #fff8ec; border: 1px solid #ffe0b0;
}
.ls-mtd-uk .ls-recheck-text { flex: 1 1 260px; }
.ls-mtd-uk .ls-recheck p { margin: 0; font-size: 15px; color: #7a4c07; }
/* Worked example. "Your share only" is the rule people read and still get
 * wrong, so the example carries more weight than the rule sentence does. */
.ls-mtd-uk .ls-recheck-eg {
  margin-top: 6px !important; font-size: 14px !important; color: #8a6420 !important;
}

/* ---- Deadlines table ---- */
.ls-mtd-uk .ls-deadlines { width: 100%; border-collapse: collapse; }
.ls-mtd-uk .ls-deadlines td {
  padding: 12px 8px; border-bottom: 1px solid var(--lsmtd-neutral-6);
  vertical-align: top; font-size: 15px;
}
.ls-mtd-uk .ls-deadlines tr:last-child td { border-bottom: 0; }
.ls-mtd-uk .ls-deadlines tr.is-passed td { color: var(--lsmtd-neutral-10); }
.ls-mtd-uk .ls-dl-date { font-weight: 900; white-space: nowrap; padding-left: 0; }
.ls-mtd-uk .ls-dl-period strong { display: block; font-weight: 700; }
.ls-mtd-uk .ls-dl-period span {
  display: block; font-size: 13px; color: var(--lsmtd-text-secondary); margin-top: 2px;
}
.ls-mtd-uk .ls-deadlines tr.is-passed .ls-dl-period span { color: var(--lsmtd-neutral-10); }
.ls-mtd-uk .ls-dl-state {
  text-align: right; padding-right: 0; white-space: nowrap;
  font-size: 12px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase;
  color: var(--lsmtd-neutral-10);
}
.ls-mtd-uk .ls-dl-final td { border-top: 2px solid var(--lsmtd-neutral-6); }

/* ---- Next steps ---- */
.ls-mtd-uk .ls-steps-list { margin: 0; padding-left: 22px; }
.ls-mtd-uk .ls-steps-list li { margin-bottom: 12px; font-size: 16px; }
.ls-mtd-uk .ls-steps-list li:last-child { margin-bottom: 0; }
.ls-mtd-uk .ls-steps-list li::marker { font-weight: 900; color: var(--lsmtd-blue); }

/* ---- Caveats ---- */
.ls-mtd-uk .ls-caveats ul { margin: 0; padding-left: 20px; }
.ls-mtd-uk .ls-caveats li {
  margin-bottom: 10px; font-size: 15px; color: var(--lsmtd-text-secondary);
}
.ls-mtd-uk .ls-caveats li:last-child { margin-bottom: 0; }

/* ---- CTA ---- */
.ls-mtd-uk .ls-cta {
  background: var(--lsmtd-dark-blue); color: var(--lsmtd-white);
  border-radius: 16px; padding: 32px 28px; margin-bottom: 16px; text-align: center;
}
.ls-mtd-uk .ls-cta-head {
  font-size: 22px; font-weight: 900; margin: 0 0 8px; color: var(--lsmtd-white);
  letter-spacing: -.01em;
}
.ls-mtd-uk .ls-cta-body {
  margin: 0 auto 20px; max-width: 520px; font-size: 15px; color: var(--lsmtd-soft-blue);
}
.ls-mtd-uk .ls-cta .ls-btn--primary { background: var(--lsmtd-coral); }
.ls-mtd-uk .ls-cta .ls-btn--primary:hover { background: var(--lsmtd-coral-dark); }
.ls-mtd-uk .ls-cta-secondary {
  display: block; margin-top: 16px; font-size: 15px; font-weight: 700;
  color: var(--lsmtd-soft-blue); text-decoration: underline;
}
.ls-mtd-uk .ls-cta-secondary:hover { color: var(--lsmtd-white); }

/* ---- Result actions + disclaimer ---- */
.ls-mtd-uk .ls-result-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ls-mtd-uk .ls-pdf-status {
  margin: 12px 0 0; font-size: 14px; color: var(--lsmtd-text-secondary);
}
.ls-mtd-uk .ls-pdf-status.is-error { color: var(--lsmtd-coral-dark); }
.ls-mtd-uk .ls-disclaimer {
  margin: 24px 0 0; font-size: 13px; line-height: 1.6; color: var(--lsmtd-dark-grey);
}
.ls-mtd-uk .ls-disclaimer a { color: var(--lsmtd-blue); }

/* ---- Lead-capture modal ---- */
.ls-mtd-uk .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: lsmtd-backdrop-in .2s ease;
  box-sizing: border-box;
}
.ls-mtd-uk .ls-modal-backdrop.is-open { display: flex; }
@keyframes lsmtd-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.ls-mtd-uk .ls-modal {
  background: var(--lsmtd-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: lsmtd-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;
}
@keyframes lsmtd-modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
/* OptiMonk renders its own full form, so our chrome collapses out of the way
 * once the campaign has mounted. */
.ls-mtd-uk .ls-modal:has(.om-embedded-campaign) { max-width: 760px; padding: 8px 8px 12px; }
.ls-mtd-uk .ls-modal:has(.om-embedded-campaign) .ls-modal-icon,
.ls-mtd-uk .ls-modal:has(.om-embedded-campaign) #lsmtd-modal-title,
.ls-mtd-uk .ls-modal:has(.om-embedded-campaign) > p { display: none; }
.ls-mtd-uk .ls-modal:has(.om-embedded-campaign) .om-embedded-campaign { margin: 0 0 8px; }
.ls-mtd-uk .ls-modal:has(.om-embedded-campaign) .ls-modal-trust { margin-top: 8px; padding: 0 16px 8px; }
.ls-mtd-uk .ls-modal-close {
  position: absolute; top: 14px; right: 14px;
  background: transparent; border: 0;
  width: 32px; height: 32px; cursor: pointer;
  color: var(--lsmtd-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-mtd-uk .ls-modal-close:hover { background: var(--lsmtd-back-grey); color: var(--lsmtd-dark-blue); }
.ls-mtd-uk .ls-modal-icon {
  width: 56px; height: 56px; border-radius: 12px;
  background: var(--lsmtd-steel-blue); color: var(--lsmtd-blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.ls-mtd-uk .ls-modal-icon svg { width: 28px; height: 28px; }
.ls-mtd-uk .ls-modal h3 {
  font-family: 'Lato', sans-serif; font-size: 24px; font-weight: 900;
  color: var(--lsmtd-dark-blue); margin: 0 0 8px 0; line-height: 1.2;
}
.ls-mtd-uk .ls-modal p {
  color: var(--lsmtd-text-secondary); font-size: 15px;
  margin: 0 0 24px 0; line-height: 1.5;
}
.ls-mtd-uk .ls-modal-trust {
  text-align: center; font-size: 12px;
  color: var(--lsmtd-dark-grey); margin-top: 16px; line-height: 1.5;
}
.ls-mtd-uk .ls-modal-trust strong { color: var(--lsmtd-dark-blue); }

/* ---- Responsive ----
 * Primary visitor is on a phone from a Google search, so these two
 * breakpoints matter more than the desktop base rules above. */
@media (max-width: 720px) {
  .ls-mtd-uk { padding: 16px 16px 40px; }
  .ls-mtd-uk .ls-card-main,
  .ls-mtd-uk .ls-verdict { padding: 20px 18px; }
  .ls-mtd-uk .ls-cta { padding: 26px 20px; }
  .ls-mtd-uk .ls-verdict-facts { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ls-mtd-uk .ls-deadlines td { padding: 10px 6px; font-size: 14px; }
  .ls-mtd-uk .ls-dl-date { font-size: 14px; white-space: normal; }
}
@media (max-width: 640px) {
  /* Steps collapse to number-over-label so four of them still fit. */
  .ls-mtd-uk .ls-steps { gap: 4px; padding: 10px 8px; }
  .ls-mtd-uk .ls-step {
    flex-direction: column; gap: 4px; padding: 6px 2px;
    font-size: 11px; text-align: center;
  }
  .ls-mtd-uk .ls-step-label { white-space: normal; line-height: 1.25; }
  .ls-mtd-uk .ls-actions { flex-direction: column-reverse; align-items: stretch; }
  .ls-mtd-uk .ls-actions .ls-btn { width: 100%; }
  .ls-mtd-uk .ls-result-actions .ls-btn { width: 100%; }
  .ls-mtd-uk .ls-modal-backdrop { padding: 12px; }
  .ls-mtd-uk .ls-modal { padding: 28px 22px 22px; max-height: calc(100vh - 24px); }
  .ls-mtd-uk .ls-modal:has(.om-embedded-campaign) { padding: 6px; }
  /* The deadline table's "Passed" column earns its keep least on a phone. */
  .ls-mtd-uk .ls-dl-state { display: none; }
}

/* ============================================================
 * Print isolation
 *
 * The tool sits deep inside Webflow's DOM, so we hide everything and
 * re-reveal only our own ancestor chain plus the result panel. JS adds
 * .lsmtd-print-ancestor on beforeprint.
 *
 * NOTE: `display: revert !important` on every descendant of the panel brings
 * back things meant to stay hidden — the modal backdrop and any OptiMonk
 * campaign div injected into the tool root. Each needs an explicit escape
 * below. Add to that list, don't remove from it.
 *
 * ⚠️ The restate selectors must stay at specificity ≥ (0,2,1) or they lose to
 * the `body *` rule and the whole result prints blank.
 * ============================================================ */
@media print {
  body * { display: none !important; }
  body .lsmtd-print-ancestor {
    display: block !important;
    margin: 0 !important; padding: 0 !important;
    width: auto !important; max-width: none !important;
  }
  body .ls-mtd-uk,
  body .ls-mtd-uk .ls-tool,
  body .ls-mtd-uk [data-panel="5"],
  body .ls-mtd-uk [data-panel="5"] * { display: revert !important; }

  body .ls-mtd-uk {
    background: #fff !important; padding: 0 !important; max-width: none !important;
  }
  body .ls-mtd-uk .ls-card-main,
  body .ls-mtd-uk .ls-verdict {
    border: 1px solid #dfe3e8 !important; break-inside: avoid;
  }
  /* Escapes from the revert above. */
  body .ls-mtd-uk .ls-modal-backdrop,
  body .ls-mtd-uk .om-embedded-campaign,
  body .ls-mtd-uk .ls-result-actions,
  body .ls-mtd-uk .ls-recheck .ls-btn { display: none !important; }
  body .ls-mtd-uk .ls-cta {
    background: #fff !important; color: #0f2e5a !important;
    border: 1px solid #dfe3e8 !important;
  }
  body .ls-mtd-uk .ls-cta-head { color: #0f2e5a !important; }
  body .ls-mtd-uk .ls-cta-body,
  body .ls-mtd-uk .ls-cta-secondary { color: #4b6283 !important; }
}
