:root {
  --ink: #0d0d0d;
  --line: #e6e6e1;
  --muted: #6f6f6b;
  --accent: #10a37f;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: break-word;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 3.2vw, 48px);
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 8px;
}

h2 {
  font-size: 22px;
  font-weight: 560;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 16px;
  font-weight: 560;
  letter-spacing: -0.02em;
}

p {
  line-height: 1.65;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.eyebrow {
  margin-bottom: 8px;
}

.design-heading,
.design-canvas-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}

.design-heading h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 2.6vw, 40px);
  letter-spacing: -0.03em;
  margin: 6px 0 10px;
}

.design-heading p {
  max-width: 46ch;
  color: var(--muted);
}

.design-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, 1fr);
  gap: 22px;
  align-items: start;
}

.design-grid .card,
.design-agent-panel {
  min-width: 0;
}

#design-plan {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0;
  background: #fbfbf8;
}

#design-plan svg {
  width: 100%;
  display: block;
  min-height: 220px;
  max-height: 480px;
  touch-action: none;
}

#design-plan g {
  cursor: pointer;
}

.design-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.design-metrics strong,
.design-metrics small,
.design-option strong,
.design-option small {
  display: block;
}

.design-metrics strong {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin-top: 6px;
}

.design-unit-editor {
  padding: 15px 0;
}

.design-locks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.design-timeline {
  max-height: 540px;
  overflow: auto;
  padding-left: 22px;
}

.design-timeline li {
  border-left: 1px solid var(--line);
  padding: 0 0 18px 16px;
  list-style: none;
  position: relative;
}

.design-timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--ink);
}

.design-timeline li p {
  margin: 5px 0;
  font-size: 14px;
}

.design-timeline small {
  color: var(--muted);
}

.design-alternatives {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.design-option {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  min-width: 0;
  background: var(--bg);
  transition:
    border-color 160ms var(--ease),
    background 160ms var(--ease),
    transform 160ms var(--ease);
}

.design-option:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.design-option > strong {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 15px 0 4px;
}

#design-model,
#design-massing {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-warm);
}

#design-model {
  height: 560px;
}

#design-massing {
  height: 330px;
}

#design-evidence pre,
#design-comparison pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 500px;
  overflow: auto;
  font-size: 12px;
}

.design-agent-panel .card {
  padding: 22px;
}

.composer {
  display: grid;
  gap: 12px;
}

.composer textarea {
  min-height: 148px;
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
}

.composer .primary {
  justify-self: start;
}

#webmcp-status {
  color: var(--muted);
  background: var(--soft);
  border-color: var(--line);
}

#agent-settings {
  margin-top: 20px;
}

#agent-settings summary {
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
  padding: 8px 0;
}

#agent-settings summary::-webkit-details-marker {
  display: none;
}

#agent-settings label {
  display: block;
  margin: 10px 0;
}

.shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-ink);
  padding: 28px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid var(--sidebar-line);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  color-scheme: dark;
}

.brand {
  display: block;
  color: var(--sidebar-ink);
  text-decoration: none;
  font-size: 22px;
  letter-spacing: -0.04em;
  font-weight: 560;
  line-height: 1.1;
  padding: 4px 10px 0;
}

.brand:hover {
  text-decoration: none;
  color: #fff;
}

.brand-mark {
  color: var(--accent);
  padding-left: 2px;
  font-weight: 400;
}

.brand small {
  display: block;
  color: var(--sidebar-muted);
  letter-spacing: 0.12em;
  font: 10px/1.5 var(--font);
  font-weight: 500;
  margin-top: 10px;
  text-transform: uppercase;
}

.sidebar h2 {
  color: var(--sidebar-muted);
  font-size: 11px;
  font-weight: 560;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 10px;
}

.sidebar label {
  color: #cfcfcb;
  font-size: 12px;
}

.sidebar input,
.sidebar select,
.sidebar textarea {
  background: var(--sidebar-2);
  border-color: #3a3a3a;
  color: #fff;
}

.sidebar input::placeholder {
  color: #7d7d78;
}

.sidebar input:focus,
.sidebar select:focus,
.sidebar textarea:focus {
  border-color: #fff;
  box-shadow: 0 0 0 3px #10a37f40;
}

.sidebar .muted,
.sidebar a {
  color: var(--sidebar-muted);
}

.sidebar a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

.sidebar form {
  display: grid;
  gap: 10px;
}

.sidebar form button,
.sidebar .primary {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

.sidebar form button:hover:not(:disabled),
.sidebar .primary:hover:not(:disabled) {
  background: #ececec;
  border-color: #ececec;
  color: var(--ink);
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-link {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-align: left;
  color: #d8d8d4;
  background: transparent;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
  justify-content: flex-start;
}

.project-link small {
  display: block;
  color: var(--sidebar-muted);
  font-weight: 400;
  margin-top: 4px;
  font-size: 11px;
}

.project-link:hover,
.sidebar .project-link:hover {
  background: var(--sidebar-2);
  color: #fff;
  border-color: transparent;
}

.project-link.current,
.project-link.current:hover {
  background: var(--sidebar-3);
  border-color: transparent;
  color: #fff;
}

.sidebar-bottom {
  margin-top: auto;
  font-size: 12px;
  line-height: 1.65;
  color: var(--sidebar-muted);
  padding: 0 10px;
}

.sidebar-bottom a {
  color: #d4d4d0;
  font-size: 13px;
}

.sidebar-bottom button {
  width: 100%;
  margin: 12px 0;
  background: transparent;
  color: var(--sidebar-ink);
  border-color: #3a3a3a;
}

.sidebar-bottom button:hover:not(:disabled) {
  background: var(--sidebar-2);
  border-color: #4a4a4a;
  color: #fff;
}

.main {
  min-width: 0;
  max-width: 1900px;
  width: 100%;
  margin: auto;
  padding: 36px 40px 72px;
  animation: rise 520ms var(--ease);
}

.topline {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 24px;
  padding-bottom: 20px;
}

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

.actions button {
  font-size: 13px;
  white-space: nowrap;
}

.status-line {
  min-height: 20px;
  font-size: 13px;
  margin: 8px 0;
}

#job-status {
  min-height: 18px;
  margin: 4px 0 20px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 0 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.metric {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 22px 24px;
  box-shadow: none;
}

.metric:last-child {
  border-right: 0;
}

.metric strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.03em;
  display: block;
  margin: 8px 0 6px;
}

.metric small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.tabs {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding: 0 0 12px;
  margin-bottom: 24px;
}

.tabs button {
  font-size: 13px;
  min-height: 36px;
  border-radius: var(--radius-pill);
  padding: 0 12px;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  font-weight: 500;
}

.tabs button:hover:not(:disabled) {
  background: var(--soft);
  color: var(--ink);
  border-color: transparent;
}

.tabs button.active {
  color: var(--ink);
  background: var(--soft);
  border-color: transparent;
  font-weight: 560;
}

.sidebar > * {
  flex-shrink: 0;
}

.sidebar .tabs {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  overflow: visible;
  gap: 2px;
  border: 0;
  padding: 0;
  margin: 0;
}

.sidebar .tabs button {
  text-align: left;
  justify-content: flex-start;
  color: #c6c6c2;
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 13px;
}

.sidebar .tabs button:hover:not(:disabled) {
  background: var(--sidebar-2);
  color: #fff;
}

.sidebar .tabs button.active {
  color: #fff;
  background: var(--sidebar-3);
}

.new-project-disclosure {
  border: 1px solid #2f2f2f;
  border-radius: var(--radius);
  padding: 0;
  background: transparent;
  color: var(--sidebar-ink);
}

.new-project-disclosure summary {
  padding: 11px 12px;
  font-size: 13px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.new-project-disclosure summary::-webkit-details-marker {
  display: none;
}

.new-project-disclosure form {
  padding: 0 12px 14px;
  margin-top: 4px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 2.4vw, 38px);
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 6px 0 0;
}

.stage-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.stage-label i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  box-shadow: 0 0 0 4px #10a37f22;
}

.studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
  align-items: start;
  margin-bottom: 8px;
}

.studio-stage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  min-height: min(68vh, 760px);
  display: flex;
  flex-direction: column;
}

.studio-viewport {
  width: 100%;
  flex: 1;
  min-height: 520px;
  height: min(62vh, 700px);
  border: 0;
  background: #f1f0eb;
}

.studio-stage-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.studio-stage-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-stage-actions button {
  min-height: 36px;
  font-size: 13px;
}

.studio-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.studio-rail .card {
  margin-bottom: 0;
}

.studio-iterate h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 6px 0 10px;
}

.studio-empty {
  min-height: min(62vh, 640px);
}

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

.building-stage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 450px;
}

.building-stage-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.building-stage-head .eyebrow {
  font-size: 11px;
  margin: 0 0 4px;
}

.building-stage-head h3 {
  font-size: 16px;
  margin: 0;
}

.quiet-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.quiet-link:hover {
  color: var(--ink);
}

.building-stage iframe {
  width: 100%;
  height: 390px;
  border: 0;
  flex: 1;
  background: var(--bg-warm);
}

.building-stage-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.building-stage-footer button {
  font-size: 13px;
  min-height: 36px;
  background: transparent;
}

.development-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  margin-bottom: 18px;
}

.card h2:first-child,
.card h3:first-child {
  margin-top: 0;
}

.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.card-heading h3 {
  margin: 0;
}

.program-card {
  padding: 20px 22px;
}

.program-facts {
  margin: 8px 0 12px;
  font-size: 14px;
}

.program-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.program-facts dt {
  color: var(--muted);
}

.program-facts dd {
  margin: 0;
  text-align: right;
  font-weight: 560;
}

.program-card > p {
  font-size: 13px;
  margin-bottom: 0;
}

.decision-card {
  background: var(--bg);
  border-color: var(--line);
  padding: 22px;
  flex: 1;
}

.decision-card h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 8px 0;
}

.decision-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.workflow-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  min-width: 0;
  justify-content: flex-start;
}

.workflow-card:hover:not(:disabled) {
  background: var(--surface);
  border-color: var(--ink);
}

.workflow-number {
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.workflow-card strong {
  font-size: 14px;
  display: block;
  font-weight: 560;
}

.workflow-card small {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
  line-height: 1.55;
}

.workflow-card > span:last-child {
  margin-left: auto;
  color: var(--faint);
}

.presentation-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-lg);
  margin-top: 18px;
  overflow: hidden;
}

.presentation-strip > div {
  padding: 28px;
}

.presentation-strip h3 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 9px 0;
}

.presentation-strip img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.model-empty {
  padding: 48px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  color: var(--muted);
}

.model-empty svg {
  width: 120px;
  fill: none;
  stroke: #b8b8b2;
  stroke-width: 1;
}

.model-empty p {
  max-width: 330px;
}

.model-empty h3 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 8px;
}

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

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

.span-all {
  grid-column: 1 / -1;
}
#site-fit > .wide {
  grid-column: 1/-1;
}
.toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar label {
  min-width: 150px;
  flex: 1;
}

.toolbar .check {
  flex: none;
}

.estimate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.row-button {
  border: 0;
  padding: 0;
  min-height: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-weight: 560;
  font-size: 14px;
  border-radius: 0;
  justify-content: flex-start;
}

.row-button:hover:not(:disabled) {
  text-decoration: underline;
  background: transparent;
  border-color: transparent;
  transform: none;
}

tr.selected {
  background: var(--accent-soft);
}

td small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.warning details {
  margin-top: 8px;
}

.warning ul {
  padding-left: 18px;
  max-height: 200px;
  overflow: auto;
}

.preview {
  position: sticky;
  top: 20px;
  min-width: 0;
}

.preview iframe {
  width: 100%;
  height: 420px;
  border: 0;
  background: var(--bg-warm);
  border-radius: var(--radius);
}

.preview .card {
  padding: 16px;
}

.scope-summary {
  display: grid;
  gap: 12px;
}

.scope-summary div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 13px;
}

.empty {
  padding: 88px 24px;
  text-align: left;
  max-width: 680px;
  margin: 48px auto 0;
}

.empty h1 {
  font-size: clamp(44px, 7vw, 64px);
  margin: 12px 0 18px;
}

.empty > p {
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
}

.detail-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 18px;
}

.detail-title button,
.actions button,
.design-canvas-head button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.detail-title h2 {
  margin-bottom: 5px;
}

.detail {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.evidence {
  max-height: 260px;
  overflow: auto;
}

.evidence button {
  font-size: 13px;
}

.price {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: var(--surface);
}

details > summary {
  cursor: pointer;
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

.price summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 560;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  list-style: none;
}

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

.price .grid {
  padding: 0 18px 20px;
}

.scope-item {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 20px;
}

.scope-item h3 {
  margin-bottom: 14px;
}

.compact {
  max-width: 500px;
}

.inline-form {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.inline-form label {
  flex: 1;
  min-width: 170px;
}

#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sidebar);
  color: #fff;
  border: 1px solid #2f2f2f;
  border-radius: var(--radius-xl);
  padding: 12px 20px;
  box-shadow: var(--shadow-lg);
  z-index: 40;
  max-width: min(520px, 90vw);
  font-size: 14px;
  animation: toast-in 280ms var(--ease);
}

#notice:empty {
  display: none;
}

.error-page {
  max-width: 650px;
  margin: 100px auto;
  padding: 30px;
}

.error-page code {
  display: block;
  background: var(--soft);
  padding: 15px;
  overflow: auto;
  border-radius: var(--radius-sm);
}

.working {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #f7f7f4cc;
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
}

.working-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  font-size: 14px;
}

.id {
  font-family: var(--mono);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.detail .muted {
  overflow-wrap: anywhere;
}

.comparison-positive {
  color: #8a3f21;
}

.comparison-negative {
  color: var(--accent);
}

.studio-brief,
.studio-chat,
.studio-context {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.studio-heading h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
}

.blender-hero {
  width: 100%;
  border-radius: var(--radius);
  margin-top: 24px;
}

.blender-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 18px;
  margin: 24px 0;
}

.blender-gallery figure {
  margin: 0;
}

.blender-gallery img {
  width: 100%;
  border-radius: var(--radius);
}

.blender-gallery figcaption {
  padding: 8px 0;
}

.blender-gallery small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.estimate-layout > div,
.grid > *,
.preview > * {
  min-width: 0;
}

@media (min-width: 1650px) {
  .main {
    padding: 42px 56px 80px;
  }

  .building-stage iframe {
    height: 470px;
  }

  .development-grid {
    grid-template-columns: minmax(0, 1fr) 325px;
  }

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

  .preview iframe {
    height: 400px;
  }
}

@media (max-width: 1200px) {
  .shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .main {
    padding: 24px;
  }

  .studio,
  .development-grid {
    grid-template-columns: minmax(0, 1fr) 255px;
  }

  .studio-viewport {
    min-height: 420px;
    height: 52vh;
  }

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

  .design-heading,
  .design-canvas-head {
    flex-wrap: wrap;
  }

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

  .metric {
    padding: 18px;
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .building-stage iframe {
    height: 400px;
  }

  .estimate-layout {
    grid-template-columns: 1fr;
  }

  .preview {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .preview iframe {
    height: 240px;
  }

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

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

@media (max-width: 960px) {
  .studio,
  .development-grid {
    grid-template-columns: 1fr;
  }

  .development-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .building-stage {
    min-height: 390px;
  }

  .building-stage iframe {
    height: 350px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .stage-label {
    white-space: normal;
    text-align: right;
  }

  .presentation-strip img {
    height: 100%;
    min-height: 210px;
  }
}

@media (max-width: 700px) {
  .studio-viewport,
  .studio-empty {
    min-height: 360px;
    height: 48vh;
  }

  .studio-stage-bar {
    flex-wrap: wrap;
  }

  .shell {
    display: block;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding: 18px 16px;
    gap: 16px;
  }

  .brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 20px;
  }

  .brand small {
    margin: 0 0 0 auto;
    letter-spacing: 0.08em;
  }

  .sidebar section {
    max-height: 140px;
    overflow: auto;
  }

  .sidebar form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
  }

  .sidebar input {
    min-width: 0;
  }

  .projects {
    flex-direction: row;
    overflow: auto;
  }

  .project-link {
    min-width: 168px;
    flex: 1;
  }

  .sidebar-bottom {
    display: none;
  }

  .sidebar .tabs {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow: auto;
    gap: 4px;
  }

  .sidebar .tabs button {
    white-space: nowrap;
    flex: none;
  }

  .main {
    padding: 22px 16px 40px;
  }

  .actions {
    width: 100%;
  }

  .actions button {
    flex: 1;
  }

  .summary {
    margin-bottom: 18px;
  }

  .metric {
    padding: 14px;
  }

  .metric strong {
    font-size: 24px;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow: auto;
    margin-right: -16px;
  }

  .tabs button {
    flex: none;
    white-space: nowrap;
  }

  .stage-label {
    display: none;
  }

  .development-details,
  .grid,
  .two,
  .preview {
    grid-template-columns: 1fr;
  }

  .building-stage-head {
    padding: 15px;
  }

  .building-stage iframe {
    height: 300px;
  }

  .presentation-strip {
    grid-template-columns: 1fr;
  }

  .presentation-strip img {
    height: 210px;
  }

  .card {
    padding: 18px;
  }

  .empty {
    padding: 36px 4px;
  }

  .empty h1 {
    font-size: 40px;
  }

  .toolbar,
  .inline-form {
    align-items: stretch;
  }

  .preview iframe {
    height: 280px;
  }
}
