.measured-plans {
  --fp-blue: #2457a7;
  --fp-ink: #25233a;
  --fp-muted: #5f6878;
  --fp-tint: #eef3f9;
  --fp-line: #d9e3f0;
  color: var(--fp-ink);
  font-variant-numeric: tabular-nums;
}

.measured-plans :is(h1, h2, h3, h4) {
  color: inherit;
}

.measured-plans :is(button, select, a):focus-visible,
.measured-plans summary:focus-visible {
  outline: 2px solid var(--fp-blue);
  outline-offset: 2px;
}

.measured-plans [hidden] {
  display: none !important;
}

.fp-compare {
  margin: 44px 0;
  scroll-margin-top: 95px;
}

.fp-compare h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 13px;
}

.fp-compare-intro {
  color: var(--fp-muted);
  margin: -6px 0 12px;
  font-size: 15px;
  line-height: 1.45;
}

.fp-compare-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--fp-line);
}

.fp-control {
  background: white;
  color: var(--fp-ink);
  border: 1px solid var(--fp-line);
  border-radius: 5px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  min-height: 40px;
  padding: 7px 11px;
}

.fp-control:is(:hover, :focus-visible) {
  background-color: var(--fp-tint);
  color: var(--fp-blue);
}

.fp-control:is([aria-selected="true"], [aria-current], [aria-pressed="true"]) {
  background-color: var(--fp-blue);
  color: white;
  border-color: var(--fp-blue);
}

.fp-control:disabled {
  opacity: .55;
  cursor: default;
}

.fp-compare-tabs .fp-control {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  font-size: 16px;
  font-weight: 600;
  min-height: 45px;
  padding-inline: 15px;
}

.fp-compare-tabs .fp-control[aria-selected="true"] {
  background: transparent;
  border-color: var(--fp-blue);
  color: var(--fp-blue);
  font-weight: 800;
}

.fp-compare-count {
  color: var(--fp-muted);
  font-size: 14px;
  font-weight: 600;
}

.fp-compare-panel {
  border: 1px solid var(--fp-line);
  border-radius: 5px;
  margin-block-end: 12px;
  overflow: hidden;
}

.fp-compare-grid {
  display: grid;
  grid-template-columns: minmax(145px, 1.45fr) repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  min-height: 42px;
  line-height: 1.3;
  text-align: right;
}

.fp-compare-labels {
  background: #f1f5fa;
  font-size: 14px;
  font-weight: 700;
}

.fp-compare-row {
  border-top: 1px solid var(--fp-line);
  color: var(--fp-ink);
  min-height: 71px;
}

.fp-compare-row:is(:hover, :focus-visible) {
  background-color: var(--fp-tint);
  box-shadow: inset 3px 0 0 var(--fp-blue);
  color: var(--fp-ink);
}

.fp-compare-row:focus-visible {
  outline-offset: -3px !important;
}

.fp-compare-type {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--fp-blue);
  font-size: 17px;
  font-weight: 800;
  text-align: left;
}

.fp-compare-thumb {
  --fp-thumb-height: 58px;
  display: grid;
  place-items: center;
  width: 74px;
  height: var(--fp-thumb-height);
  flex: none;
}

.fp-compare-thumb-inner {
  display: block;
  position: relative;
  overflow: hidden;
  width: min(100%, calc(var(--fp-thumb-height) * var(--fp-thumb-ratio)));
  aspect-ratio: var(--fp-thumb-ratio);
  background: white;
}

.fp-compare-thumb-inner img {
  position: absolute;
  left: var(--fp-thumb-image-left);
  top: var(--fp-thumb-image-top);
  width: var(--fp-thumb-image-width);
  height: var(--fp-thumb-image-height);
  max-width: none;
}

.fp-compare-thumb-inner svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fp-living-highlight {
  fill: var(--fp-blue);
  fill-opacity: .36;
}

.fp-compare-total {
  font-weight: 800;
}

.fp-compare-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.fp-viewer {
  --fp-gutter: max(clamp(24px, 5vw, 64px), calc((100% - 1152px) / 2));
  background: white;
  line-height: 1.35;
}

.fp-breadcrumb,
.fp-type-bar,
.fp-variant-bar,
.fp-workspace,
.fp-fallback {
  padding-inline: var(--fp-gutter);
}

.fp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 48px;
  font-size: 15px;
  font-weight: 650;
  color: var(--fp-blue);
}

.fp-viewer a {
  color: var(--fp-blue);
}

.fp-type-bar,
.fp-variant-bar,
.fp-drawing-head,
.fp-dialog-head,
.fp-key-head,
.fp-index-head,
.fp-room-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fp-type-bar {
  position: relative;
  z-index: 3;
  padding-block: 16px;
  background: var(--fp-tint);
}

.fp-project-name,
.fp-dialog-project {
  display: block;
  color: var(--fp-muted);
  font-size: 15px;
  font-weight: 650;
}

.fp-project-back {
  display: none;
}

.fp-type-menu summary,
.fp-notes summary {
  list-style: none;
  cursor: pointer;
}

.fp-type-menu summary::-webkit-details-marker,
.fp-notes summary::-webkit-details-marker {
  display: none;
}

.fp-type-menu summary,
.fp-index-head strong,
.fp-room-dimensions,
.fp-key-head h2,
.fp-room-head h3 {
  font-family: var(--brand-font) !important;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.3;
}

.fp-type-menu summary {
  width: fit-content;
  color: var(--fp-ink);
  font-size: 30px;
}

.fp-type-menu summary::after,
.fp-notes summary::after {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--fp-blue);
  border-bottom: 2px solid var(--fp-blue);
  transform: rotate(45deg);
  content: "";
}

.fp-type-menu summary::after {
  margin-left: 14px;
  vertical-align: .2em;
}

.fp-type-menu[open] summary::after,
.fp-notes details[open] summary::after {
  transform: rotate(225deg);
}

.fp-plan-index {
  position: absolute;
  top: 100%;
  left: var(--fp-gutter);
  width: min(660px, 90%);
  max-height: min(62dvh, 550px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px 24px;
  background: white;
  border: 1px solid var(--fp-line);
  box-shadow: 0 6px 16px rgb(37 35 58 / 10%);
}

.fp-index-head strong {
  font-size: 24px;
}

.fp-plan-group {
  padding-block: 12px;
  border-bottom: 1px solid var(--fp-line);
  font-size: 17px;
  font-weight: 700;
}

.fp-plan-group:last-child {
  border-bottom: 0;
}

.fp-plan-types {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.fp-plan-types a,
.fp-controls a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fp-plan-types a {
  min-width: 62px;
  color: var(--fp-ink);
}

.fp-viewer .fp-control[aria-current] {
  color: white;
}

.fp-brochure-area {
  color: var(--fp-muted);
  text-align: right;
  font-size: 14px;
  font-weight: 600;
}

.fp-brochure-area strong {
  display: block;
  color: var(--fp-ink);
  font-size: 21px;
}

.fp-variant-bar {
  padding-block: 10px;
  border-bottom: 1px solid var(--fp-line);
  font-size: 17px;
  font-weight: 700;
}

.fp-controls,
.fp-layer-bar {
  display: flex;
  align-items: center;
  gap: 5px;
}

.fp-controls .fp-control {
  min-height: 38px;
  padding-inline: 14px;
  font-size: 15px;
}

.fp-workspace {
  display: grid;
  grid-template-columns: minmax(0, 714fr) minmax(0, 400fr);
  align-items: start;
  gap: clamp(24px, 3vw, 38px);
  margin: 20px 0 12px;
}

.fp-drawing {
  min-width: 0;
  margin: 0;
}

.fp-drawing-head,
.fp-dialog-head {
  padding-inline: 12px;
  min-height: 48px;
  border-bottom: 1px solid var(--fp-line);
}

.fp-layer-bar button,
.fp-action,
.fp-reset {
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.fp-layer-bar button {
  min-height: 44px;
  padding: 8px 16px;
  border-bottom: 3px solid transparent;
  color: var(--fp-muted);
}

.fp-layer-bar button[aria-pressed="true"] {
  color: var(--fp-blue);
  border-color: currentColor;
}

.fp-layer-bar button:disabled {
  color: var(--fp-muted);
  opacity: .6;
}

.fp-action,
.fp-reset {
  min-height: 38px;
  padding: 4px 2px;
  color: var(--fp-blue);
}

.fp-reset {
  color: var(--fp-muted);
  font-weight: 600;
  text-decoration: underline;
}

.fp-enlarge svg {
  width: 17px;
  height: 17px;
  vertical-align: -.18em;
  margin-right: 4px;
}

.fp-viewport {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  height: clamp(360px, 40vw, 506px);
  overflow: hidden;
}

.fp-viewport > svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  user-select: none;
}

.fp-room-shape {
  cursor: pointer;
  vector-effect: non-scaling-stroke;
  stroke-width: 1;
  fill-opacity: .25;
}

.fp-room-shape.is-selected,
.fp-room-shape:hover {
  fill-opacity: .31;
  stroke-width: 2;
}

.fp-room-shape:focus-visible {
  stroke: var(--fp-ink);
  stroke-width: 3;
  outline: none;
}

.fp-sidebar {
  display: grid;
  min-width: 0;
  gap: 16px;
  padding-top: 10px;
}

.fp-key-head {
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--fp-line);
}

.fp-key-head h2,
.fp-room-head h3 {
  margin: 0;
  font-size: 25px;
}

.fp-key-head > span,
.fp-room-number {
  color: var(--fp-muted);
  font-size: 14px;
  font-weight: 650;
}

.fp-room-row {
  display: grid;
  grid-template-columns: 5px 18px 1fr auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 34px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid var(--fp-line);
  background: white;
  color: var(--fp-ink);
  font: inherit;
  font-size: 16px;
  text-align: left;
}

.fp-room-row:hover,
.fp-room-row:focus-visible {
  background: var(--fp-tint);
}

.fp-room-row::before,
.fp-room-head h3::before {
  display: block;
  height: 16px;
  border-radius: 3px;
  background: var(--room-color);
  content: "";
}

.fp-room-group {
  margin: 12px 0 0;
  color: var(--fp-muted);
  font-size: 14px;
  font-weight: 700;
}

.fp-room-name {
  font-weight: 650;
}

.fp-room-area {
  font-weight: 700;
  white-space: nowrap;
}

.fp-room-head h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 30px;
}

.fp-room-head h3::before {
  flex: 0 0 6px;
  height: 24px;
}

.fp-room-head .fp-reset {
  flex-shrink: 0;
}

.fp-room-dimensions {
  font-size: 34px;
  margin: 6px 0;
}

.fp-room-stats {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  margin: 0 0 12px;
}

.fp-room-stats dt,
.fp-room-stats dd {
  margin: 0;
  padding: 7px 0;
  font-size: 16px;
}

.fp-room-stats dt {
  font-weight: 600;
}

.fp-room-stats dd {
  font-size: 17px;
  font-weight: 700;
  text-align: right;
}

.fp-room-stats dt:first-child,
.fp-room-stats dt:first-child + dd {
  border-bottom: 1px solid var(--fp-line);
  align-self: stretch;
}

.fp-room-stats dt:first-child + dd {
  font-size: 20px;
}

.fp-qualification,
.fp-detail-note,
.fp-notes p,
.fp-status {
  color: var(--fp-muted);
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
}

.fp-status strong,
.fp-status span {
  display: block;
}

.fp-status strong {
  color: var(--fp-ink);
}

.fp-notes {
  display: grid;
  gap: 12px;
}

.fp-notes summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding-right: 5px;
  border-bottom: 1px solid var(--fp-line);
  color: var(--fp-blue);
  font-size: 15px;
  font-weight: 700;
}

.fp-fallback {
  padding-block: 12px;
}

.fp-fallback .fp-type-bar {
  margin: 14px 0;
  padding-inline: 12px;
}

.fp-fallback .fp-type-bar h2 {
  margin: 0;
  font-size: 23px;
}

.fp-dialog {
  box-sizing: border-box;
  position: fixed;
  width: min(100%, 1100px);
  height: min(100%, 900px);
  max-width: 100%;
  max-height: 100%;
  color: var(--fp-ink);
  background: white;
  border: 1px solid var(--fp-line);
  border-radius: 8px;
  padding: 0;
  margin: auto;
}

.fp-dialog[open] {
  display: flex;
  flex-direction: column;
}

.fp-dialog::backdrop {
  background: rgb(37 35 58 / 64%);
}

.fp-dialog .fp-viewport {
  flex: 1;
  height: auto;
  touch-action: none;
  cursor: grab;
}

.fp-dialog .fp-viewport.is-panning {
  cursor: grabbing;
}

.fp-dialog .fp-viewport:focus-visible {
  outline: 2px solid var(--fp-blue);
  outline-offset: -3px;
}

.fp-dialog-head {
  min-height: 60px;
}

.fp-dialog-head strong {
  font-family: var(--brand-font);
  font-size: 20px;
}

.fp-zoom-bar {
  justify-content: center;
  min-height: 48px;
  gap: 14px;
  border-bottom: 1px solid var(--fp-line);
}

.fp-zoom-bar output {
  color: var(--fp-ink);
  font-size: 15px;
  font-weight: 700;
}

@media (max-width: 767px) {
  .fp-compare-tabs {
    gap: 4px;
  }

  .fp-compare-tabs .fp-control {
    flex: 1 1 auto;
    font-size: clamp(13px, 3.8vw, 16px);
    padding-inline: 5px;
    min-height: 44px;
  }

  .fp-compare-count {
    font-size: 12px;
  }

  .fp-compare-labels {
    display: none;
  }

  .fp-compare-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 8px;
    padding: 10px 12px;
    text-align: left;
  }

  .fp-compare-row:first-of-type {
    border-top: 0;
  }

  .fp-compare-type {
    grid-column: span 3;
  }

  .fp-compare-thumb {
    --fp-thumb-height: 48px;
    width: 55px;
  }

  .fp-compare-total {
    display: flex;
    flex-direction: column-reverse;
    text-align: right;
    font-size: 18px;
  }

  .fp-compare-field {
    display: block;
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
    font-weight: 600;
    color: var(--fp-muted);
    font-size: 12px;
  }

  .fp-viewer {
    --fp-gutter: 18px;
  }

  .fp-viewer:has([data-interactive-viewer]:not([hidden])) .fp-breadcrumb,
  .fp-project-name {
    display: none;
  }

  .fp-project-back {
    display: inline-block;
    font-size: 13px;
    font-weight: 650;
  }

  .fp-type-bar {
    position: sticky;
    top: 72px;
    padding-block: 12px;
  }

  .fp-fallback .fp-type-bar {
    position: static;
  }

  .fp-type-menu summary,
  .fp-room-head h3,
  .fp-key-head h2 {
    font-size: 23px;
  }

  .fp-plan-index {
    left: 0;
    width: 100%;
    padding-inline: var(--fp-gutter);
  }

  .fp-plan-types {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .fp-plan-types a {
    min-width: 0;
    min-height: 44px;
  }

  .fp-brochure-area {
    font-size: 12px;
  }

  .fp-brochure-area strong,
  .fp-variant-bar {
    font-size: 16px;
  }

  .fp-variant-bar {
    padding-block: 8px;
  }

  .fp-workspace {
    display: block;
    margin: 0;
    padding: 0;
  }

  .fp-drawing-head,
  .fp-dialog-head {
    padding-inline: var(--fp-gutter);
  }

  .fp-layer-bar button {
    padding-inline: 10px;
  }

  .fp-viewport {
    height: clamp(285px, 88vw, 445px);
  }

  .fp-sidebar {
    padding: 12px var(--fp-gutter);
  }

  .fp-room-row {
    min-height: 44px;
  }

  .fp-room-dimensions {
    font-size: 29px;
  }

  .fp-dialog {
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
}

.fp-fallback-plan {
  display: none;
  scroll-margin-top: 90px;
}

.fp-fallback-plan:target,
.fp-fallback:not(:has(.fp-fallback-plan:target)) .fp-default-plan {
  display: block;
}

.fp-fallback-image {
  position: relative;
  width: min(100%, 620px);
  aspect-ratio: var(--fp-aspect);
  margin-inline: auto;
  overflow: hidden;
}

.fp-fallback-image img {
  position: absolute;
  left: var(--fp-image-left);
  top: var(--fp-image-top);
  width: var(--fp-image-width);
  height: var(--fp-image-height);
  max-width: none;
}

.fp-fallback-image svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.fp-dialog-project {
  font-size: 13px;
}

.fp-dialog-measurement {
  max-height: 40%;
  overflow: auto;
  padding: 14px var(--fp-gutter);
}

.fp-unit-picker {
  width: 100%;
  margin-block: 4px 8px;
  padding-right: 22px;
}
