/* ProtoChat Studio — Project Gallery, Full-Bleed Split Workbench & 3D CAD Stage */

/* Hide marketing intro banner whenever signed-in workspace is active */
main:has(#workspace:not([hidden])) > .pc-intro-copy,
main:has(#workspace:not([hidden])) > #price-line {
  display: none;
}

main:has(#workspace:not([hidden])) {
  max-width: 1240px;
  padding: 20px 24px 48px;
}

main:has(#workspace[data-view="project"]) {
  max-width: none;
  width: 100%;
  padding: 8px 16px 20px;
}

main:has(#workspace[data-view="project"]) > #status {
  max-width: none;
  margin: 0 0 6px;
  padding: 2px 10px;
  border: 0;
  border-left: 2px solid var(--accent);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
}

#consultation p,
main:has(#workspace:not([hidden])) > #status {
  max-width: none;
}

/* Gallery Top Bar & Account Navigation */
#workspace.workspace-shell {
  display: block;
}

#workspace > .workspace-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 0 0 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

#workspace > .workspace-nav .workspace-links,
#workspace > .workspace-nav > label[for="projects"],
#workspace > .workspace-nav > #projects {
  display: none;
}

.new-project-bar {
  order: -1;
  flex: 1 1 420px;
  max-width: 560px;
  padding: 0;
  border: 0;
  background: transparent;
}

.new-project-bar form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
}

.new-project-bar label {
  grid-column: 1 / -1;
  margin: 0;
  font: 600 10.5px/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.new-project-bar input {
  min-height: 40px;
  font-size: 13.5px;
  background: var(--surface);
}

.new-project-bar button {
  min-height: 40px;
  padding: 0 16px;
  white-space: nowrap;
}

#workspace > .workspace-nav > .actions {
  margin: 0 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

#identity {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

#logout {
  min-height: 32px;
  padding: 5px 10px;
  font: 600 11px/1 var(--mono);
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

#logout:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface);
}

/* Gallery Grid */
#project-gallery {
  margin: 0 0 36px;
}

#project-gallery h2 {
  font-size: 22px;
  margin: 0 0 4px;
}

#project-gallery > .muted {
  margin: 0 0 16px;
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

button.project-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  gap: 20px;
  min-height: 112px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

button.project-card:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--surface-raised);
}

.project-card strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.project-card span {
  font: 600 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-text);
}

/* Gallery Footer Tools Band */
.workspace-tools {
  margin: 12px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.pc-tools-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 14px;
}

.pc-tools-head h2 {
  font-size: 18px;
  margin: 0;
}

.pc-tools-all {
  font: 600 11.5px/1.2 var(--mono);
  color: var(--muted);
  text-decoration: none;
}

.pc-tools-all:hover { color: var(--accent-text); }

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

.workspace-tool-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.workspace-tool-card:hover {
  border-color: var(--accent);
  background: var(--surface-raised);
}

.workspace-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: none;
}

.workspace-tool-card > .workspace-icon {
  width: 26px;
  height: 26px;
  margin-top: 2px;
}

.pc-tool-copy h3 {
  font-size: 13.5px;
  margin: 0 0 3px;
}

.pc-tool-copy p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.workspace-tool-action {
  font: 600 10.5px/1 var(--mono);
  color: var(--accent-text);
  white-space: nowrap;
  margin-top: 3px;
}

/* Switch cleanly between Gallery & Project views */
#workspace[data-view="project"] > #project-gallery,
#workspace[data-view="project"] > .workspace-nav,
#workspace[data-view="project"] > .workspace-tools {
  display: none !important;
}

#workspace:not([data-view="project"]) > #consultation {
  display: none !important;
}

/* Project Studio Command Bar */
#consultation {
  min-width: 0;
}

.pc-proj-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 6px 12px;
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

#back-to-projects {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
  background: var(--control);
  border-color: var(--line);
}

#project-heading {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  overflow-wrap: anywhere;
}

.workspace-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  border: 0;
  background: var(--surface-raised);
  color: var(--muted);
  font: 700 10.5px/1 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-left: auto;
  white-space: nowrap;
}

.workspace-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.pc-jump-pay {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

@media (min-width: 1040px) {
  .pc-jump-pay { display: none !important; }
}

.workspace-badge[data-tone="active"],
.workspace-badge[data-tone="attention"] {
  color: var(--accent-text);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.workspace-badge[data-tone="ready"] {
  color: var(--ok);
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

#delete-project {
  min-height: 32px;
  padding: 5px 10px;
  font: 600 11px/1 var(--mono);
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

#delete-project:hover:not(:disabled) {
  border-color: var(--bad-line);
  color: var(--bad);
  background: var(--bad-bg);
}

/* Compact top banner stack on delivered paid projects so 3D viewport + STEP CTA fit cleanly above fold */
main:has(#consultation[data-door="paid"] #cad-deliveries:not([hidden])) > #status {
  display: none;
}

/* Status, Progress Strip & Build Attempts */
#backlog-status {
  margin: 0 0 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: var(--surface);
  font-size: 12px;
}

.workspace-build-activity {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.workspace-build-activity > div { flex: 1; min-width: 0; }
.workspace-build-activity strong { display: block; font-size: 13px; margin-bottom: 2px; }
.workspace-build-activity p { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.workspace-build-activity button { min-height: 32px; padding: 4px 10px; font-size: 11.5px; }

.progress-strip {
  margin: 0 0 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.progress-strip .stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress-strip .stepper li {
  padding: 4px 4px 0;
  border-top: 2px solid var(--line-strong);
  font-size: 11px;
  color: var(--muted);
  min-width: 0;
}

.progress-strip .stepper b {
  display: inline;
  font-size: 11.5px;
  color: var(--ink);
  margin-right: 6px;
}

.progress-strip .stepper .is-done { border-color: var(--ok); }
.progress-strip .stepper .is-done b::after { content: " ✓"; color: var(--ok); }
.progress-strip .stepper .is-now { border-color: var(--accent); }
.progress-strip .stepper .is-now b { color: var(--accent-text); }

.progress-strip .bar {
  position: relative;
  height: 4px;
  margin-top: 7px;
  background: var(--control);
  overflow: hidden;
  border-radius: 999px;
}

.progress-strip .bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--accent);
  transition: width 0.4s ease;
}

.progress-strip .pmeta {
  display: flex;
  gap: 8px 14px;
  flex-wrap: wrap;
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.progress-strip .pmeta [data-note] { color: var(--ink); }

.build-attempts {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.build-attempts h3 { font-size: 14px; margin: 0 0 10px; }
.build-attempts .parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr));
  gap: 10px;
}

.build-attempts .part-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-raised);
}

.build-attempts .part-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: #ffffff;
}

.build-attempts .part-card figcaption {
  padding: 8px 10px;
  font-size: 11.5px;
  display: grid;
  gap: 3px;
}

.build-attempts .part-line { color: var(--muted); }
.build-attempts .part-status {
  justify-self: start;
  font: 600 10px/1.2 var(--mono);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--ok-line);
  color: var(--ok);
}

.build-attempts .part-card.is-building .part-status {
  color: var(--muted);
  border-color: var(--line-strong);
}

.build-attempts .part-card.is-failed { border-color: var(--bad-line); }
.build-attempts .part-card.is-failed .part-status {
  color: var(--bad);
  border-color: var(--bad-line);
}

.build-attempts .cycle-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--muted);
}

/* Primary Studio Split Workbench */
#consultation .protochat-stage.account-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 12px;
  align-items: start;
  background: transparent;
  border: 0;
}

/* Left Workbench (.concept-panel) */
.concept-panel {
  order: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  min-height: calc(100dvh - 146px);
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

#consultation:not([data-door="unpaid"]) .panel-heading {
  display: none;
}

.panel-heading .workspace-icon {
  width: 24px;
  height: 24px;
}

.pc-panel-title .eyebrow { margin: 0 0 2px; }
.pc-panel-title h3 { font-size: 16.5px; margin: 0; }

/* Hide empty workspace tabs when buyer is in unpaid part specification builder */
#consultation[data-door="unpaid"] .concept-panel > .workspace-tabs,
#consultation[data-door="unpaid"] .concept-panel > .workspace-tab-panel {
  display: none;
}

/* Studio Segmented Tabs */
.workspace-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 10px;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.workspace-tabs [role="tab"] {
  min-height: 32px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.workspace-tabs [role="tab"]:hover:not([aria-selected="true"]) {
  color: var(--ink);
  background: var(--control);
}

.workspace-tabs [role="tab"][aria-selected="true"] {
  background: var(--surface-raised);
  border-color: var(--accent);
  color: var(--ink);
}

.workspace-tab-panel[hidden] { display: none !important; }
.workspace-tab-panel { min-width: 0; overflow-wrap: anywhere; }

.workspace-tab-panel article {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.workspace-tab-panel article p {
  margin: 4px 0 0;
  white-space: pre-wrap;
  font-size: 13.5px;
  line-height: 1.6;
}

.workspace-empty {
  text-align: center;
  padding: 56px 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
}

.workspace-empty .workspace-icon {
  width: 48px;
  height: 48px;
  opacity: 0.72;
  margin-bottom: 10px;
}

.workspace-empty h3 {
  font-size: 16px;
  margin: 0 0 6px;
}

.workspace-empty p {
  font-size: 13px;
  margin: 0 auto;
}

.workspace-files-empty {
  padding: 20px;
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
}

/* Interactive 3D CAD Delivery Viewport */
#cad-deliveries {
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

#cad-deliveries > h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  margin: 0 0 2px;
}

#cad-deliveries > p {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}

.pc-cad-viewer-host {
  margin: 0 0 12px;
}

.pc-cad-stage {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background: var(--stage-bg);
}

.pc-cad-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 8px 12px;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--line);
}

.pc-cad-modes, .pc-cad-views {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.pc-cad-btn {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.pc-cad-btn:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--control);
}

.pc-cad-btn.is-active {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--control);
}

.pc-cad-dims {
  font: 600 11px/1.2 var(--mono);
  color: var(--ink);
  letter-spacing: 0.02em;
}

.pc-cad-body {
  position: relative;
  background: var(--stage-bg);
}

.pc-cad-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 250px;
  max-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--stage-bg);
}

.pc-cad-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.pc-cad-status {
  margin: 0;
  padding: 20px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.pc-cad-hint {
  position: absolute;
  left: 10px;
  bottom: 8px;
  margin: 0;
  padding: 3px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--line);
  font: 500 10.5px/1.3 var(--mono);
  color: var(--muted);
  pointer-events: none;
}

.pc-cad-print-img {
  display: block;
  width: 100%;
  max-height: 350px;
  object-fit: contain;
  background: #ffffff;
  padding: 12px;
}

/* Delivery Download Action Strip */
#cad-deliveries > div:not(.pc-cad-viewer-host) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

#cad-deliveries > div:not(.pc-cad-viewer-host) > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

#cad-deliveries > div:not(.pc-cad-viewer-host) > a::before {
  content: '↓';
  font-weight: 700;
  color: var(--accent-text);
}

#cad-deliveries > div:not(.pc-cad-viewer-host) > a:hover {
  border-color: var(--accent);
  background: var(--control);
}

#cad-deliveries > div:not(.pc-cad-viewer-host) > a.pc-dl-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

#cad-deliveries > div:not(.pc-cad-viewer-host) > a.pc-dl-primary::before {
  color: var(--accent-ink);
}

#cad-deliveries > div:not(.pc-cad-viewer-host) > a.pc-dl-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

#cad-deliveries > div:not(.pc-cad-viewer-host) > a.pc-dl-muted {
  color: var(--ink);
  background: var(--surface);
}

#cad-deliveries:has(.pc-cad-viewer-host) section[aria-label="Your CAD drawing"] > img {
  display: none;
}

#cad-deliveries section[aria-label="Your CAD drawing"] {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
}

#cad-deliveries section[aria-label="Your CAD drawing"] h3 {
  font-size: 15px;
  margin: 0 0 10px;
}

#cad-deliveries section[aria-label="Your CAD drawing"] img {
  display: block;
  max-width: 100%;
  background: #ffffff;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 10px;
}

/* Design Checks Card */
.dfm-notes {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
}

.dfm-notes h3 { margin: 0 0 8px; font-size: 13.5px; }
.dfm-notes p { margin: 4px 0; font-size: 12.5px; line-height: 1.55; }
.dfm-notes .dfm-ok { color: var(--ok); }
.dfm-notes .dfm-warning { color: var(--warn); }
.dfm-notes .dfm-fail { color: var(--bad); }
.dfm-notes .dfm-note { color: var(--muted); font-size: 11.5px; }

#workflow-view h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
#workflow-view img, #project-review img { max-width: 100%; height: auto; border-radius: 6px; }
#workflow-view textarea { margin-top: 12px; font-size: 13px; }

/* Prompts */
.prompts-form, #prompts { min-width: 0; }
#prompts {
  padding: 14px;
  margin: 0 0 12px;
  border: 1px solid var(--warn-line);
  border-radius: 8px;
  background: var(--warn-bg);
}
#prompts h3 { font-size: 15px; margin: 0 0 10px; }
.prompt-group { min-width: 0; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.prompt-group.blocking { border-left: 3px solid var(--accent); }
.prompt-group legend { padding: 0 4px; font-size: 12.5px; font-weight: 700; }
.prompt { min-width: 0; margin-top: 10px; }
.prompt-question { margin: 0 0 6px; font-size: 13px; color: var(--ink); }

/* Right Inspector (.conversation-panel) */
#consultation .conversation-panel {
  order: 2;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  position: sticky;
  top: 60px;
}

.pc-conv-head {
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.pc-conv-head .eyebrow { margin: 0 0 3px; }
.pc-conv-head h3 { font-size: 17px; margin: 0; }

#consultation:not([data-door="unpaid"]) .door-side {
  display: none;
}

/* Once spec sheet is confirmed and #payment opens, collapse duplicate $35 card & door blurb so Checkout + Agreement + Pay start right at top above the fold */
#consultation[data-door="unpaid"]:has(#payment:not([hidden])) .pc-conv-head,
#consultation[data-door="unpaid"]:has(#payment:not([hidden])) .door-side,
#consultation[data-door="unpaid"]:has(#payment:not([hidden])) #transcript {
  display: none;
}

.pc-wait-row {
  margin-top: 10px;
}

.pc-pay-row {
  margin-top: 10px;
}

.pc-pay-row #pay {
  width: 100%;
  min-height: 44px;
  font-size: 14px;
}

.conversation-panel #payment .consent-card {
  margin: 10px 0 0;
}

#consultation[data-door="unpaid"] #voice,
#consultation[data-door="unpaid"] #pause,
#consultation[data-door="unpaid"] .conversation-settings {
  display: none;
}

.door-side {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
}

/* Price Summary Card */
.price-card {
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface-raised);
}

.price-card .eyebrow { margin: 0 0 4px; }
.price-amount { margin: 0 0 8px; font-size: 13.5px; color: var(--ink); }
.price-amount strong {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent-text);
  margin-right: 6px;
  line-height: 1;
}

.price-card ul {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.price-card li {
  font-size: 12.5px;
  padding-left: 18px;
  position: relative;
  color: var(--ink);
}

.price-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-text);
  font-weight: 700;
}

.price-card .muted { margin: 0; font-size: 11.5px; }

/* Transcript & Door Guidance */
.conversation-panel #transcript {
  max-height: 290px;
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0 0 12px;
}

.conversation-panel #transcript:empty { display: none; }

#transcript article {
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#transcript article strong {
  display: block;
  margin-bottom: 3px;
  font: 700 10.5px/1.2 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-text);
}

#transcript article p { margin: 0; }

/* Stripe Payment & Quote Card */
.conversation-panel #payment {
  margin: 0 0 12px;
  padding: 14px 15px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--surface-raised);
}

.conversation-panel #payment h2 {
  font-size: 16px;
  margin: 0 0 8px;
}

.quote-lines { white-space: pre-line; line-height: 1.55; }
#allowance-copy { margin: 0 0 10px; font-size: 12.5px; color: var(--ink); }
#wait-estimate:empty, #payment-status:empty { display: none; }
#wait-estimate {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  font-size: 12px;
}

.next-steps {
  margin: 10px 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.next-steps .eyebrow { margin: 0 0 4px; }
.next-steps ol { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.next-steps li { font-size: 12px; color: var(--muted); line-height: 1.45; }
.next-steps li::marker { color: var(--accent-text); font-weight: 700; }

/* Consent Card */
.consent-card {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--warn-line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface-raised);
}

.consent-card:has(#consent-row[hidden]),
#consultation[data-door="paid"] .consent-card,
#consultation[data-door="closed"] .consent-card {
  display: none;
}

.consent-card .notice { margin: 0 0 8px; font-size: 11.5px; color: var(--muted); }
.consent-card .check { font-size: 12px; font-weight: 600; }
.consent-card:has(#consent:checked) {
  padding: 9px 12px;
  border-color: var(--ok-line);
  border-left: 3px solid var(--ok);
  background: var(--surface);
}
.consent-card:has(#consent:checked) .notice { display: none; }
.consent-card:has(#consent:checked) .check { font-weight: 500; color: var(--ink); }
.consent-card.needs-consent { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent); }
.consent-card.needs-consent::after {
  content: 'Tick the box above to continue.';
  display: block;
  margin: 6px 0 0 26px;
  font-size: 11.5px;
  color: var(--accent-text);
  font-weight: 600;
}

/* Custom Quote Details */
#other-service {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 14px;
  background: var(--surface-raised);
}

#other-service > summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

#other-service[open] > summary { margin-bottom: 12px; }
#other-service #quote-request h2 { font-size: 16px; margin: 0 0 6px; }
#other-service #quote-request > p.muted { margin: 0 0 8px; }
#quote-brief { min-height: 100px; font-size: 13px; }
#quote-brief-status:empty { display: none; }
#quote-brief-status { margin: 8px 0 0; color: var(--accent-text); }

.order-timing {
  margin: 10px 0 4px;
  border-block: 1px solid var(--line);
  padding: 8px 0;
}
.order-timing summary { cursor: pointer; font: 600 11px/1.5 var(--mono); color: var(--muted); }
.order-timing[open] summary { margin-bottom: 6px; }
#other-service #quote-brief-form > button[type="submit"] { width: 100%; margin-top: 12px; }

/* Chat Composer & Voice Controls */
#turn { margin-top: 4px; }
#turn label[for="answer"] {
  font: 600 10.5px/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 6px;
}
#answer { min-height: 96px; font-size: 13px; }
#turn .actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
#turn:has(#voice[hidden]):has(#pause[hidden]) .actions,
#consultation[data-door="unpaid"] #turn .actions { grid-template-columns: 1fr; }
#send::after { content: ' →'; }
#voice-status:empty, #latency:empty { display: none; }
#voice-status, #latency { font: 500 11px/1.5 var(--mono); color: var(--muted); margin: 8px 0 0; }

.conversation-panel > p.muted:last-of-type {
  font-size: 11.5px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin: 14px 0 0;
}

.conversation-settings {
  border-top: 1px solid var(--line);
  padding: 10px 0 0;
  margin: 12px 0 0;
}

.conversation-settings summary {
  cursor: pointer;
  font: 600 10.5px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.conversation-settings[open] summary { margin-bottom: 10px; }

/* Structured $35 Part Form Inside Left Workbench */
.part-form {
  display: grid;
  gap: 12px;
  margin: 0;
}

.part-form h2 { font-size: 17px; margin: 0; }
.part-form h3 { font-size: 14.5px; margin: 4px 0 0; }

.part-form .choice-group {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.part-form .choice-group > label.check {
  align-items: center;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-raised);
  font-size: 12px;
  font-weight: 600;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.part-form .choice-group > label.check input[type="radio"] {
  margin-top: 0;
}

.part-form .choice-group > label.check:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-raised));
}

.part-form .is-off {
  opacity: 1;
  border-style: dashed;
  border-color: var(--line-strong);
  color: var(--muted);
  background: var(--bg);
  cursor: not-allowed;
}

/* Once spec sheet is displayed, demote Show my spec sheet to secondary so Pay and start leads visually */
.part-form:has(> .pf-sheet:not([hidden])) > button.primary {
  background: var(--control);
  color: var(--ink);
  border-color: var(--line-strong);
}

.part-form:has(> .pf-sheet:not([hidden])) > button.primary:hover:not(:disabled) {
  background: var(--hover);
  border-color: var(--muted);
}

.part-form .pf-part {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.part-form .pf-part > label {
  display: grid;
  gap: 5px;
  margin: 0;
}

.part-form .pf-dims {
  display: grid;
  gap: 8px;
}

.part-form .pf-dim {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 36px auto;
  gap: 6px;
  align-items: center;
}

.part-form .pf-unit {
  font: 700 11.5px/1 var(--mono);
  color: var(--muted);
  text-align: center;
}

.part-form .pf-dim button {
  min-height: 36px;
  padding: 4px 10px;
  font-size: 11.5px;
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.part-form .pf-sheet {
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-raised);
}

.part-form .pf-sheet h3 { font-size: 15px; margin: 0 0 8px; }
.part-form .pf-sheet ul { margin: 8px 0 10px; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
.part-form .pf-sheet > label.check {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  font-weight: 650;
}

/* Responsive Breakpoints */
@media (max-width: 1039px) {
  #consultation .protochat-stage.account-stage {
    grid-template-columns: minmax(0, 1fr);
  }
  .concept-panel {
    min-height: 0;
  }
  #consultation .conversation-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .workspace-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  main:has(#workspace:not([hidden])) { padding: 16px 14px 36px; }
  main:has(#workspace[data-view="project"]) { padding: 10px 10px 24px; }
  .workspace-badge { margin-left: 0; }
  .new-project-bar { flex: 1 1 100%; max-width: none; }
  .new-project-bar form { grid-template-columns: 1fr; }
  .new-project-bar button { width: 100%; }
  #workspace > .workspace-nav > .actions { width: 100%; justify-content: space-between; margin-left: 0; }
  .workspace-tool-grid { grid-template-columns: 1fr; }
  .concept-panel, #consultation .conversation-panel { padding: 12px; }
  .pc-cad-canvas-wrap { min-height: 220px; max-height: 250px; }
  .part-form .pf-dim { grid-template-columns: minmax(0, 1fr) 86px 30px; }
  .part-form .pf-dim button { grid-column: 1 / -1; justify-self: start; }
  .workspace-tabs { display: flex; flex-wrap: nowrap; width: 100%; overflow-x: auto; }
  .workspace-tabs [role="tab"] { flex: 1 0 auto; white-space: nowrap; padding: 6px 8px; font-size: 11.5px; text-align: center; justify-content: center; }
}
