/* MHFP Lot Fit Checker: isolated front-end styles */
button#mhfp-lf-trigger {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 7px 15px 7px 13px;
  vertical-align: middle;
  margin: 0 0 0 12px;
  border: 1px solid #ffc90d;
  border-radius: 10px;
  background: #25293b;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  transition: background .18s ease, box-shadow .18s ease, border-color .18s ease;
}
button#mhfp-lf-trigger:hover {
  background: #343b51;
  border-color: #ffdf54;
  color: #fff;
  box-shadow: 0 4px 12px rgb(0 0 0 / 14%);
}
button#mhfp-lf-trigger:focus-visible {
  outline: 3px solid #ffc90d;
  outline-offset: 3px;
}
button#mhfp-lf-trigger .mhfp-lf-trigger-icon {
  box-sizing: content-box;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  color: #ffc90d;
  fill: none;
  stroke: currentColor;
}
button#mhfp-lf-trigger.mhfp-lf-fallback {
  margin: 12px 0;
}

body.mhfp-lf-scroll-lock { overflow: hidden !important; }
.mhfp-lf-overlay,
.mhfp-lf-overlay * { box-sizing: border-box; }
.mhfp-lf-overlay {
  --mhfp-navy: #25293b;
  --mhfp-gold: #ffc90d;
  --mhfp-border: #dfe5ed;
  --mhfp-muted: #607086;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  padding: 18px;
  background: rgb(10 15 30 / 72%);
  -webkit-overflow-scrolling: touch;
}
.mhfp-lf-overlay[hidden] { display: none !important; }
.mhfp-lf-dialog {
  position: relative;
  width: min(875px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  border: 1px solid #dee2eb;
  border-radius: 16px;
  background: #f7f9fc;
  color: var(--mhfp-navy);
  box-shadow: 0 28px 80px rgb(0 0 0 / 35%);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  overscroll-behavior: contain;
}
.mhfp-lf-dialog h2,
.mhfp-lf-dialog h3,
.mhfp-lf-dialog p { padding: 0; margin: 0; }
.mhfp-lf-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 27px 20px;
  border-bottom: 4px solid var(--mhfp-gold);
  background: var(--mhfp-navy);
  color: #fff;
}
.mhfp-lf-eyebrow {
  color: var(--mhfp-gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  margin-bottom: 6px;
}
.mhfp-lf-dialog #mhfp-lf-title {
  color: #fff;
  font-size: clamp(21px, 2.1vw, 26px);
  font-weight: 800;
  line-height: 1.2;
}
.mhfp-lf-dialog #mhfp-lf-subtitle {
  color: #d7deeb;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 8px;
  max-width: 650px;
}
.mhfp-lf-dialog .mhfp-lf-close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  border: 1px solid #74809a;
  border-radius: 50%;
  background: #354056;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
}
.mhfp-lf-dialog .mhfp-lf-close:hover { background: #4e5b70; }
.mhfp-lf-dialog #mhfp-lf-form { padding: 23px 27px 17px; margin: 0; }
.mhfp-lf-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 15px;
}
.mhfp-lf-column { display: flex; flex-direction: column; gap: 15px; min-width: 0; }
.mhfp-lf-panel {
  padding: 17px 17px 15px;
  background: #fff;
  border: 1px solid var(--mhfp-border);
  border-radius: 12px;
}
.mhfp-lf-dialog .mhfp-lf-panel h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 15px;
  color: #26324c;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}
.mhfp-lf-step {
  display: inline-grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--mhfp-gold);
  color: #20293e;
  font-size: 12px;
  font-weight: 900;
}
.mhfp-lf-fields-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mhfp-lf-dialog label.mhfp-lf-field { display: block; padding: 0; margin: 0; font-weight: 600; }
.mhfp-lf-field span {
  display: block;
  margin-bottom: 6px;
  color: #2f3b50;
  font-size: 12px;
  font-weight: 700;
}
.mhfp-lf-dialog .mhfp-lf-field input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  margin: 0;
  border: 1px solid #c9d1de;
  border-radius: 8px;
  outline: none;
  box-shadow: none;
  background: #fff;
  color: #202b44;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  text-align: left;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.mhfp-lf-dialog .mhfp-lf-field input:focus {
  border-color: #bd9400;
  box-shadow: 0 0 0 3px rgb(255 201 13 / 20%);
}
.mhfp-lf-dialog .mhfp-lf-field input[aria-invalid="true"] {
  border-color: #c73636;
  box-shadow: 0 0 0 2px rgb(199 54 54 / 12%);
}
.mhfp-lf-dialog .mhfp-lf-field input::placeholder { color: #95a0b0; font-weight: 400; opacity: 1; }
.mhfp-lf-dialog .mhfp-lf-panel-intro {
  margin: -5px 0 12px;
  color: var(--mhfp-muted);
  font-size: 12px;
  line-height: 1.45;
}
.mhfp-lf-dialog .mhfp-lf-hint {
  margin: 10px 0 0;
  color: var(--mhfp-muted);
  font-size: 11px;
  line-height: 1.45;
}
.mhfp-lf-dialog .mhfp-lf-source {
  padding: 9px 10px;
  margin: 13px 0 0;
  border-radius: 7px;
  background: #f0f6fb;
  color: #4f6376;
  font-size: 11px;
  line-height: 1.5;
}
.mhfp-lf-dialog .mhfp-lf-source-warning { background: #fff8df; color: #69531b; }
.mhfp-lf-visual-panel { flex: 1; }
.mhfp-lf-diagram-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #28364c;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}
.mhfp-lf-diagram-title span { font-size: 10px; font-weight: 500; color: var(--mhfp-muted); }
.mhfp-lf-diagram-frame {
  border: 1px solid #e1e8ef;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}
.mhfp-lf-diagram-frame svg { display: block; width: 100%; max-height: 162px; height: auto; }
.mhfp-lf-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; font-size: 10px; color: #516078; }
.mhfp-lf-legend span { display: inline-flex; align-items: center; gap: 5px; }
.mhfp-lf-legend i { width: 11px; height: 11px; display: inline-block; border-radius: 2px; flex-shrink: 0; }
.mhfp-lf-legend-lot { background: #e7eff6; border: 1px solid #57748a; }
.mhfp-lf-legend-buildable { background: #d5eee2; border: 1px dashed #328762; }
.mhfp-lf-legend-plan { background: #ffdf68; border: 1px solid #b58a00; }
.mhfp-lf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 18px 0 14px; }
.mhfp-lf-dialog .mhfp-lf-calculate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 145px;
  min-height: 43px;
  padding: 10px 18px;
  margin: 0;
  border: 0;
  border-radius: 9px;
  background: var(--mhfp-gold);
  color: var(--mhfp-navy);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.mhfp-lf-dialog .mhfp-lf-calculate:hover { background: #ffdc49; }
.mhfp-lf-dialog .mhfp-lf-reset {
  padding: 8px 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: #425878;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.mhfp-lf-local-note { margin-left: auto; color: #687587; font-size: 11px; }
.mhfp-lf-result {
  padding: 14px 17px;
  border: 1px solid #d6deeb;
  border-radius: 10px;
  background: #fff;
  color: #2c3851;
  font-size: 13px;
  line-height: 1.5;
}
.mhfp-lf-result-idle { background: #f2f5f9; color: #546277; }
.mhfp-lf-result-error { background: #fff6f3; border-color: #e8b3aa; color: #82372b; }
.mhfp-lf-result-success { background: #eff8f1; border-color: #a9d4b1; color: #224d32; }
.mhfp-lf-result-no-fit { background: #fff6f1; border-color: #eac0a4; color: #6c3d26; }
.mhfp-lf-result .mhfp-lf-result-title { margin-bottom: 6px; font-size: 16px; font-weight: 800; }
.mhfp-lf-result p { margin: 6px 0; }
.mhfp-lf-metrics { display: flex; flex-wrap: wrap; gap: 20px; margin: 12px 0 10px; }
.mhfp-lf-metrics > div { display: flex; flex-direction: column; gap: 3px; }
.mhfp-lf-metrics span { color: #5e6a7a; font-size: 11px; }
.mhfp-lf-metrics strong { color: #222f49; font-size: 14px; }
.mhfp-lf-clearances { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.mhfp-lf-dialog .mhfp-lf-result-caveat,
.mhfp-lf-dialog .mhfp-lf-tight { margin-top: 11px; font-size: 11px; line-height: 1.5; }
.mhfp-lf-dialog .mhfp-lf-shortfall { font-weight: 700; margin-top: 10px; }
.mhfp-lf-dialog .mhfp-lf-disclaimer {
  margin: 0;
  padding: 15px 27px 19px;
  border-top: 1px solid #e0e5ed;
  color: #626e7c;
  background: #f0f3f8;
  font-size: 11px;
  line-height: 1.55;
}
.mhfp-lf-dialog button:focus-visible { outline: 3px solid #b38b00; outline-offset: 3px; }

@media (max-width: 720px) {
  .mhfp-lf-overlay { align-items: flex-start; padding: 10px; }
  .mhfp-lf-dialog { max-height: calc(100dvh - 20px); border-radius: 13px; }
  .mhfp-lf-head { padding: 18px 17px; }
  .mhfp-lf-dialog #mhfp-lf-form { padding: 16px 14px; }
  .mhfp-lf-columns { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .mhfp-lf-column { gap: 12px; }
  .mhfp-lf-panel { padding: 15px 12px; }
  .mhfp-lf-diagram-frame svg { max-height: 180px; }
  .mhfp-lf-local-note { width: 100%; margin-left: 0; }
  .mhfp-lf-dialog .mhfp-lf-disclaimer { padding: 15px 16px 20px; }
  button#mhfp-lf-trigger { margin-left: 10px; }
}
@media (max-width: 430px) {
  button#mhfp-lf-trigger { margin: 10px 0 0; }
  .mhfp-lf-fields-two { gap: 8px; }
  .mhfp-lf-metrics { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  button#mhfp-lf-trigger, .mhfp-lf-field input { transition: none; }
}
