@font-face {
  font-family: "Be Vietnam Pro";
  src: url("./assets/brand/BeVietnamPro-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("./assets/brand/BeVietnamPro-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("./assets/brand/BeVietnamPro-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("./assets/brand/BeVietnamPro-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

:root {
  color-scheme: light;
  --ecg-green: #234225;
  --action-green: #2f5a33;
  --action-green-dark: #234225;
  --action-soft: #edf5e8;
  --action-ring: rgba(35, 66, 37, 0.3);
  --lime: #b0c994;
  --pearl: #f4f1eb;
  --smoke: #f8f8f8;
  --carbon: #343432;
  --zeus: #231f20;
  --bombay: #aeaead;
  --ink: #1c1b1a;
  --muted: #6f6b62;
  --line: #d8d2c8;
  --surface: #fffdf8;
  --panel: #282725;
  --panel-2: #393733;
  --danger: #a93b28;
  --deck: #c9a368;
  --deck-dark: #8f683c;
  --shadow: 0 16px 42px rgba(35, 31, 32, 0.16);
  --small-shadow: 0 8px 18px rgba(35, 31, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--pearl);
  color: var(--ink);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.stage:focus-visible,
.selectable:focus-visible {
  outline: 3px solid rgba(35, 66, 37, 0.72);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 310px) 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  background: var(--zeus);
  color: var(--surface);
  border-bottom: 4px solid var(--action-green);
}

.brand-lockup {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  width: 82px;
  height: 34px;
  object-fit: contain;
  padding: 4px;
  background: var(--pearl);
  border-radius: 6px;
}

.brand-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title strong {
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: 0;
}

.brand-title span {
  color: #d9d3ca;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.project-meta .eyebrow {
  color: var(--lime);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
}

.project-meta h1 {
  margin: 0;
  color: var(--surface);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #3c3a36;
  color: var(--surface);
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 7px;
  font-weight: 700;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.34);
}

.button.primary {
  background: var(--action-green);
  border-color: var(--action-green);
  color: var(--surface);
}

.button.secondary {
  background: var(--surface);
  border-color: rgba(35, 66, 37, 0.28);
  color: var(--ecg-green);
}

.button.danger {
  background: var(--action-green-dark);
  border-color: rgba(35, 66, 37, 0.64);
  color: var(--surface);
}

.button.ghost {
  background: transparent;
  color: var(--surface);
}

.button.small {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.visually-hidden-file {
  display: none;
}

.workspace {
  display: grid;
  grid-template-columns: 76px minmax(260px, 340px) minmax(480px, 1fr);
  min-height: calc(100vh - 70px);
}

.tool-rail {
  background: var(--carbon);
  padding: 12px 9px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-right: 1px solid #47443f;
}

.tool-button {
  position: relative;
  display: grid;
  place-items: center;
  gap: 3px;
  width: 58px;
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: #252422;
  color: #e7e0d6;
  padding: 6px 4px;
}

.tool-button:hover,
.tool-button.active {
  border-color: var(--action-green);
  background: #413d36;
}

.tool-button.active::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  background: var(--action-green);
}

.tool-icon {
  width: 22px;
  height: 22px;
  color: #e7e0d6;
  display: grid;
  place-items: center;
}

.tool-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-label {
  max-width: 100%;
  font-size: 9px;
  line-height: 1.1;
  text-align: center;
}

.inspector {
  background: #eee8de;
  border-right: 1px solid var(--line);
  overflow: auto;
  padding: 18px;
}

.inspector-header {
  margin-bottom: 16px;
}

.inspector-header .eyebrow {
  color: var(--ecg-green);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
}

.inspector-header h2 {
  margin: 2px 0 6px;
  font-size: 22px;
  letter-spacing: 0;
}

.inspector-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.panel-section {
  margin: 0 0 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--small-shadow);
}

.panel-section h3 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--carbon);
}

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

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

.field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.check-row span {
  color: #4d4943;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cfc6ba;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 7px 9px;
}

.field textarea {
  min-height: 72px;
  resize: vertical;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.check-row input {
  width: 16px;
  height: 16px;
}

.template-grid,
.option-grid,
.object-grid,
.swatch-grid {
  display: grid;
  gap: 9px;
}

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

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

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

.option-tile {
  min-height: 62px;
  padding: 9px;
  border: 1px solid #d3c9bc;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.option-tile strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.option-tile span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.option-tile.active,
.swatch.active {
  border-color: var(--action-green);
  outline: 2px solid var(--action-ring);
}

.swatch-grid {
  grid-template-columns: repeat(4, 1fr);
}

.swatch {
  height: 38px;
  border: 2px solid #d3c9bc;
  border-radius: 6px;
  background: var(--swatch);
}

.health-row {
  margin-bottom: 7px;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--carbon);
  font-size: 12px;
  line-height: 1.35;
}

.health-row.ok {
  border-color: rgba(35, 66, 37, 0.28);
  background: #f4f8ef;
}

.health-row.warning {
  border-color: rgba(35, 66, 37, 0.3);
  background: var(--action-soft);
}

.health-row.error {
  border-color: rgba(169, 59, 40, 0.38);
  background: #fff0ed;
}

.health-row.info {
  background: #f7f5ef;
}

.layer-row {
  width: 100%;
  min-height: 46px;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.layer-row + .layer-row {
  margin-top: 7px;
}

.layer-row h3,
.layer-row p {
  margin: 0;
}

.layer-row h3,
.layer-row span {
  font-size: 12px;
  font-weight: 800;
}

.layer-row p,
.layer-row strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.layer-row.active {
  border-color: var(--action-green);
  background: var(--action-soft);
  box-shadow: inset 4px 0 0 var(--action-green);
}

.selection-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(35, 66, 37, 0.24);
  border-radius: 7px;
  background: #f5f8ef;
}

.selection-card strong {
  color: var(--ecg-green);
  font-size: 14px;
}

.selection-card span {
  color: var(--muted);
  font-size: 12px;
}

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

.metric-grid.compact {
  margin-top: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-grid div {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.metric-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-grid strong {
  color: var(--carbon);
  font-size: 18px;
}

.home-layer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  margin-top: 10px;
}

.home-source {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.revision-list {
  display: grid;
  gap: 8px;
}

.revision-list div {
  display: grid;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ebe4da;
}

.revision-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.revision-list strong {
  font-size: 12px;
}

.revision-list span {
  color: var(--muted);
  font-size: 11px;
}

.workspace-main {
  min-width: 0;
  padding: 18px;
  display: grid;
  grid-template-rows: auto minmax(430px, 1fr);
  gap: 14px;
}

.viewbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #e8dfd3;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.segmented button {
  border: 0;
  background: transparent;
  color: var(--carbon);
  border-radius: 5px;
  padding: 8px 12px;
  font-weight: 800;
}

.segmented button.active {
  background: var(--ecg-green);
  color: var(--surface);
}

.snap-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--carbon);
  font-size: 12px;
  font-weight: 800;
}

.snap-toggle input {
  width: 15px;
  height: 15px;
}

.status-strip {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.stat-pill {
  display: grid;
  gap: 2px;
  min-width: 96px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.stat-pill span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-pill strong {
  font-size: 15px;
}

.stage {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stage-toolbar {
  position: absolute;
  z-index: 5;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 7px;
  align-items: center;
}

.stage-toolbar button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(35, 66, 37, 0.2);
  border-radius: 7px;
  background: rgba(255, 253, 248, 0.96);
  color: var(--ecg-green);
  font-weight: 900;
}

.stage-toolbar button:hover {
  border-color: var(--action-green);
  background: var(--action-soft);
}

.toolbar-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  background: rgba(35, 66, 37, 0.18);
}

.stage-palette {
  position: absolute;
  z-index: 6;
  left: 14px;
  top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(48px, 1fr));
  gap: 6px;
  width: min(250px, calc(100% - 110px));
  padding: 8px;
  border: 1px solid rgba(216, 210, 200, 0.86);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--small-shadow);
}

.stage-palette button {
  display: grid;
  gap: 1px;
  justify-items: center;
  min-height: 42px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--carbon);
}

.stage-palette button.active,
.stage-palette button:hover {
  border-color: var(--action-green);
  background: var(--action-soft);
}

.stage-palette strong {
  color: var(--ecg-green);
  font-size: 12px;
}

.stage-palette span {
  font-size: 9px;
  line-height: 1.1;
}

.stage-hint {
  position: absolute;
  z-index: 5;
  left: 14px;
  bottom: 14px;
  max-width: 300px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--muted);
  font-size: 12px;
  box-shadow: var(--small-shadow);
}

.view-cube {
  position: absolute;
  right: 14px;
  top: 62px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  background: var(--carbon);
  color: #fff;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  box-shadow: var(--small-shadow);
}

.deck-svg {
  width: 100%;
  height: 100%;
  min-height: 560px;
  display: block;
}

.environment-scene,
.scene-shadows,
.deck-surface-shadows,
.lighting-overlay {
  pointer-events: none;
}

.environment-sky,
.environment-horizon,
.environment-ground,
.environment-ground-plane {
  shape-rendering: geometricPrecision;
}

.environment-ground-plane {
  stroke: rgba(83, 76, 62, 0.1);
  stroke-width: 1;
}

.environment-horizon-line,
.environment-axis {
  fill: none;
  stroke: rgba(52, 52, 50, 0.12);
  stroke-width: 1.2;
}

.environment-axis {
  stroke-dasharray: 8 10;
  opacity: 0.55;
}

.environment-world {
  pointer-events: none;
}

.environment-path,
.environment-boardwalk,
.environment-sand,
.environment-trail {
  opacity: 0.9;
}

.environment-path {
  fill: #c9c4b7;
}

.environment-boardwalk {
  fill: #b7a171;
}

.environment-sand {
  fill: #e9dfbd;
}

.environment-path-line,
.environment-rail,
.environment-fence,
.environment-fence-posts,
.environment-retaining,
.environment-wood-edge {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.environment-path-line {
  stroke: rgba(101, 89, 68, 0.38);
  stroke-width: 2;
}

.environment-fence,
.environment-rail {
  stroke: rgba(92, 82, 63, 0.55);
  stroke-width: 4;
}

.environment-fence-post,
.environment-fence-rail {
  stroke: rgba(84, 75, 57, 0.68);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.environment-fence-post {
  stroke-width: 5;
}

.environment-fence-rail {
  stroke-width: 4;
}

.environment-fence-rail.secondary {
  stroke-width: 3;
  opacity: 0.84;
}

.environment-fence-posts {
  stroke: rgba(92, 82, 63, 0.5);
  stroke-width: 5;
}

.environment-neighbor {
  stroke: rgba(69, 72, 64, 0.28);
  stroke-width: 2;
}

.environment-window {
  fill: rgba(124, 154, 158, 0.42);
  stroke: rgba(255, 253, 248, 0.72);
  stroke-width: 2;
}

.environment-shrub,
.environment-hedge {
  fill: rgba(87, 125, 82, 0.72);
  stroke: rgba(50, 83, 49, 0.42);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.environment-tree-trunk {
  fill: #765c3c;
}

.environment-tree-canopy {
  fill: #5f7f56;
  stroke: rgba(42, 78, 43, 0.36);
  stroke-width: 2;
}

.environment-tree-trunk-3d {
  stroke: #765c3c;
  stroke-width: 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.environment-tree-canopy-3d {
  fill: #5f7f56;
  stroke: rgba(42, 78, 43, 0.38);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.environment-tree-canopy-3d.alt {
  fill: #6f9064;
}

.environment-shrub-3d {
  fill: rgba(87, 125, 82, 0.72);
  stroke: rgba(50, 83, 49, 0.38);
  stroke-width: 2;
}

.environment-box-side {
  fill: #bfc8b9;
  stroke: rgba(62, 65, 57, 0.38);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.environment-box-side.alt {
  fill: #aebaa8;
}

.environment-box-top {
  fill: #d6decf;
  stroke: rgba(62, 65, 57, 0.34);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.environment-lounge-3d.environment-box-side,
.environment-lounge-3d.environment-box-top {
  fill: rgba(247, 253, 248, 0.82);
}

.environment-needle-bed {
  fill: #cad9bf;
}

.environment-trail {
  fill: #c9bca4;
}

.environment-retaining {
  stroke: rgba(105, 96, 79, 0.5);
  stroke-width: 8;
}

.environment-bed {
  fill: rgba(125, 144, 103, 0.42);
}

.environment-paver-line {
  stroke: rgba(84, 78, 68, 0.2);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.environment-water,
.environment-pool {
  fill: #8fc2c7;
  stroke: rgba(43, 92, 98, 0.28);
  stroke-width: 2;
}

.environment-pool {
  fill: #6fb5be;
  stroke-width: 4;
}

.environment-pool-highlight,
.environment-dune-grass {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.environment-pool-highlight {
  stroke: rgba(240, 255, 253, 0.68);
  stroke-width: 4;
}

.environment-dune-grass {
  stroke: rgba(91, 119, 73, 0.72);
  stroke-width: 5;
}

.environment-lounge {
  fill: rgba(247, 253, 248, 0.75);
  stroke: rgba(82, 72, 58, 0.32);
  stroke-width: 2;
}

.scene-shadow {
  fill: rgba(35, 31, 32, 0.42);
  stroke: none;
}

.scene-shadow-line,
.deck-surface-shadow-line {
  fill: none;
  stroke: rgba(35, 31, 32, 0.45);
  stroke-width: 7;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.scene-shadow-line.stair-rail-shadow,
.deck-surface-shadow-line.rail-surface-shadow {
  stroke-width: 5;
}

.deck-surface-shadow {
  fill: rgba(35, 31, 32, 0.32);
  stroke: none;
}

.deck-surface-shadows {
  mix-blend-mode: multiply;
}

.lighting-overlay {
  mix-blend-mode: multiply;
}

.lighting-lift {
  mix-blend-mode: screen;
}

.grid-line {
  stroke: rgba(52, 52, 50, 0.08);
  stroke-width: 1;
}

.deck-top {
  fill: var(--deck);
  stroke: var(--deck-dark);
  stroke-width: 3;
}

.deck-side {
  fill: #8d643b;
  stroke: #654522;
  stroke-width: 2;
}

.deck-board {
  stroke: rgba(77, 53, 27, 0.42);
  stroke-width: 1.4;
}

.joist-line {
  stroke: #6f5434;
  stroke-width: 1.5;
  opacity: 0.58;
}

.beam-line {
  stroke: #4d3821;
  stroke-width: 5;
  opacity: 0.52;
}

.blocking-line {
  stroke: var(--ecg-green);
  stroke-width: 3;
  stroke-dasharray: 6 6;
  opacity: 0.58;
}

.bracing-line {
  stroke: rgba(69, 52, 31, 0.72);
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.86;
}

.rail-line {
  stroke: var(--rail, #6b4d2d);
  stroke-width: 8;
  stroke-linecap: round;
}

.rail-picket {
  stroke: var(--rail, #8b693f);
  stroke-width: 4;
  stroke-linecap: round;
}

.rail-line.rail-glass,
.stair-rail-line.rail-glass,
.stair-rail-plan.rail-glass {
  stroke: #1f1f1e;
}

.rail-line.rail-cable,
.stair-rail-line.rail-cable,
.stair-rail-plan.rail-cable {
  stroke-width: 5;
}

.rail-line.rail-privacy,
.stair-rail-line.rail-privacy,
.stair-rail-plan.rail-privacy {
  stroke-width: 10;
}

.rail-line.rail-drink-rail,
.stair-rail-line.rail-drink-rail,
.stair-rail-plan.rail-drink-rail {
  stroke-width: 10;
}

.rail-panel {
  fill: rgba(173, 194, 196, 0.34);
  stroke: rgba(42, 57, 58, 0.45);
  stroke-width: 1.5;
}

.rail-panel.rail-privacy {
  fill: rgba(70, 55, 38, 0.58);
  stroke: rgba(47, 35, 22, 0.7);
}

.rail-cable,
.rail-cable-plan {
  stroke: #6d7778;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}

.wall-shape {
  fill: #d7dacd;
  stroke: #8e9988;
  stroke-width: 3;
}

.home-context {
  pointer-events: none;
}

.home-face {
  stroke: rgba(35, 31, 32, 0.44);
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
}

.home-occlusion-face {
  stroke: none;
  vector-effect: non-scaling-stroke;
}

.home-face.wall {
  fill: #d8cdbb;
}

.home-face.wall.brick {
  fill: #8d5746;
}

.home-face.wall.stone {
  fill: #9a8971;
}

.home-face.wall.stucco {
  fill: #cec4b3;
}

.home-face.wall.fascia,
.home-face.soffit {
  fill: #f1eee5;
}

.home-face.roof {
  fill: #3e4140;
  stroke: rgba(20, 20, 19, 0.56);
}

.home-face.window {
  fill: rgba(139, 160, 166, 0.72);
  stroke: rgba(246, 247, 244, 0.92);
  stroke-width: 1.6;
}

.home-face.door {
  fill: #f6f7f4;
  stroke: #5b554b;
  stroke-width: 1.6;
}

.home-face.door.patio {
  fill: rgba(214, 224, 224, 0.82);
}

.post-shape {
  fill: #6f5434;
  stroke: #47331c;
  stroke-width: 1.5;
}

.stair-shape {
  fill: #c09355;
  stroke: #76512a;
  stroke-width: 2.5;
}

.stair-landing {
  fill: #d1aa66;
  stroke: #76512a;
  stroke-width: 2.4;
}

.stair-hitarea {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}

.stair-tread {
  fill: #d3a961;
  stroke: #7a542c;
  stroke-width: 1.8;
}

.stair-riser {
  fill: #ad7f43;
  stroke: #73502b;
  stroke-width: 1.5;
  opacity: 0.92;
}

.stair-stringer {
  fill: #8f6638;
  stroke: #684825;
  stroke-width: 1.7;
  opacity: 0.82;
}

.stair-stringer.far {
  opacity: 0.68;
}

.stair-nosing {
  stroke: rgba(91, 58, 27, 0.58);
  stroke-width: 1.45;
  stroke-linecap: round;
}

.stair-rail-plan,
.stair-rail-line {
  stroke: #4a3822;
  stroke-width: 5;
  stroke-linecap: round;
  pointer-events: none;
}

.stair-rail-plan.secondary,
.stair-rail-line.secondary {
  stroke-width: 3;
  opacity: 0.78;
}

.stair-rail-post {
  stroke: #5f482c;
  stroke-width: 3.5;
  stroke-linecap: round;
  pointer-events: none;
}

.object-hit {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}

.object-plan-fill,
.object-top {
  fill: #a9c985;
  stroke: var(--ecg-green);
  stroke-width: 2;
}

.object-plan-accent,
.object-accent-top {
  fill: #d9b368;
  stroke: #7c5529;
  stroke-width: 1.8;
}

.object-plan-canopy,
.object-canopy {
  fill: rgba(224, 164, 45, 0.76);
  stroke: rgba(77, 61, 34, 0.58);
  stroke-width: 2;
}

.object-plan-leaf,
.object-leaf-iso {
  fill: #7da462;
  stroke: var(--ecg-green);
  stroke-width: 1.5;
}

.object-plan-detail,
.object-detail-iso,
.object-rib {
  stroke: var(--ecg-green);
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
  opacity: 0.78;
  pointer-events: none;
}

.object-side {
  fill: #7a965f;
  stroke: #234225;
  stroke-width: 1.4;
}

.object-side.alt {
  fill: #8ead70;
}

.object-accent-side {
  fill: #9a713d;
  stroke: #654522;
  stroke-width: 1.4;
}

.object-accent-side.alt {
  fill: #b38345;
}

.object-leg,
.object-pole {
  stroke: #5b4429;
  stroke-width: 3;
  stroke-linecap: round;
  pointer-events: none;
}

.selectable {
  cursor: grab;
}

.resize-handle {
  fill: var(--ecg-green);
  stroke: var(--surface);
  stroke-width: 1.5;
  cursor: nwse-resize;
}

.element-control {
  cursor: pointer;
}

.element-control circle {
  fill: var(--zeus);
  stroke: var(--ecg-green);
  stroke-width: 2;
  filter: drop-shadow(0 4px 8px rgba(35, 31, 32, 0.22));
}

.element-control text {
  fill: var(--surface);
  font-size: 11px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

.control-icon {
  fill: var(--surface);
  overflow: visible;
  pointer-events: none;
}

.control-icon path {
  fill: inherit;
  pointer-events: none;
}

.selected-shape {
  filter: drop-shadow(0 2px 4px rgba(35, 31, 32, 0.16));
}

.selected-shape .stair-shape,
.selected-shape .stair-landing,
.selected-shape .stair-tread,
.selected-shape .stair-riser,
.selected-shape .stair-stringer,
.selected-shape .stair-rail-plan,
.selected-shape .stair-rail-line,
.selected-shape .stair-rail-post,
.selected-shape .object-plan-fill,
.selected-shape .object-plan-accent,
.selected-shape .object-plan-canopy,
.selected-shape .object-top,
.selected-shape .object-side,
.selected-shape .object-accent-top,
.selected-shape .object-accent-side,
.selected-shape .object-canopy,
.deck-top.selected-shape {
  stroke: rgba(35, 66, 37, 0.92);
  stroke-width: 3.4;
}

.edge-dimension line {
  stroke: rgba(35, 66, 37, 0.36);
  stroke-width: 12;
  stroke-linecap: round;
  opacity: 0;
}

.edge-dimension:hover line,
.edge-dimension.selected-shape line {
  opacity: 0.18;
}

.edge-dimension text {
  fill: var(--ecg-green);
  font-size: 12px;
  font-weight: 800;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 4px;
  text-anchor: middle;
  pointer-events: none;
}

.vertex-handle circle {
  fill: var(--surface);
  stroke: var(--ecg-green);
  stroke-width: 3;
}

.vertex-handle.selected-shape circle {
  fill: var(--ecg-green);
  stroke: var(--surface);
}

.vertex-handle text {
  fill: var(--carbon);
  font-size: 10px;
  font-weight: 900;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
  text-anchor: middle;
  pointer-events: none;
}

.report-view {
  padding: 72px 28px 28px;
  min-height: 560px;
  overflow: auto;
}

.report-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.report-header h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.report-header p {
  margin: 0;
  color: var(--muted);
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.report-summary div,
.report-notes {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.report-summary span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-summary strong {
  font-size: 18px;
}

.report-notes {
  margin-bottom: 18px;
}

.report-plan-sheet {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.report-plan-sheet h3 {
  margin: 0 0 6px;
  font-size: 14px;
  text-transform: uppercase;
}

.report-plan-sheet p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.report-plan {
  width: 100%;
  min-height: 220px;
  border: 1px solid #ece5dc;
  border-radius: 6px;
}

.report-dimension {
  fill: var(--ecg-green);
  font-size: 10px;
  font-weight: 900;
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
}

.report-notes h3 {
  margin: 0 0 6px;
  font-size: 13px;
  text-transform: uppercase;
}

.report-notes p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.material-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.material-table th,
.material-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #ece5dc;
  text-align: left;
  font-size: 13px;
}

.material-table th {
  background: var(--carbon);
  color: var(--surface);
  font-size: 11px;
  text-transform: uppercase;
}

.material-table tr:last-child td {
  border-bottom: 0;
}

.fine-print {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.estimate-view {
  padding: 72px 28px 28px;
  min-height: 560px;
  overflow: auto;
}

.estimate-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.estimate-summary div,
.estimate-cogs div,
.estimate-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.estimate-summary div,
.estimate-cogs div {
  padding: 12px;
}

.estimate-summary span,
.estimate-cogs span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.estimate-summary strong,
.estimate-cogs strong {
  font-size: 18px;
}

.estimate-section {
  margin-bottom: 18px;
  padding: 14px;
}

.estimate-section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.estimate-section-head h3 {
  margin: 0 0 5px;
  font-size: 14px;
  text-transform: uppercase;
}

.estimate-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.estimate-cogs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.estimate-table {
  table-layout: auto;
}

.estimate-table td strong,
.estimate-table td span {
  display: block;
}

.estimate-table td span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.estimate-input {
  width: 96px;
  min-width: 76px;
  padding: 8px 9px;
}

.inline-check {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--carbon);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.warning-row td {
  background: #fff8e9;
}

.project-drawer {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: none;
  background: rgba(35, 31, 32, 0.56);
  padding: 28px;
}

.project-drawer.open {
  display: grid;
  place-items: center;
}

.drawer-panel {
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 56px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  background: var(--carbon);
  color: var(--surface);
  border-bottom: 4px solid var(--action-green);
}

.drawer-head h2 {
  margin: 0;
  font-size: 20px;
}

.drawer-body {
  overflow: auto;
  padding: 18px 20px 20px;
}

.project-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 18px;
}

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

.project-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.project-card.active {
  border-color: var(--action-green);
}

.project-card h3 {
  margin: 0;
  font-size: 15px;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.new-project-overlay {
  position: fixed;
  inset: 0;
  z-index: 26;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(35, 31, 32, 0.62);
}

.new-project-panel {
  width: min(1040px, 100%);
  max-height: min(780px, calc(100vh - 56px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.drawer-head p {
  margin: 5px 0 0;
  color: #d9d3ca;
  font-size: 13px;
  line-height: 1.4;
}

.new-project-panel .drawer-body {
  padding: 14px;
}

.new-project-panel .panel-section {
  margin-bottom: 10px;
  padding: 12px;
}

.starter-shape-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.starter-shape-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shape-choice {
  min-height: 64px;
  padding: 8px;
}

.new-project-basics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.new-project-basics .field.full {
  grid-column: 1 / -1;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.empty-state {
  border: 1px dashed var(--bombay);
  border-radius: 7px;
  padding: 18px;
  color: var(--muted);
  background: #fff;
}

.toast {
  position: fixed;
  z-index: 30;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 7px;
  background: var(--ecg-green);
  color: var(--surface);
  box-shadow: var(--shadow);
  transform: translateY(120px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 68px minmax(240px, 300px) minmax(360px, 1fr);
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .tool-rail {
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: visible;
    border-right: 0;
    border-bottom: 1px solid #47443f;
  }

  .tool-button {
    flex: 1 1 58px;
  }

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

  .workspace-main {
    padding: 12px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

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

  .estimate-summary,
  .estimate-cogs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .estimate-section-head {
    display: grid;
  }

  .report-plan-sheet {
    grid-template-columns: 1fr;
  }

  .template-grid,
  .option-grid,
  .object-grid {
    grid-template-columns: 1fr;
  }

  .new-project-overlay {
    padding: 14px;
  }

  .starter-shape-grid,
  .starter-shape-grid.compact {
    grid-template-columns: 1fr;
  }
}

@media print {
  .topbar,
  .tool-rail,
  .inspector,
  .viewbar,
  .stage-toolbar,
  .view-cube,
  .project-drawer,
  .new-project-overlay {
    display: none !important;
  }

  .workspace {
    display: block;
  }

  .workspace-main {
    padding: 0;
    display: block;
  }

  .stage {
    border: 0;
    box-shadow: none;
  }

  .report-view,
  .estimate-view {
    padding: 0;
  }
}
