:root {
  color-scheme: light;
  --black: #0b0b0c;
  --ink: #171719;
  --ink-soft: #2c2c2f;
  --graphite: #414146;
  --muted: #68686f;
  --line: #d8d8dc;
  --line-dark: #505055;
  --surface: #ffffff;
  --surface-soft: #f4f4f5;
  --surface-mid: #e9e9eb;
  --red: #e31b23;
  --red-dark: #ba1118;
  --red-soft: #fff0f1;
  --green: #11a765;
  --green-bright: #31d887;
  --green-soft: #e9f8f1;
  --power: #ef2b35;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--surface-soft);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button:not(:disabled),
select,
input[type="range"] {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(227, 27, 35, 0.22);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
strong {
  font-weight: 700;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 3.8vw, 3.6rem);
  line-height: 1.04;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.5rem;
  line-height: 1.15;
}

h3 {
  margin-bottom: 4px;
  font-size: 1.04rem;
}

small {
  font-size: 0.78em;
}

svg,
img {
  display: block;
}

.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: var(--header-height);
  padding: 0 28px;
  color: #fff;
  border-bottom: 3px solid var(--red);
  background: var(--black);
}

.brand {
  display: flex;
  align-items: center;
  width: 198px;
  height: 50px;
}

.brand img {
  width: 100%;
  height: auto;
  max-height: 42px;
}

.product-title {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-left: 24px;
  padding-left: 24px;
  gap: 12px;
  border-left: 1px solid #4b4b4f;
  font-size: 1.1rem;
  font-weight: 700;
}

.prototype-badge {
  padding: 4px 8px;
  color: #d4d4d8;
  border: 1px solid #4d4d52;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid #d5d5d8;
  border-radius: 5px;
  background: transparent;
}

.icon-button:hover {
  border-color: var(--red);
  color: var(--red);
}

.app-header .icon-button {
  color: #fff;
  border-color: #45454a;
  background: #1f1f22;
}

.icon-button svg,
.tool-button svg,
.primary-button svg,
.secondary-button svg,
.feature-list svg,
.privacy-note svg,
.recommendation-footnote svg,
.visual-choice-copy svg,
.advanced-controls summary svg,
.segmented-control svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.step-navigation {
  position: sticky;
  z-index: 45;
  top: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}

.step-navigation ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 18px;
  list-style: none;
}

.step-navigation li {
  position: relative;
}

.step-navigation li:not(:last-child)::after {
  position: absolute;
  z-index: -1;
  top: 28px;
  right: -23%;
  width: 46%;
  height: 1px;
  content: "";
  background: var(--line);
}

.step-link {
  display: flex;
  width: 100%;
  min-height: 70px;
  padding: 10px 12px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  text-align: left;
}

.step-link .step-number {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  font-size: 0.84rem;
  font-weight: 700;
}

.step-link span:last-child {
  display: flex;
  flex-direction: column;
}

.step-link strong {
  font-size: 0.94rem;
}

.step-link small {
  color: var(--muted);
}

.step-link.is-active {
  border-bottom-color: var(--red);
}

.step-link.is-active .step-number,
.step-link.is-complete .step-number {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
}

.app-main {
  width: 100%;
}

.step-panel {
  display: none;
  width: min(1600px, calc(100% - 40px));
  min-height: calc(100vh - 144px);
  margin: 0 auto;
  padding: 42px 0 56px;
}

.step-panel.is-active {
  display: block;
}

.step-panel[data-step-panel="2"] {
  width: min(1720px, calc(100% - 20px));
  padding-top: 14px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.lead-copy {
  max-width: 620px;
  color: #d0d0d3;
  font-size: 1.16rem;
}

.intro-layout {
  display: grid;
  overflow: hidden;
  min-height: 630px;
  grid-template-columns: minmax(0, 0.86fr) minmax(560px, 1.14fr);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.intro-copy {
  position: relative;
  display: flex;
  padding: 56px;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  background: var(--ink);
}

.intro-copy::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 180px;
  height: 6px;
  content: "";
  background: var(--red);
}

.feature-list {
  display: grid;
  margin-top: 26px;
  gap: 16px;
}

.feature-list > div {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 12px;
}

.feature-list > div > svg {
  width: 38px;
  height: 38px;
  padding: 9px;
  color: #fff;
  border: 1px solid #4c4c50;
  border-radius: 5px;
  background: #29292c;
}

.feature-list span {
  display: flex;
  flex-direction: column;
  color: #c7c7ca;
  font-size: 0.92rem;
}

.feature-list strong {
  color: #fff;
}

.privacy-note {
  display: flex;
  margin: 34px 0 0;
  padding-top: 18px;
  align-items: flex-start;
  gap: 10px;
  color: #a9a9ad;
  border-top: 1px solid #3d3d41;
  font-size: 0.8rem;
}

.privacy-note strong {
  color: #fff;
}

.project-form {
  display: flex;
  padding: 52px;
  flex-direction: column;
  justify-content: center;
}

.section-heading,
.page-heading,
.recommendation-heading,
.control-title-row,
.preview-title-row,
.drawing-set-heading,
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.section-heading {
  margin-bottom: 28px;
}

.required-note {
  color: var(--muted);
  font-size: 0.76rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.field > span small {
  margin-left: 3px;
  color: var(--muted);
  font-weight: 400;
}

.span-2 {
  grid-column: span 2;
}

.field input,
.field select,
.field textarea,
.product-combobox input,
.distance-input input,
.number-stepper input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  border: 1px solid #bfc0c5;
  border-radius: 5px;
  background: #fff;
}

.field input,
.field select,
.product-combobox input {
  min-height: 45px;
  padding: 10px 12px;
}

.field textarea {
  padding: 12px;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.product-combobox input:hover,
.number-stepper:hover {
  border-color: #8f9096;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.product-combobox input:focus,
.distance-input input:focus,
.number-stepper input:focus {
  border-color: var(--red);
  outline: 0;
}

.form-error {
  min-height: 21px;
  margin: 12px 0 0;
  color: var(--red-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.panel-actions {
  display: flex;
  margin-top: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-actions-end {
  justify-content: flex-end;
}

.primary-button,
.secondary-button,
.tool-button {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 5px;
  font-weight: 700;
}

.primary-button {
  color: #fff;
  border: 1px solid var(--red);
  background: var(--red);
}

.primary-button:hover {
  border-color: var(--red-dark);
  background: var(--red-dark);
}

.secondary-button {
  color: var(--ink);
  border: 1px solid #bfc0c5;
  background: #fff;
}

.secondary-button:hover {
  border-color: var(--ink);
}

.full-button {
  width: 100%;
}

.page-heading {
  margin-bottom: 30px;
  align-items: flex-end;
}

.page-heading h1 {
  margin-bottom: 7px;
  font-size: clamp(2rem, 3vw, 3rem);
}

.page-heading > div:first-child > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.compact-heading {
  margin-bottom: 24px;
}

.project-chip {
  display: flex;
  min-width: 230px;
  padding: 11px 14px;
  flex-direction: column;
  border-left: 4px solid var(--red);
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.project-chip span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.project-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.application-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: var(--shadow);
}

.application-controls {
  padding: 28px;
  border-right: 1px solid var(--line);
}

.choice-group {
  margin: 0 0 28px;
  padding: 0;
  border: 0;
}

.choice-group legend,
.control-label,
.distance-control label,
.product-combobox > label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.84rem;
  font-weight: 700;
}

.visual-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.visual-choice {
  overflow: hidden;
  padding: 0;
  text-align: left;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.visual-choice:hover {
  border-color: #9c9ca2;
}

.visual-choice.is-selected {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(227, 27, 35, 0.1);
}

.visual-choice-image {
  display: block;
  height: 135px;
  background-position: center;
  background-size: cover;
}

.visual-choice-image.indoor-image {
  background-image: url("assets/indoor-lobby.png");
}

.visual-choice-image.outdoor-image {
  background-image: url("assets/outdoor-plaza.png");
}

.visual-choice-copy {
  display: flex;
  min-height: 76px;
  padding: 13px;
  align-items: center;
  gap: 11px;
}

.visual-choice-copy > span {
  display: flex;
  flex-direction: column;
}

.visual-choice-copy small {
  color: var(--muted);
  font-weight: 400;
}

.application-row {
  display: flex;
  margin-bottom: 28px;
  padding: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.application-row p,
.distance-control p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  display: block;
  width: 48px;
  height: 26px;
  border: 1px solid #a8a8ad;
  border-radius: 13px;
  background: #d6d6d9;
  transition: background 160ms ease;
}

.switch-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  transition: transform 160ms ease;
}

.switch input:checked + .switch-track {
  border-color: var(--red);
  background: var(--red);
}

.switch input:checked + .switch-track span {
  transform: translateX(22px);
}

.distance-control {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.control-title-row {
  align-items: center;
}

.distance-input {
  display: flex;
  width: 100px;
  height: 42px;
  align-items: center;
  border: 1px solid #bfc0c5;
  border-radius: 5px;
  background: #fff;
}

.distance-input input {
  min-width: 0;
  height: 100%;
  padding: 8px 4px 8px 10px;
  border: 0;
  background: transparent;
  font-weight: 700;
}

.distance-input span {
  padding-right: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.range {
  width: 100%;
  margin: 22px 0 5px;
  accent-color: var(--red);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.72rem;
}

.recommendation-panel {
  display: flex;
  padding: 28px;
  flex-direction: column;
  background: #1e1e20;
  color: #fff;
}

.recommendation-panel .eyebrow {
  color: #ff646b;
}

.recommendation-count {
  padding: 5px 8px;
  color: #d4d4d7;
  border: 1px solid #515157;
  border-radius: 4px;
  font-size: 0.72rem;
}

.recommendation-list {
  display: grid;
  gap: 10px;
}

.recommendation-card {
  display: grid;
  width: 100%;
  padding: 14px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-align: left;
  border: 1px solid #49494f;
  border-radius: 5px;
  background: #29292d;
}

.recommendation-card:hover {
  border-color: #7c7c82;
  background: #313136;
}

.recommendation-card.is-selected {
  border-color: var(--green-bright);
  box-shadow: inset 4px 0 0 var(--green-bright);
}

.recommendation-card .card-main {
  min-width: 0;
}

.recommendation-card .card-main > span {
  display: block;
  margin-top: 3px;
  color: #bdbdc2;
  font-size: 0.76rem;
}

.recommendation-card .card-meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 4px;
  color: #d7d7da;
  font-size: 0.72rem;
}

.recommendation-card .match-badge {
  padding: 4px 6px;
  color: #baf2d5;
  border: 1px solid #397f5d;
  border-radius: 3px;
  background: #163d2b;
  font-weight: 700;
}

.recommendation-footnote {
  display: flex;
  margin: auto 0 0;
  padding-top: 24px;
  align-items: flex-start;
  gap: 8px;
  color: #a6a6ab;
  border-top: 1px solid #434348;
  font-size: 0.74rem;
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(350px, 380px) minmax(0, 1fr);
  overflow: visible;
  gap: 14px;
}

.builder-controls,
.scene-column,
.wiring-sidebar,
.wiring-preview-panel {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.builder-controls {
  align-self: start;
  overflow: visible;
}

.builder-control-header {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--line);
}

.builder-control-header .eyebrow {
  margin-bottom: 4px;
}

.builder-control-header h1 {
  margin: 0 0 14px;
  font-size: 1.55rem;
  line-height: 1.08;
}

.builder-control-header .project-chip {
  min-width: 0;
  padding: 9px 12px;
  box-shadow: none;
  background: var(--surface-soft);
}

.control-section {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.control-section-heading {
  display: flex;
  margin-bottom: 16px;
  align-items: flex-start;
  gap: 12px;
}

.control-section-heading h2 {
  margin: 0;
  font-size: 1.02rem;
}

.control-section-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.control-index {
  display: grid;
  width: 32px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  border-radius: 3px;
  background: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
}

.product-combobox {
  position: relative;
}

.combobox-input-wrap {
  position: relative;
}

.combobox-input-wrap > svg {
  position: absolute;
  z-index: 2;
  top: 13px;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.product-combobox input {
  padding-right: 42px;
  padding-left: 38px;
}

.combobox-clear {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: var(--muted);
  border: 0;
  border-radius: 4px;
  background: transparent;
}

.combobox-clear:hover {
  color: var(--red);
  background: var(--red-soft);
}

.combobox-clear svg {
  width: 17px;
  height: 17px;
}

.combobox-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  display: none;
  overflow: auto;
  width: 100%;
  max-height: 330px;
  padding: 6px;
  border: 1px solid #a9aaaf;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.combobox-options.is-open {
  display: block;
}

.product-option {
  display: grid;
  width: 100%;
  padding: 10px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 0;
  border-radius: 4px;
  background: #fff;
}

.product-option:hover,
.product-option[aria-selected="true"] {
  background: var(--surface-soft);
}

.product-option[aria-selected="true"] {
  box-shadow: inset 3px 0 0 var(--red);
}

.product-option span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.product-option strong {
  overflow-wrap: anywhere;
  font-size: 0.86rem;
}

.product-option small {
  color: var(--muted);
}

.product-option em {
  color: var(--green);
  font-size: 0.67rem;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
}

.combobox-empty {
  padding: 20px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 0.8rem;
}

.selected-product-note {
  display: flex;
  min-height: 26px;
  margin-top: 8px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.74rem;
}

.selected-product-note .recommended-pill {
  padding: 2px 5px;
  color: #11643f;
  border: 1px solid #9ad8b9;
  border-radius: 3px;
  background: var(--green-soft);
  font-weight: 700;
}

.matrix-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 8px;
}

.matrix-times {
  padding-bottom: 10px;
  color: var(--muted);
}

.stepper-field {
  min-width: 0;
}

.stepper-field > label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.number-stepper {
  display: grid;
  height: 48px;
  grid-template-columns: minmax(42px, 1fr) 36px;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #bfc0c5;
  border-radius: 5px;
  background: #fff;
}

.number-stepper button {
  display: grid;
  padding: 0;
  place-items: center;
  border: 0;
  background: var(--surface-soft);
}

.number-stepper button:first-child {
  grid-column: 2;
  grid-row: 2;
  border-top: 1px solid var(--line);
}

.number-stepper button:last-child {
  grid-column: 2;
  grid-row: 1;
  border-bottom: 1px solid var(--line);
}

.number-stepper button:hover {
  color: var(--red);
  background: var(--red-soft);
}

.number-stepper button svg {
  width: 16px;
  height: 16px;
}

.number-stepper input {
  grid-column: 1;
  grid-row: 1 / 3;
  min-width: 0;
  padding: 5px;
  text-align: center;
  border: 0;
  appearance: textfield;
  font-weight: 700;
}

.number-stepper input::-webkit-inner-spin-button,
.number-stepper input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.placement-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.placement-controls.is-single {
  grid-template-columns: 1fr;
}

.unit-stepper {
  grid-template-columns: minmax(38px, 1fr) 21px 34px;
}

.unit-stepper > span {
  display: grid;
  grid-column: 2;
  grid-row: 1 / 3;
  place-items: center;
  color: var(--muted);
  font-size: 0.72rem;
}

.unit-stepper button:first-child,
.unit-stepper button:last-child {
  grid-column: 3;
}

.placement-status {
  min-height: 19px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.placement-status.is-warning {
  color: var(--red-dark);
  font-weight: 700;
}

.advanced-controls {
  border: 0;
}

.advanced-controls summary {
  display: flex;
  padding: 16px 20px;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.advanced-controls summary::-webkit-details-marker {
  display: none;
}

.advanced-controls summary > span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.advanced-controls[open] summary > svg {
  transform: rotate(180deg);
}

.advanced-grid {
  display: grid;
  padding: 0 20px 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.advanced-grid .field input,
.advanced-grid .field select {
  min-height: 40px;
  padding: 7px 9px;
}

.input-suffix {
  display: flex;
  height: 40px;
  align-items: center;
  border: 1px solid #bfc0c5;
  border-radius: 5px;
}

.input-suffix input {
  height: 100%;
  border: 0;
  background: transparent;
}

.input-suffix span {
  padding-right: 10px;
  color: var(--muted);
}

.scene-column {
  align-self: start;
  min-width: 0;
  overflow: hidden;
  background: #222225;
}

.scene-toolbar {
  display: flex;
  min-height: 58px;
  padding: 9px 12px 9px 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: #fff;
  border-bottom: 1px solid #49494e;
  background: #171719;
}

.scene-environment {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.scene-toolbar-actions {
  display: flex;
  margin-left: auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 4px rgba(49, 216, 135, 0.13);
}

.scene-view-control {
  display: flex;
  overflow: hidden;
  border: 1px solid #55555a;
  border-radius: 4px;
  background: #29292d;
}

.scene-view-button {
  display: inline-flex;
  min-height: 36px;
  padding: 6px 10px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #aaaab0;
  border: 0;
  border-right: 1px solid #55555a;
  border-radius: 0;
  background: #29292d;
  font-size: 0.72rem;
  font-weight: 800;
}

.scene-view-button:last-child {
  border-right: 0;
}

.scene-view-button svg {
  width: 16px;
  height: 16px;
}

.scene-view-button:hover {
  color: #fff;
  background: #35353a;
}

.scene-view-button.is-active {
  color: #fff;
  background: #4a4a50;
}

.scene-view-button.data-view.is-active {
  background: var(--green);
}

.scene-view-button.power-view.is-active {
  background: var(--power);
}

.tool-button {
  min-height: 38px;
  padding: 7px 10px;
  color: #c5c5c9;
  border: 1px solid #55555a;
  background: #2a2a2e;
  font-size: 0.76rem;
}

.tool-button.is-active {
  color: #fff;
  border-color: #85858b;
  background: #3a3a3f;
}

.environment-stage {
  --floor-y: 89%;
  --wall-top: 8%;
  --wall-tile-width: 480px;
  --wall-tile-height: 320px;
  --architecture-unit: 48px;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 0;
  aspect-ratio: var(--preview-aspect, 16 / 9);
  background: #303034;
  isolation: isolate;
}

.environment-stage::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.17), transparent 17%, transparent 83%, rgba(0, 0, 0, 0.17)),
    linear-gradient(180deg, rgba(8, 8, 9, 0.08), transparent 30%, rgba(8, 8, 9, 0.05));
}

.environment-stage.is-outdoor {
  background: #b9c6cb;
}

.environment-stage.is-outdoor::after {
  background:
    linear-gradient(90deg, rgba(27, 38, 43, 0.08), transparent 22%, transparent 78%, rgba(27, 38, 43, 0.08)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%, rgba(24, 27, 29, 0.06));
}

.adaptive-environment {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.environment-structure {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.environment-structure .world-boundary {
  display: none;
}

.environment-structure .world-bay-line {
  display: none;
}

.environment-structure .world-course-line {
  display: none;
}

.environment-structure .world-column {
  fill: rgba(29, 29, 31, 0.58);
  stroke: none;
}

.environment-structure .world-light {
  fill: #ffe8ad;
  filter: drop-shadow(0 0 4px rgba(255, 220, 151, 0.75));
}

.environment-stage.is-outdoor .environment-structure .world-boundary {
  stroke: rgba(255, 255, 255, 0.24);
}

.environment-stage.is-outdoor .environment-structure .world-bay-line {
  stroke: rgba(255, 255, 255, 0.18);
}

.environment-stage.is-outdoor .environment-structure .world-course-line {
  stroke: rgba(255, 255, 255, 0.16);
}

.environment-stage.is-outdoor .environment-structure .world-column {
  fill: rgba(24, 25, 27, 0.5);
}

.environment-stage.is-outdoor .environment-structure .world-light {
  fill: #f4f6f7;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.7));
}

.environment-sky,
.environment-surface,
.environment-ceiling-plane,
.environment-ground-plane,
.edge-feature {
  position: absolute;
}

.environment-sky {
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  height: var(--wall-top);
  background:
    linear-gradient(180deg, #91a9b4 0%, #c7d6dc 62%, #eef2f3 100%);
}

.environment-sky::before,
.environment-sky::after {
  position: absolute;
  content: "";
  opacity: 0.56;
  background: rgba(255, 255, 255, 0.74);
  filter: blur(5px);
}

.environment-sky::before {
  top: 28%;
  left: 12%;
  width: 18%;
  height: 8%;
}

.environment-sky::after {
  top: 42%;
  right: 17%;
  width: 25%;
  height: 7%;
}

.environment-surface {
  z-index: 1;
  top: var(--wall-top);
  bottom: calc(100% - var(--floor-y));
  left: var(--world-left, 0);
  width: calc(var(--world-right, 100%) - var(--world-left, 0));
  background-position: center bottom;
  background-repeat: repeat;
  background-size: var(--wall-tile-width) var(--wall-tile-height);
  box-shadow: inset 0 18px 28px rgba(0, 0, 0, 0.24);
}

.environment-stage.is-indoor .environment-surface {
  background-color: #39393a;
  background-image: url("assets/indoor-wall-tile.png");
}

.environment-stage.is-outdoor .environment-surface {
  background-color: #454648;
  background-image: url("assets/outdoor-facade-tile.png");
  border-top: max(3px, calc(var(--architecture-unit) * 0.16)) solid #27292b;
  box-shadow:
    0 -4px 9px rgba(0, 0, 0, 0.25),
    inset 0 15px 22px rgba(0, 0, 0, 0.16),
    inset 0 -10px 22px rgba(0, 0, 0, 0.1);
}

.environment-stage.is-outdoor .environment-surface::before {
  position: absolute;
  top: max(5px, calc(var(--architecture-unit) * 0.32));
  right: 0;
  left: 0;
  height: max(2px, calc(var(--architecture-unit) * 0.08));
  content: "";
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.32);
}

.environment-stage.is-outdoor .environment-surface::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: max(4px, calc(var(--architecture-unit) * 0.18));
  content: "";
  background: #292b2d;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.13);
}

.environment-ceiling-plane {
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  height: var(--wall-top);
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  background:
    linear-gradient(180deg, #f1f0ec 0%, #d8d7d3 100%);
  box-shadow: 0 6px 18px rgba(255, 224, 175, 0.18);
}

.environment-stage.is-outdoor .environment-ceiling-plane {
  display: none;
}

.ceiling-light {
  position: absolute;
  bottom: 19%;
  width: clamp(12px, calc(var(--architecture-unit) * 0.72), 54px);
  height: 2px;
  border-radius: 1px;
  background: #fff2cf;
  box-shadow: 0 2px 7px rgba(255, 221, 156, 0.72);
}

.ceiling-light-one {
  left: 26%;
}

.ceiling-light-two {
  left: 50%;
  transform: translateX(-50%);
}

.ceiling-light-three {
  right: 26%;
}

.environment-ground-plane {
  z-index: 2;
  top: var(--floor-y);
  right: 0;
  bottom: 0;
  left: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.48);
  background: linear-gradient(180deg, #bbb9b5 0%, #e3e1dc 100%);
  box-shadow: inset 0 12px 24px rgba(0, 0, 0, 0.12);
}

.environment-stage.is-outdoor .environment-ground-plane {
  border-top-color: rgba(0, 0, 0, 0.22);
  background: linear-gradient(180deg, #9b9d9c 0%, #c6c6c1 100%);
}

.environment-stage.is-outdoor .environment-ground-plane::before {
  position: absolute;
  top: 8%;
  right: 0;
  left: 0;
  height: 18%;
  content: "";
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  background: #777b7c;
}

.edge-feature {
  z-index: 3;
  top: var(--wall-top);
  bottom: calc(100% - var(--floor-y));
  width: var(--edge-feature-width, calc(var(--architecture-unit) * 1.45));
}

.edge-feature-left {
  left: var(--world-left, 0);
}

.edge-feature-right {
  right: auto;
  left: calc(var(--world-right, 100%) - var(--edge-feature-width, calc(var(--architecture-unit) * 1.45)));
}

.edge-column,
.edge-window,
.edge-sconce,
.edge-planter {
  position: absolute;
  display: block;
}

.edge-column {
  z-index: 2;
  top: 0;
  bottom: 0;
  width: 38%;
  background:
    linear-gradient(90deg, #58585a 0%, #77777a 48%, #424244 100%);
  box-shadow:
    0 0 14px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.edge-feature-left .edge-column {
  right: 0;
}

.edge-feature-right .edge-column {
  left: 0;
}

.edge-window {
  z-index: 1;
  top: 4%;
  bottom: 5%;
  width: 65%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 45%, rgba(226, 232, 233, 0.36) 46%, transparent 48%),
    linear-gradient(180deg, #b7c2c4 0%, #819093 48%, #d6dddc 100%);
  box-shadow: inset 0 0 16px rgba(7, 16, 18, 0.3);
}

.edge-feature-left .edge-window {
  left: 0;
}

.edge-feature-right .edge-window {
  right: 0;
}

.edge-sconce {
  z-index: 3;
  top: 39%;
  width: 4px;
  height: 18%;
  min-height: 12px;
  border-radius: 2px;
  background: #202022;
  box-shadow:
    0 0 8px rgba(255, 214, 145, 0.8),
    0 0 18px rgba(255, 207, 125, 0.38);
}

.edge-feature-left .edge-sconce {
  right: 17%;
}

.edge-feature-right .edge-sconce {
  left: 17%;
}

.edge-planter {
  z-index: 4;
  bottom: -3px;
  width: 84%;
  height: clamp(8px, calc(var(--architecture-unit) * 0.42), 30px);
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  background: #222225;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.34);
}

.edge-planter::before {
  position: absolute;
  right: 8%;
  bottom: 76%;
  left: 8%;
  height: 105%;
  content: "";
  border-radius: 52% 38% 48% 35%;
  background:
    radial-gradient(ellipse at 18% 74%, #456c47 0 16%, transparent 17%),
    radial-gradient(ellipse at 38% 44%, #5b8559 0 17%, transparent 18%),
    radial-gradient(ellipse at 61% 58%, #3e6744 0 19%, transparent 20%),
    radial-gradient(ellipse at 82% 38%, #668b5f 0 17%, transparent 18%);
}

.edge-feature-left .edge-planter {
  left: 0;
}

.edge-feature-right .edge-planter {
  right: 0;
}

.environment-stage.is-outdoor .edge-column {
  background:
    linear-gradient(90deg, #23272a 0%, #687176 48%, #1d2123 100%);
}

.environment-stage.is-outdoor .edge-window {
  top: 10%;
  bottom: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 47%, rgba(255, 255, 255, 0.2) 48%, transparent 50%),
    linear-gradient(180deg, #8ca2aa 0%, #43555c 52%, #172126 100%);
  box-shadow:
    inset 0 0 16px rgba(6, 14, 18, 0.42),
    0 0 0 2px rgba(30, 34, 36, 0.75);
}

.environment-stage.is-outdoor .edge-sconce {
  background: #e6e7e5;
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.75),
    0 0 18px rgba(255, 255, 255, 0.26);
}

.environment-stage.is-outdoor .edge-planter {
  height: clamp(6px, calc(var(--architecture-unit) * 0.3), 22px);
  background: #3b3c3d;
}

.virtual-display {
  position: absolute;
  z-index: 4;
  overflow: hidden;
  min-width: 8px;
  min-height: 8px;
  border: 0;
  background: #141416;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.screen-content {
  position: absolute;
  z-index: 1;
  inset: -1px;
  background-image: url("assets/screen-content.png");
  background-position: center;
  background-size: cover;
  opacity: 1;
  transition: opacity 180ms ease;
}

.screen-content::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, 0.04);
}

.display-rear-surface {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 32%),
    linear-gradient(180deg, #24272a 0%, #17191b 100%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.display-rear-surface::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.12)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 40%, rgba(0, 0, 0, 0.15));
}

.display-brand-mark {
  position: absolute;
  z-index: 2;
  top: 5%;
  right: 4%;
  bottom: auto;
  width: 36%;
  height: auto;
  opacity: 1;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.68));
  pointer-events: none;
  transform: none;
  transition:
    top 180ms ease,
    right 180ms ease,
    bottom 180ms ease,
    width 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.virtual-display:not(.is-rear-view) .display-brand-mark {
  z-index: 4;
}

.virtual-display.is-rear-view {
  border: 1px solid #090a0b;
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.virtual-display.is-rear-view .screen-content {
  opacity: 0;
}

.virtual-display.is-rear-view .display-rear-surface {
  opacity: 1;
}

.virtual-display.is-rear-view .display-brand-mark {
  top: auto;
  right: 50%;
  bottom: 50%;
  width: 46%;
  opacity: 0.12;
  transform: translate(50%, 50%);
}

.diagonal-guide {
  position: absolute;
  z-index: 3;
  height: 0;
  border-top: 2px solid rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.72));
  pointer-events: none;
  transform-origin: left center;
  transition: opacity 140ms ease;
}

.diagonal-guide::before,
.diagonal-guide::after {
  position: absolute;
  top: -5px;
  width: 2px;
  height: 9px;
  content: "";
  background: #fff;
}

.diagonal-guide::before {
  left: 0;
}

.diagonal-guide::after {
  right: 0;
}

.diagonal-guide span {
  position: absolute;
  top: 0;
  left: 50%;
  padding: 4px 7px;
  color: #fff;
  border-radius: 3px;
  background: rgba(11, 11, 12, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
  font-size: clamp(0.62rem, 0.9vw, 0.82rem);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.virtual-display.is-rear-view .diagonal-guide {
  opacity: 0;
}

.scene-cabinet-grid {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scene-cabinet-grid line {
  vector-effect: non-scaling-stroke;
  stroke: rgba(255, 255, 255, 0.36);
  stroke-width: 1;
}

.virtual-display.is-rear-view .scene-cabinet-grid line {
  stroke: rgba(224, 227, 230, 0.28);
}

.scene-wiring-overlay {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.scene-wiring-overlay .rear-cabinet-detail {
  fill: rgba(255, 255, 255, 0.018);
  stroke: rgba(196, 201, 205, 0.16);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.scene-wiring-overlay .rear-cabinet-spine {
  stroke: rgba(196, 201, 205, 0.12);
  stroke-width: 0.55;
  vector-effect: non-scaling-stroke;
}

.scene-wiring-overlay .rear-cabinet-fastener {
  fill: #737980;
  stroke: #111315;
  stroke-width: 0.45;
  vector-effect: non-scaling-stroke;
}

.scene-wiring-overlay .scene-wire-halo,
.scene-wiring-overlay .scene-wire-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.scene-wiring-overlay .scene-wire-halo {
  stroke: rgba(7, 9, 10, 0.9);
  stroke-width: 6.4;
}

.scene-wiring-overlay .scene-wire-path {
  stroke: #4cf09b;
  stroke-width: 3.2;
  filter: drop-shadow(0 0 2px rgba(76, 240, 155, 0.38));
}

.virtual-display.is-power-view .scene-wiring-overlay .scene-wire-path {
  stroke: #ff4b55;
  filter: drop-shadow(0 0 2px rgba(255, 75, 85, 0.38));
}

.scene-wiring-overlay .scene-wire-start-ring {
  fill: #141718;
  stroke: #4cf09b;
  stroke-width: 2.3;
  vector-effect: non-scaling-stroke;
}

.scene-wiring-overlay .scene-wire-start,
.scene-wiring-overlay .scene-wire-end {
  fill: #4cf09b;
  stroke: #0d6e45;
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.virtual-display.is-power-view .scene-wiring-overlay .scene-wire-start-ring {
  stroke: #ff4b55;
}

.virtual-display.is-power-view .scene-wiring-overlay .scene-wire-start,
.virtual-display.is-power-view .scene-wiring-overlay .scene-wire-end {
  fill: #ff4b55;
  stroke: #8c1017;
}

.scene-route-labels {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
}

.scene-route-label {
  position: absolute;
  padding: 2px 4px;
  color: #4cf09b;
  border: 1px solid rgba(76, 240, 155, 0.48);
  border-radius: 3px;
  background: rgba(10, 13, 12, 0.88);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.42);
  font-size: clamp(7px, 0.72vw, 11px);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.scene-route-label.is-above {
  transform: translate(-50%, calc(-100% - 7px));
}

.scene-route-label.is-below {
  transform: translate(-50%, 7px);
}

.virtual-display.is-power-view .scene-route-label {
  color: #ff6971;
  border-color: rgba(255, 75, 85, 0.5);
}

.scene-wiring-legend {
  position: absolute;
  z-index: 7;
  top: 12px;
  left: 12px;
  display: flex;
  max-width: min(290px, calc(100% - 24px));
  padding: 8px 10px;
  align-items: center;
  gap: 9px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 4px;
  background: rgba(17, 18, 20, 0.88);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.28);
  opacity: 1;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.scene-wiring-legend.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.scene-wiring-swatch {
  width: 34px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: #4cf09b;
  box-shadow: 0 0 5px rgba(76, 240, 155, 0.38);
}

.scene-wiring-legend.is-power .scene-wiring-swatch {
  background: #ff4b55;
  box-shadow: 0 0 5px rgba(255, 75, 85, 0.38);
}

.scene-wiring-legend strong,
.scene-wiring-legend small {
  display: block;
}

.scene-wiring-legend strong {
  font-size: 0.72rem;
}

.scene-wiring-legend small {
  margin-top: 2px;
  color: #b9b9bf;
  font-size: 0.63rem;
}

.reference-person {
  position: absolute;
  z-index: 5;
  width: auto;
  height: 200px;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 7px 7px rgba(0, 0, 0, 0.34));
  pointer-events: none;
  transition:
    opacity 160ms ease,
    left 220ms ease,
    top 220ms ease,
    height 220ms ease;
}

.reference-person.is-hidden {
  opacity: 0;
}

.ceiling-guide,
.ground-guide,
.height-guide,
.width-guide,
.clearance-guide {
  position: absolute;
  z-index: 6;
  pointer-events: none;
}

.ceiling-guide {
  right: 14px;
  left: 14px;
  height: 1px;
  border-top: 1px dashed rgba(255, 255, 255, 0.72);
}

.ceiling-guide span,
.ground-guide span,
.height-guide span,
.width-guide span,
.clearance-guide span {
  position: absolute;
  padding: 5px 8px;
  color: #fff;
  border-radius: 3px;
  background: rgba(11, 11, 12, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-size: clamp(0.7rem, 1vw, 0.88rem);
  font-weight: 800;
}

.ceiling-guide span {
  top: 5px;
  right: 0;
}

.ground-guide {
  right: 14px;
  left: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.75);
}

.ground-guide span {
  right: auto;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
}

.height-guide,
.clearance-guide {
  width: 1px;
  border-left: 2px solid rgba(255, 255, 255, 0.92);
}

.height-guide::before,
.height-guide::after,
.clearance-guide::before,
.clearance-guide::after {
  position: absolute;
  left: -5px;
  width: 9px;
  height: 2px;
  content: "";
  background: #fff;
}

.height-guide::before,
.clearance-guide::before {
  top: 0;
}

.height-guide::after,
.clearance-guide::after {
  bottom: 0;
}

.height-guide span {
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  white-space: nowrap;
}

.clearance-guide span {
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  white-space: nowrap;
}

.environment-stage.is-compact-dimensions .height-guide span {
  top: auto;
  bottom: calc(100% + 5px);
  transform: none;
}

.environment-stage.is-compact-dimensions .clearance-guide span {
  top: calc(100% + 5px);
  transform: none;
}

.width-guide {
  height: 1px;
  border-top: 2px solid rgba(255, 255, 255, 0.92);
}

.width-guide::before,
.width-guide::after {
  position: absolute;
  top: -5px;
  width: 2px;
  height: 9px;
  content: "";
  background: #fff;
}

.width-guide::before {
  left: 0;
}

.width-guide::after {
  right: 0;
}

.width-guide span {
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.width-guide.is-above span {
  top: auto;
  bottom: 7px;
}

.live-metrics {
  display: grid;
  grid-template-columns: 1.25fr 1fr 0.72fr 0.8fr 1.1fr;
  color: #fff;
  border-top: 1px solid #4a4a4e;
  background: #1c1c1f;
}

.live-metrics > div {
  min-width: 0;
  min-height: 82px;
  padding: 14px;
  border-right: 1px solid #414146;
}

.live-metrics > div:last-child {
  border-right: 0;
}

.live-metrics span {
  display: block;
  margin-bottom: 6px;
  color: #98989e;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
}

.live-metrics strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.83rem;
  line-height: 1.28;
}

.wiring-workspace {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: 650px;
  gap: 18px;
}

.wiring-sidebar {
  display: flex;
  padding: 18px;
  align-self: stretch;
  flex-direction: column;
}

.wiring-product-summary {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.wiring-product-summary > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.wiring-product-summary strong {
  display: block;
  margin: 5px 0 3px;
}

.wiring-product-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.segmented-control {
  display: grid;
  margin: 18px 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #b7b7bc;
  border-radius: 5px;
}

.segmented-control button {
  display: flex;
  min-height: 42px;
  padding: 7px 10px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  background: var(--surface-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.segmented-control button + button {
  border-left: 1px solid #b7b7bc;
}

.segmented-control .data-mode.is-active {
  color: #fff;
  background: var(--green);
}

.segmented-control .power-mode.is-active {
  color: #fff;
  background: var(--power);
}

.wiring-stat-list {
  display: grid;
  gap: 0;
}

.wiring-stat {
  display: flex;
  padding: 10px 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
}

.wiring-stat span {
  color: var(--muted);
}

.wiring-stat strong {
  text-align: right;
}

.drawing-action-stack {
  margin-top: auto;
  padding-top: 22px;
}

.drawing-action-stack p {
  margin: 9px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.7rem;
}

.wiring-preview-panel {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
}

.preview-title-row {
  padding: 18px 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.preview-title-row h2 {
  margin: 2px 0 0;
  font-size: 1.2rem;
}

.preview-title-row > div > span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.flow-key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.flow-key > span {
  width: 26px;
  height: 4px;
  border-radius: 2px;
}

.flow-key.data-key > span {
  background: var(--green-bright);
}

.flow-key.power-key > span {
  background: var(--power);
}

.wiring-preview-canvas {
  display: grid;
  min-height: 560px;
  padding: 30px;
  flex: 1;
  place-items: center;
  background: #171719;
}

.wiring-svg {
  display: block;
  width: 100%;
  max-width: 1050px;
  height: auto;
  max-height: 540px;
}

.wiring-svg .diagram-brand,
.drawing-diagram .diagram-brand {
  opacity: 0.12;
  pointer-events: none;
}

.wiring-svg .cabinet {
  fill: #27272a;
  stroke: #66666d;
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.wiring-svg .wire-halo {
  fill: none;
  stroke: #101012;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 6;
  vector-effect: non-scaling-stroke;
}

.wiring-svg .wire-path {
  fill: none;
  stroke: var(--green-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.4;
  vector-effect: non-scaling-stroke;
}

.wiring-svg.is-power .wire-path {
  stroke: var(--power);
}

.wiring-svg .start-dot {
  fill: var(--green-bright);
  stroke: #0f6d45;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.wiring-svg.is-power .start-dot {
  fill: var(--power);
  stroke: #8c1017;
}

.wiring-svg .home-run-label {
  fill: #fff;
  paint-order: stroke;
  stroke: #141416;
  stroke-width: 0.06;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.25px;
  font-weight: 700;
}

.wiring-svg .dimension-line,
.drawing-diagram .dimension-line {
  fill: none;
  stroke: #a2a2a7;
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.wiring-svg .dimension-text {
  fill: #e3e3e5;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.24px;
  font-weight: 700;
}

.drawing-set-shell {
  margin-top: 38px;
  padding-top: 30px;
  scroll-margin-top: 160px;
  border-top: 1px solid var(--line);
}

.drawing-set-shell.is-hidden {
  display: none;
}

.drawing-set-heading {
  margin-bottom: 18px;
  align-items: flex-end;
}

.drawing-set-heading h2 {
  margin-bottom: 0;
}

.drawing-set-actions {
  display: flex;
  gap: 10px;
}

.drawing-pages {
  display: grid;
  gap: 28px;
}

.drawing-page {
  position: relative;
  display: flex;
  width: min(100%, 850px);
  min-height: 1100px;
  margin: 0 auto;
  padding: 26px 30px 34px;
  flex-direction: column;
  color: #111;
  border: 1px solid #c5c5c8;
  background: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.drawing-header {
  display: grid;
  padding-bottom: 12px;
  grid-template-columns: 210px 1fr auto;
  align-items: start;
  gap: 20px;
  border-bottom: 3px solid var(--red);
}

.drawing-header-logo img {
  width: 180px;
  height: auto;
}

.drawing-header-logo a {
  display: block;
  width: max-content;
  margin-top: 4px;
  color: #333;
  font-size: 9px;
  text-decoration: none;
}

.drawing-header-project {
  align-self: center;
  text-align: center;
}

.drawing-header-project strong {
  display: block;
  font-size: 15px;
}

.drawing-header-project span {
  display: block;
  color: #555;
  font-size: 10px;
  line-height: 1.35;
}

.drawing-header-project b {
  color: #333;
}

.drawing-header-meta {
  text-align: right;
}

.drawing-header-meta strong {
  display: block;
  color: var(--red);
  font-size: 14px;
}

.drawing-header-meta span {
  display: block;
  color: #555;
  font-size: 9px;
}

.drawing-title-band {
  display: flex;
  margin-top: 12px;
  padding: 9px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
  background: #1f1f22;
}

.drawing-title-band h2 {
  margin: 0;
  font-size: 17px;
}

.drawing-title-band span {
  font-size: 10px;
}

.drawing-spec-grid {
  display: grid;
  margin-top: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #cfcfd2;
  border-left: 1px solid #cfcfd2;
}

.drawing-spec {
  min-height: 48px;
  padding: 7px 9px;
  border-right: 1px solid #cfcfd2;
  border-bottom: 1px solid #cfcfd2;
}

.drawing-spec span {
  display: block;
  color: #666;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.drawing-spec strong {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.25;
}

.drawing-diagram-shell {
  display: flex;
  min-height: 360px;
  margin-top: 15px;
  flex: 1;
  align-items: center;
  justify-content: center;
  border: 1px solid #d4d4d7;
  background: #f2f2f3;
}

.drawing-diagram {
  width: 92%;
  height: auto;
  max-height: 430px;
}

.drawing-diagram .cabinet {
  fill: #dfe0e2;
  stroke: #87878d;
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.drawing-diagram .wire-halo {
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 7;
  vector-effect: non-scaling-stroke;
}

.drawing-diagram .wire-path {
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.5;
  vector-effect: non-scaling-stroke;
}

.drawing-diagram.is-power .wire-path {
  stroke: var(--power);
}

.drawing-diagram .start-dot {
  fill: var(--green);
  stroke: #fff;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.drawing-diagram.is-power .start-dot {
  fill: var(--power);
}

.drawing-diagram .home-run-label {
  fill: #111;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 0.07;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.26px;
  font-weight: 700;
}

.drawing-diagram .dimension-text {
  fill: #333;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.22px;
  font-weight: 700;
}

.drawing-legend {
  display: flex;
  margin-top: 8px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #4f4f54;
  font-size: 9px;
  font-weight: 700;
}

.drawing-legend span {
  width: 28px;
  height: 3px;
  background: var(--green);
}

.drawing-legend.power span {
  background: var(--power);
}

.circuit-schedule {
  display: grid;
  margin-top: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.circuit-box {
  overflow: hidden;
  border: 1px solid #919196;
  background: #fff;
  text-align: center;
}

.circuit-box strong {
  display: block;
  padding: 4px 2px;
  color: #fff;
  background: #29292d;
  font-size: 8px;
}

.circuit-box > span {
  display: block;
  padding: 3px;
  color: #555;
  border-bottom: 1px solid #ddd;
  font-size: 7px;
}

.circuit-outlets {
  display: grid;
  padding: 3px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
}

.circuit-outlets span {
  padding: 3px 1px;
  color: var(--red-dark);
  border: 1px solid #f1a5a9;
  background: #fff4f4;
  font-size: 7px;
  font-weight: 700;
}

.drawing-scene-page {
  overflow: hidden;
}

.drawing-scene-frame {
  display: flex;
  min-height: 0;
  margin-top: 14px;
  padding: 10px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #c9c9cd;
  background: #e7e7e9;
}

.drawing-scene-capture {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  background: #222225;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.drawing-scene-source {
  min-height: 0 !important;
  max-width: none !important;
  aspect-ratio: auto !important;
  transform-origin: top left;
}

.drawing-scene-metrics {
  display: grid;
  margin: 10px 0 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid #c9c9cd;
  border-left: 1px solid #c9c9cd;
}

.drawing-scene-metric {
  min-height: 52px;
  padding: 7px 8px;
  border-right: 1px solid #c9c9cd;
  border-bottom: 1px solid #c9c9cd;
}

.drawing-scene-metric span,
.drawing-scene-metric strong {
  display: block;
}

.drawing-scene-metric span {
  color: #66666b;
  font-size: 7.5px;
  font-weight: 800;
  text-transform: uppercase;
}

.drawing-scene-metric strong {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 9.5px;
  line-height: 1.22;
}

.drawing-footer {
  display: flex;
  margin-top: auto;
  padding-top: 8px;
  justify-content: space-between;
  gap: 20px;
  color: #59595e;
  border-top: 1px solid var(--red);
  font-size: 8.5px;
}

.drawing-footer strong {
  color: #333;
}

.pdf-export-stage {
  position: fixed;
  z-index: -2147483647;
  top: 0;
  left: -20000px;
  display: block;
  width: 8.5in;
  margin: 0;
  padding: 0;
  pointer-events: none;
  color: #111;
  background: #fff;
}

.pdf-export-stage,
.pdf-export-stage *,
.pdf-export-stage *::before,
.pdf-export-stage *::after {
  box-sizing: border-box;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.pdf-export-stage .drawing-page {
  display: grid;
  width: 8.5in !important;
  min-width: 8.5in !important;
  max-width: 8.5in !important;
  height: 11in;
  min-height: 11in;
  max-height: 11in;
  margin: 0;
  padding: 0.32in 0.36in 0.34in;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  border: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
}

.pdf-export-stage .drawing-header {
  padding-bottom: 0.05in;
  grid-template-columns: 1.55in minmax(0, 1fr) 1.55in;
  gap: 0.12in;
  border-bottom-width: 2px;
}

.pdf-export-stage .drawing-header-logo img {
  width: 1.42in;
}

.pdf-export-stage .drawing-header-logo a {
  margin-top: 2px;
  font-size: 7pt;
}

.pdf-export-stage .drawing-header-project strong {
  font-size: 10pt;
}

.pdf-export-stage .drawing-header-project span {
  font-size: 7.5pt;
  line-height: 1.25;
}

.pdf-export-stage .drawing-header-meta strong {
  font-size: 9.5pt;
}

.pdf-export-stage .drawing-header-meta span {
  font-size: 7pt;
}

.pdf-export-stage .drawing-title-band {
  margin-top: 0.06in;
  padding: 0.055in 0.1in;
}

.pdf-export-stage .drawing-title-band h2 {
  font-size: 12pt;
}

.pdf-export-stage .drawing-title-band span {
  font-size: 7.5pt;
}

.pdf-export-stage .drawing-scene-frame {
  min-height: 0;
  margin-top: 0.06in;
  padding: 0.04in;
  overflow: hidden;
}

.pdf-export-stage .drawing-scene-metrics {
  align-self: start;
  height: auto;
  min-height: 0;
  margin: 0.06in 0 0.08in;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-content: start;
}

.pdf-export-stage .drawing-scene-metric {
  display: block;
  min-height: 0.58in;
  padding: 0.07in 0.08in;
  background: #fafafa;
}

.pdf-export-stage .drawing-scene-metric span {
  font-size: 7.5pt;
}

.pdf-export-stage .drawing-scene-metric strong {
  margin-top: 3px;
  font-size: 9.5pt;
  line-height: 1.22;
}

.pdf-export-stage .drawing-footer {
  align-self: end;
  margin-top: 0;
  padding-top: 0.04in;
  gap: 0.08in;
  font-size: 7pt;
}

.pdf-export-stage .drawing-footer span:first-child {
  min-width: 0;
}

.pdf-export-stage .drawing-footer span:last-child {
  flex: 0 0 auto;
  white-space: nowrap;
}

.quote-dialog {
  width: min(720px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  border: 0;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.quote-dialog::backdrop {
  background: rgba(7, 7, 8, 0.72);
  backdrop-filter: blur(3px);
}

.quote-dialog-card {
  padding: 24px;
}

.dialog-head {
  margin-bottom: 18px;
}

.dialog-head h2 {
  margin: 0;
}

.quote-request-summary {
  display: grid;
  margin-bottom: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.request-summary-item {
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.request-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.request-summary-item strong {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
  font-size: 0.84rem;
}

.consent-row {
  display: flex;
  margin-top: 16px;
  align-items: flex-start;
  gap: 9px;
  color: var(--graphite);
  font-size: 0.8rem;
}

.consent-row input {
  margin-top: 3px;
  accent-color: var(--red);
}

.request-status {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
}

.support-contact {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.support-contact a {
  color: var(--red-dark);
  font-weight: 800;
  text-decoration: none;
}

.support-contact a:hover {
  text-decoration: underline;
}

.dialog-actions {
  display: flex;
  margin-top: 16px;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 12px 15px;
  color: #fff;
  border-left: 4px solid var(--red);
  border-radius: 4px;
  background: #1f1f22;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .intro-layout {
    grid-template-columns: 0.8fr 1.2fr;
  }

  .intro-copy,
  .project-form {
    padding: 36px;
  }

  .builder-layout {
    grid-template-columns: 350px minmax(0, 1fr);
  }

  .environment-stage {
    min-height: 0;
  }

  .live-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .live-metrics > div {
    min-height: 70px;
    border-bottom: 1px solid #414146;
  }

  .wiring-workspace {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .step-navigation {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .step-navigation::-webkit-scrollbar {
    display: none;
  }

  .step-navigation ol {
    width: 780px;
  }

  .intro-layout,
  .application-layout,
  .builder-layout,
  .wiring-workspace {
    grid-template-columns: 1fr;
  }

  .intro-copy {
    min-height: 460px;
  }

  .application-controls {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .recommendation-panel {
    min-height: 520px;
  }

  .builder-controls {
    position: static;
  }

  .environment-stage {
    min-height: 0;
  }

  .wiring-workspace {
    min-height: 0;
  }

  .wiring-preview-canvas {
    min-height: 500px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 64px;
  }

  body {
    font-size: 15px;
  }

  .app-header {
    padding: 0 12px;
  }

  .brand {
    width: 132px;
  }

  .product-title {
    margin-left: 10px;
    padding-left: 10px;
    font-size: 0.9rem;
  }

  .prototype-badge {
    display: none;
  }

  .step-panel {
    width: min(100% - 20px, 1600px);
    padding: 24px 0 40px;
  }

  .intro-copy,
  .project-form,
  .application-controls,
  .recommendation-panel {
    padding: 24px 20px;
  }

  .intro-copy {
    min-height: 520px;
  }

  .form-grid,
  .visual-choice-grid,
  .placement-controls,
  .advanced-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .page-heading,
  .drawing-set-heading,
  .preview-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .project-chip {
    min-width: 0;
  }

  .visual-choice-image {
    height: 115px;
  }

  .builder-layout {
    gap: 12px;
  }

  .matrix-controls {
    grid-template-columns: 1fr auto 1fr;
  }

  .scene-toolbar {
    align-items: center;
    flex-direction: row;
  }

  .scene-toolbar-actions {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .scene-view-control {
    min-width: 0;
    flex: 1;
  }

  .scene-view-button {
    min-width: 0;
    padding: 6px 8px;
    flex: 1;
  }

  .scene-toolbar .tool-button {
    width: 38px;
    min-width: 38px;
    padding: 7px;
  }

  .scene-toolbar .reference-label {
    display: none;
  }

  .scene-wiring-legend {
    top: 8px;
    left: 8px;
    max-width: calc(100% - 16px);
    padding: 6px 8px;
  }

  .scene-wiring-legend small {
    font-size: 0.58rem;
  }

  .scene-route-label {
    padding: 1px 3px;
    font-size: 7px;
  }

  .environment-stage {
    aspect-ratio: 4 / 3;
  }

  .ceiling-guide span {
    display: none;
  }

  .live-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-metrics > div {
    padding: 11px;
  }

  .wiring-preview-canvas {
    min-height: 380px;
    padding: 12px;
  }

  .flow-key {
    white-space: normal;
  }

  .drawing-set-actions,
  .panel-actions,
  .dialog-actions {
    width: 100%;
    flex-direction: column-reverse;
  }

  .drawing-set-actions button,
  .panel-actions button,
  .dialog-actions button {
    width: 100%;
  }

  .drawing-page {
    padding: 16px 14px 24px;
  }

  .drawing-scene-frame {
    justify-content: flex-start;
    overflow: auto;
  }

  .drawing-scene-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drawing-header {
    grid-template-columns: 130px 1fr;
  }

  .drawing-header-logo img {
    width: 125px;
  }

  .drawing-header-meta {
    display: none;
  }

  .drawing-spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .circuit-schedule {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quote-request-summary {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: letter portrait;
    margin: 0.22in;
  }

  html,
  body {
    width: 8.06in !important;
    min-width: 0 !important;
    max-width: 8.06in !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    color: #111;
    background: #fff;
  }

  .app-main,
  .step-panel[data-step-panel="3"].is-printing,
  .step-panel[data-step-panel="3"].is-printing .drawing-set-shell,
  .drawing-pages {
    width: 8.06in !important;
    min-width: 0 !important;
    max-width: 8.06in !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .app-header,
  .step-navigation,
  .step-panel,
  .toast,
  .quote-dialog {
    display: none !important;
  }

  .step-panel[data-step-panel="3"].is-printing {
    display: block !important;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
  }

  .step-panel[data-step-panel="3"].is-printing > :not(.drawing-set-shell) {
    display: none !important;
  }

  .step-panel[data-step-panel="3"].is-printing .drawing-set-shell {
    display: block !important;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .drawing-set-heading {
    display: none;
  }

  .drawing-pages {
    display: block;
  }

  .drawing-page {
    box-sizing: border-box;
    display: grid;
    width: 100% !important;
    height: 10.56in;
    min-height: 0;
    max-height: 10.56in;
    margin: 0;
    padding: 0.1in 0.14in 0.12in;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    break-after: page;
    break-inside: avoid-page;
    page-break-after: always;
    page-break-inside: avoid;
    border: 0;
    overflow: hidden;
    box-shadow: none;
  }

  .drawing-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .drawing-header {
    padding-bottom: 0.05in;
    grid-template-columns: 1.55in minmax(0, 1fr) 1.55in;
    gap: 0.12in;
    border-bottom-width: 2px;
  }

  .drawing-header-logo img {
    width: 1.42in;
  }

  .drawing-header-logo a {
    margin-top: 2px;
    font-size: 7pt;
  }

  .drawing-header-project strong {
    font-size: 10pt;
  }

  .drawing-header-project span {
    font-size: 7.5pt;
    line-height: 1.25;
  }

  .drawing-header-meta strong {
    font-size: 9.5pt;
  }

  .drawing-header-meta span {
    font-size: 7pt;
  }

  .drawing-title-band {
    margin-top: 0.06in;
    padding: 0.055in 0.1in;
  }

  .drawing-title-band h2 {
    font-size: 12pt;
  }

  .drawing-title-band span {
    font-size: 7.5pt;
  }

  .drawing-scene-frame {
    min-height: 0;
    margin-top: 0.06in;
    padding: 0.04in;
    overflow: hidden;
  }

  .drawing-scene-metrics {
    align-self: start;
    height: auto;
    min-height: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: auto;
    align-content: start;
    margin: 0.06in 0 0.08in;
  }

  .drawing-scene-metric {
    display: block;
    min-height: 0.58in;
    padding: 0.07in 0.08in;
    background: #fafafa;
  }

  .drawing-scene-metric span {
    font-size: 7.5pt;
  }

  .drawing-scene-metric strong {
    margin-top: 3px;
    font-size: 9.5pt;
    line-height: 1.22;
  }

  .drawing-footer {
    align-self: end;
    margin-top: 0;
    padding-top: 0.04in;
    gap: 0.08in;
    font-size: 7pt;
  }

  .drawing-footer span:first-child {
    min-width: 0;
  }

  .drawing-footer span:last-child {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}
