/* Backyard Studio 2.0 — adaptive appearance, complexity modes, calm workflow guidance, and quality-of-life controls. */
:root {
  --bs-font-scale: 1;
  --bs-space-scale: 1;
  --bs-focus-ring: 0 0 0 3px rgba(65, 138, 104, .22);
  --bs-glow: rgba(163, 231, 89, .58);
  --bs-surface-elevated: #ffffff;
  --bs-stage-bg: #cbd2cd;
  --bs-grid-accent: rgba(33, 74, 60, .08);
  --bs-transition: 160ms ease;
  --bs-left-current: var(--left-w);
  --bs-right-current: var(--right-w);
  --bs-tool-current: var(--toolrail-w);
}

body[data-bs-font="small"] { --bs-font-scale: .90; --bs-space-scale: .94; }
body[data-bs-font="medium"] { --bs-font-scale: 1; --bs-space-scale: 1; }
body[data-bs-font="large"] { --bs-font-scale: 1.13; --bs-space-scale: 1.06; }
body[data-bs-font="xlarge"] { --bs-font-scale: 1.27; --bs-space-scale: 1.13; }

body {
  --topbar-h: calc(64px * var(--bs-space-scale));
  --toolrail-w: calc(74px * var(--bs-space-scale));
  --left-w: calc(296px * var(--bs-space-scale));
  --right-w: calc(328px * var(--bs-space-scale));
  --status-h: calc(29px * var(--bs-space-scale));
  --ds-workflow-h: calc(110px * var(--bs-space-scale));
}
body[data-bs-mode="simple"] {
  --toolrail-w: calc(66px * var(--bs-space-scale));
  --left-w: calc(264px * var(--bs-space-scale));
  --right-w: calc(292px * var(--bs-space-scale));
}
body[data-bs-left="collapsed"] { --bs-left-current: 0px; }
body[data-bs-right="collapsed"] { --bs-right-current: 0px; }
body[data-bs-focus="true"] { --bs-left-current: 0px; --bs-right-current: 0px; --bs-tool-current: 0px; }

.workspace {
  grid-template-columns: var(--bs-tool-current) var(--bs-left-current) minmax(320px, 1fr) var(--bs-right-current) !important;
  transition: grid-template-columns var(--bs-transition);
}
body[data-bs-left="collapsed"] .left-panel,
body[data-bs-right="collapsed"] .right-panel,
body[data-bs-focus="true"] :is(.left-panel, .right-panel, .toolrail) {
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
}

/* Consistent focus treatment. */
:where(button, input, select, textarea, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--bs-focus-ring) !important;
}

/* Four complete visual systems. */
body[data-bs-theme="standard"] {
  color-scheme: light;
  --bs-surface-elevated: #ffffff;
  --bs-stage-bg: #cbd2cd;
}

body[data-bs-theme="dark"] {
  color-scheme: dark;
  --ink: #e9f0ec;
  --muted: #a1aea8;
  --soft: #202925;
  --line: #39453f;
  --panel: #19211e;
  --paper: #141b18;
  --brand: #0b1512;
  --brand-2: #64a88f;
  --accent: #bfe96f;
  --accent-ink: #0b1711;
  --danger: #ef857e;
  --warning: #e3b35b;
  --success: #6dcc92;
  --shadow: 0 18px 52px rgba(0,0,0,.42);
  --ds-forest: #dcebe4;
  --ds-forest-2: #78bea4;
  --ds-lime: #c8f173;
  --ds-sand: #2b302b;
  --ds-blue: #7eb8cc;
  --ds-orange: #e39365;
  --ds-shadow-lg: 0 28px 90px rgba(0,0,0,.55);
  --ds-shadow-sm: 0 10px 30px rgba(0,0,0,.34);
  --bs-glow: rgba(190, 238, 111, .48);
  --bs-surface-elevated: #202925;
  --bs-stage-bg: #101613;
  --bs-grid-accent: rgba(206, 236, 222, .055);
}
body[data-bs-theme="dark"] html,
body[data-bs-theme="dark"] { background: #101613; }
body[data-bs-theme="dark"] :is(.toolrail, .panel-tabs, .stage-toolbar, .statusbar, .ds-workflow-bar, .ds-drawer-tabs, .ds-modal-footer) { background: #202925; }
body[data-bs-theme="dark"] :is(.panel, .ds-drawer, .ds-modal, .parcel-preview-column) { background: #19211e; }
body[data-bs-theme="dark"] :is(
  .button:not(.primary):not(.secondary):not(.danger), .mini-button, .icon-button.compact, .zoom-label,
  .search-input, .field-input, .field-select, .field-textarea,
  .ds-workflow-step, .ds-card, .ds-score, .ds-status-row, .ds-recipe-card, .ds-tier-card,
  .ds-plan-phase, .ds-purchase-summary > div, .ds-flag, .ds-version, .ds-time-contract,
  .ds-property-card, .ds-plan-card, .ds-package-section, .ds-checkout-card,
  .parcel-preview-empty, .parcel-preview-metrics > div, .parcel-attribute-list, .parcel-status,
  .parcel-preview-canvas, .export-card
) { background: #202925; color: var(--ink); border-color: var(--line); }
body[data-bs-theme="dark"] :is(.ds-modal-header, .ds-drawer-header) { background: #151d19; }
body[data-bs-theme="dark"] :is(.ds-phase-head, .ds-time-row, .ds-version-icon, .ds-next-icon, .ds-step-index) { background: #2a352f; color: var(--ink); }
body[data-bs-theme="dark"] :is(.ds-workflow-step.complete, .parcel-status.success) { background: #183025; }
body[data-bs-theme="dark"] :is(.ds-note, .parcel-privacy-note) { background: #26312c; color: #c1cec8; border-color: #3c4a43; }
body[data-bs-theme="dark"] .ds-note.warning { background: #382f1d; color: #efd69e; border-color: #5e4e2d; }
body[data-bs-theme="dark"] .ds-note.danger { background: #3b2422; color: #f0b3ae; border-color: #64403d; }
body[data-bs-theme="dark"] .ds-hero-card { color: #f4f8f5; background: linear-gradient(135deg,#172a23,#264b3e); }
body[data-bs-theme="dark"] .ds-dashboard-hero-main { background: radial-gradient(circle at 88% 18%,rgba(202,242,111,.17),transparent 28%),linear-gradient(135deg,#10241d,#245541); }
body[data-bs-theme="dark"] #designCanvas,
body[data-bs-theme="dark"] .stage { background: var(--bs-stage-bg); }
body[data-bs-theme="dark"] .panel-tab.active { color: #b8e6d2; }
body[data-bs-theme="dark"] .panel-tab.active::after { background: #8dccae; }
body[data-bs-theme="dark"] .tool-button { color: #b4c1bb; }
body[data-bs-theme="dark"] .tool-button:hover { background: #2a3530; color: #eef7f2; }
body[data-bs-theme="dark"] .tool-button.active { background: #477b68; }
body[data-bs-theme="dark"] .ds-cost-table th { background: #28322e; color: #aab7b1; }
body[data-bs-theme="dark"] .ds-cost-table td,
body[data-bs-theme="dark"] .ds-purchase-item { border-color: #303c36; }
body[data-bs-theme="dark"] .ds-cost-input { background: #141b18; color: var(--ink); border-color: #44534b; }
body[data-bs-theme="dark"] .ds-modal-backdrop { background: rgba(0,0,0,.72); }

body[data-bs-theme="minimal"] {
  color-scheme: light;
  --ink: #161616;
  --muted: #666;
  --soft: #f7f7f7;
  --line: #dedede;
  --panel: #fbfbfb;
  --paper: #fff;
  --brand: #ffffff;
  --brand-2: #111111;
  --accent: #111111;
  --accent-ink: #ffffff;
  --shadow: none;
  --radius: 2px;
  --ds-forest: #111;
  --ds-forest-2: #222;
  --ds-lime: #111;
  --ds-shadow-lg: 0 12px 40px rgba(0,0,0,.12);
  --ds-shadow-sm: none;
  --bs-glow: rgba(0,0,0,.22);
  --bs-surface-elevated: #fff;
  --bs-stage-bg: #e9e9e9;
}
body[data-bs-theme="minimal"] .topbar { background: #fff; color: #111; box-shadow: 0 1px 0 #d8d8d8; }
body[data-bs-theme="minimal"] :is(.brand span, .save-state, .scenario-control label) { color: #6b6b6b; }
body[data-bs-theme="minimal"] .brand-mark { color: #fff; background: #111; border-radius: 1px; }
body[data-bs-theme="minimal"] :is(.button.secondary, .icon-button, .scenario-control, .scenario-control .mini-button, .ds-avatar-button) { color: #111; background: #fff; border-color: #d2d2d2; }
body[data-bs-theme="minimal"] .ds-pass-button { background: #111 !important; border-color: #111 !important; color: #fff !important; }
body[data-bs-theme="minimal"] :is(.button, .mini-button, .icon-button, .chip-toggle, .zoom-label, .tool-button, .panel-tab, .ds-workflow-step, .ds-card, .ds-modal, .ds-drawer, .parcel-modal) { border-radius: 2px; box-shadow: none; }
body[data-bs-theme="minimal"] :is(.toolrail, .panel-tabs, .stage-toolbar, .statusbar, .ds-workflow-bar) { background: #fbfbfb; }
body[data-bs-theme="minimal"] .tool-button.active { background: #111; }
body[data-bs-theme="minimal"] .ds-workflow-step.active { border-color: #111; box-shadow: inset 0 0 0 1px #111; }
body[data-bs-theme="minimal"] .ds-workflow-step.active .ds-step-index { background: #111; }
body[data-bs-theme="minimal"] .ds-hero-card,
body[data-bs-theme="minimal"] .ds-dashboard-hero-main { background: #111; }
body[data-bs-theme="minimal"] #designCanvas,
body[data-bs-theme="minimal"] .stage { background: var(--bs-stage-bg); }
body[data-bs-theme="minimal"] .eyebrow { letter-spacing: .16em; }

body[data-bs-theme="architect"] {
  color-scheme: light;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ink: #181715;
  --muted: #716c64;
  --soft: #ece9e1;
  --line: #cfc8bc;
  --panel: #f5f2ea;
  --paper: #fbf8f0;
  --brand: #242321;
  --brand-2: #a44735;
  --accent: #d65c43;
  --accent-ink: #fff9f4;
  --danger: #b23d30;
  --warning: #a06c18;
  --success: #315f49;
  --shadow: 0 14px 40px rgba(32,29,24,.18);
  --radius: 1px;
  --ds-forest: #242321;
  --ds-forest-2: #a44735;
  --ds-lime: #f4c4a7;
  --ds-sand: #e7dfd0;
  --ds-blue: #465e6b;
  --ds-orange: #c5573e;
  --ds-shadow-lg: 0 28px 72px rgba(37,31,25,.28);
  --ds-shadow-sm: 0 5px 16px rgba(37,31,25,.10);
  --bs-glow: rgba(214,92,67,.45);
  --bs-surface-elevated: #fbf8f0;
  --bs-stage-bg: #bdbab2;
  --bs-grid-accent: rgba(37,35,32,.11);
}
body[data-bs-theme="architect"] :is(.button, .mini-button, .icon-button, .chip-toggle, .zoom-label, .tool-button, .panel-tab, .ds-workflow-step, .ds-card, .ds-modal, .ds-drawer, .parcel-modal, input, select, textarea) { border-radius: 1px; }
body[data-bs-theme="architect"] .brand-mark { border-radius: 0; background: #d65c43; color: #fff; }
body[data-bs-theme="architect"] :is(.brand strong, .project-name-button, h1, h2, h3, h4, .section-heading, .ds-step-copy strong) { letter-spacing: .035em; }
body[data-bs-theme="architect"] :is(.eyebrow, .panel-tab, .tool-button span, .ds-step-time, label) { text-transform: uppercase; letter-spacing: .09em; }
body[data-bs-theme="architect"] :is(.toolrail, .panel-tabs, .stage-toolbar, .statusbar, .ds-workflow-bar, .ds-drawer-tabs, .ds-modal-footer) { background: #ece8df; }
body[data-bs-theme="architect"] :is(.panel, .ds-drawer, .ds-modal, .parcel-preview-column) { background: #f5f2ea; }
body[data-bs-theme="architect"] .ds-workflow-step { background: #fbf8f0; }
body[data-bs-theme="architect"] .ds-workflow-step.active { border-color: #a44735; box-shadow: inset 0 0 0 1px #a44735; }
body[data-bs-theme="architect"] .ds-workflow-step.active .ds-step-index { background: #a44735; }
body[data-bs-theme="architect"] .tool-button.active { background: #242321; }
body[data-bs-theme="architect"] .ds-hero-card,
body[data-bs-theme="architect"] .ds-dashboard-hero-main { background: linear-gradient(135deg,#242321,#4a4540); }
body[data-bs-theme="architect"] #designCanvas,
body[data-bs-theme="architect"] .stage {
  background-color: var(--bs-stage-bg);
  background-image: linear-gradient(var(--bs-grid-accent) 1px,transparent 1px),linear-gradient(90deg,var(--bs-grid-accent) 1px,transparent 1px);
  background-size: 24px 24px;
}
body[data-bs-theme="architect"] .ds-pass-button { background: #d65c43 !important; border-color: #d65c43 !important; color: #fff !important; }

/* Complexity modes: every capability remains in the product, while the visible surface matches the user's confidence. */
body[data-bs-mode="simple"] :is(
  [data-tool="irrigation-line"], [data-tool="irrigation-head"], [data-tool="spot"], [data-tool="slope"], [data-tool="zone"],
  [data-left-tab="layers"], [data-left-tab="project"],
  #duplicateScenarioButton, #compareScenarioButton,
  .ds-drawer-tab[data-ds-tab="purchase"], .ds-drawer-tab[data-ds-tab="versions"],
  .bs-advanced-only
) { display: none !important; }
body[data-bs-mode="simple"] .tool-button { min-height: calc(47px * var(--bs-space-scale)); }
body[data-bs-mode="simple"] .ds-dashboard-hero { grid-template-columns: 1fr; }
body[data-bs-mode="simple"] .ds-time-contract { display: none; }
body[data-bs-mode="simple"] .ds-dashboard-grid { grid-template-columns: 1fr minmax(210px, 250px); }
body[data-bs-mode="simple"] .ds-side-stack .ds-plan-card:nth-child(-n+2) { display: none; }
body[data-bs-mode="simple"] .ds-property-meta span:nth-child(3) { display: none; }
body[data-bs-mode="simple"] .ds-cost-table-wrap,
body[data-bs-mode="simple"] [data-ds-action="reset-cost-book"] { display: none !important; }
body[data-bs-mode="simple"] .ds-form-grid { grid-template-columns: 1fr; }
body[data-bs-mode="simple"] .ds-goal-grid { grid-template-columns: 1fr 1fr; }
body[data-bs-mode="simple"] .ds-workflow-step .ds-step-copy small { display: none; }
body[data-bs-mode="simple"] .ds-workflow-step { grid-template-columns: 30px minmax(0,1fr); }
body[data-bs-mode="simple"] .ds-step-time { display: none; }

body[data-bs-mode="intermediate"] :is(
  [data-tool="irrigation-head"], [data-tool="spot"], [data-tool="slope"]
) { display: none !important; }
body[data-bs-mode="intermediate"] .bs-advanced-only { display: none !important; }

/* Calm workflow: hourglasses show progression without a countdown. */
.ds-workflow-bar { grid-template-columns: minmax(0,1fr) minmax(190px, auto) minmax(128px, auto); }
.ds-workflow-step { position: relative; }
.bs-hourglass-wrap { position: relative; width: 29px; height: 29px; display: grid; place-items: center; }
.bs-hourglass {
  width: 23px;
  height: 23px;
  display: block;
  color: #69776f;
  transform-origin: 50% 50%;
  transition: transform .28s ease, color .2s ease, opacity .2s ease;
}
.bs-hourglass .glass { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bs-hourglass .sand { fill: currentColor; opacity: .58; transform-origin: center; }
.ds-workflow-step.active .bs-hourglass { color: #fff; }
.ds-workflow-step.active:not(.paused) .bs-hourglass .sand-top { animation: bs-sand-drain 4.8s ease-in-out infinite; }
.ds-workflow-step.active:not(.paused) .bs-hourglass .sand-bottom { animation: bs-sand-fill 4.8s ease-in-out infinite; }
.ds-workflow-step.complete .bs-hourglass { color: #207044; opacity: .62; }
.ds-workflow-step.paused .bs-hourglass,
.ds-workflow-bar.paused .bs-hourglass { transform: rotate(90deg); }
.bs-hourglass-check { position: absolute; right: -2px; bottom: -2px; width: 13px; height: 13px; display: grid; place-items: center; border-radius: 50%; background: #2c8250; color: white; border: 2px solid var(--bs-surface-elevated); font-size: calc(7px * var(--bs-font-scale)); font-weight: 900; }
@keyframes bs-sand-drain { 0%,15% { transform: scaleY(1); opacity:.7; } 78%,100% { transform: scaleY(.18); opacity:.25; } }
@keyframes bs-sand-fill { 0%,15% { transform: scaleY(.2); opacity:.25; } 78%,100% { transform: scaleY(1); opacity:.7; } }

.bs-next-step {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 58%, var(--line));
  border-radius: 10px;
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 76%, white);
  text-align: left;
  box-shadow: 0 0 0 0 var(--bs-glow);
  animation: bs-next-glow 2.7s ease-in-out infinite;
}
.bs-next-step:hover { transform: translateY(-1px); filter: brightness(.98); }
.bs-next-step:active { transform: translateY(0); }
.bs-next-symbol { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: color-mix(in srgb, var(--accent-ink) 12%, transparent); font-weight: 900; }
.bs-next-copy { min-width: 0; }
.bs-next-copy span { display: block; font-size: calc(7.5px * var(--bs-font-scale)); text-transform: uppercase; letter-spacing: .07em; opacity: .72; font-weight: 850; }
.bs-next-copy strong { display: block; margin-top: 1px; font-size: calc(9.5px * var(--bs-font-scale)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-next-arrow { font-size: calc(16px * var(--bs-font-scale)); font-weight: 900; }
@keyframes bs-next-glow { 0%,100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); } 50% { box-shadow: 0 0 0 5px var(--bs-glow), 0 5px 16px color-mix(in srgb, var(--bs-glow) 55%, transparent); } }

.ds-session-meter { min-width: 130px; grid-template-columns: 1fr auto; column-gap: 7px; border-left: 1px solid var(--line); }
.ds-session-meter > span { grid-column: 1; }
.ds-session-meter > strong { grid-column: 1; }
.ds-session-meter .ds-progress-track { grid-column: 1 / -1; }
.bs-rhythm-pause { grid-column: 2; grid-row: 1 / 3; width: 31px; height: 31px; align-self: center; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--bs-surface-elevated); color: var(--ink); font-size: calc(15px * var(--bs-font-scale)); }
.bs-rhythm-pause:hover { border-color: var(--brand-2); }
.ds-workflow-bar.paused .ds-progress-track i { opacity: .48; }

/* Interface controls. */
.bs-preferences-button { position: relative; }
.bs-preferences-button::after { content: ""; position: absolute; right: 5px; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); border: 1px solid var(--brand); }
.bs-stage-qol { display: flex; align-items: center; gap: 5px; margin-right: 4px; }
.bs-layout-button { min-width: 30px; padding: 0 8px; }
.bs-layout-button.active { background: #e2eee8; color: var(--brand); border-color: #a9c8b9; }
body[data-bs-theme="dark"] .bs-layout-button.active { background: #294338; color: #d7f2e5; border-color: #4c7966; }
.bs-mode-pill { max-width: 130px; min-height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bs-surface-elevated); color: var(--ink); font-size: calc(8.5px * var(--bs-font-scale)); font-weight: 750; }
.bs-mode-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); }

.bs-experience-root,
.bs-command-root { position: fixed; inset: 0; z-index: 620; display: none; }
.bs-experience-root.open,
.bs-command-root.open { display: block; }
.bs-experience-backdrop,
.bs-command-backdrop { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(10,23,18,.62); backdrop-filter: blur(5px); }
.bs-experience-panel { width: min(920px, 96vw); max-height: min(830px, 94vh); overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); color: var(--ink); box-shadow: var(--ds-shadow-lg); }
.bs-experience-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); background: var(--bs-surface-elevated); }
.bs-experience-header h2 { margin: 3px 0 3px; font-size: calc(20px * var(--bs-font-scale)); }
.bs-experience-header p { margin: 0; color: var(--muted); font-size: calc(10px * var(--bs-font-scale)); line-height: 1.5; }
.bs-experience-body { overflow: auto; padding: 18px 20px 24px; }
.bs-experience-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 20px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 88%, var(--paper)); }
.bs-settings-section { margin-bottom: 21px; }
.bs-settings-section:last-child { margin-bottom: 0; }
.bs-settings-head { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin-bottom: 9px; }
.bs-settings-head h3 { margin: 0; font-size: calc(12px * var(--bs-font-scale)); }
.bs-settings-head p { margin: 0; max-width: 500px; color: var(--muted); font-size: calc(8.8px * var(--bs-font-scale)); line-height: 1.45; text-align: right; }
.bs-theme-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.bs-choice-card { position: relative; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bs-surface-elevated); text-align: left; color: var(--ink); }
.bs-choice-card:hover { border-color: var(--brand-2); }
.bs-choice-card.selected { border-color: var(--brand-2); box-shadow: inset 0 0 0 1px var(--brand-2); }
.bs-choice-card strong { display: block; font-size: calc(10px * var(--bs-font-scale)); }
.bs-choice-card small { display: block; margin-top: 3px; color: var(--muted); font-size: calc(8px * var(--bs-font-scale)); line-height: 1.35; }
.bs-theme-preview { height: 58px; margin-bottom: 9px; display: grid; grid-template-columns: 18% 1fr 24%; grid-template-rows: 15px 1fr; overflow: hidden; border: 1px solid rgba(0,0,0,.13); border-radius: 6px; }
.bs-theme-preview i { display: block; }
.bs-theme-preview i:first-child { grid-column: 1 / -1; }
.bs-theme-preview.standard i:nth-child(1) { background:#18372f; } .bs-theme-preview.standard i:nth-child(2) { background:#eef1ee; } .bs-theme-preview.standard i:nth-child(3) { background:#fff; } .bs-theme-preview.standard i:nth-child(4) { background:#f8f9f7; }
.bs-theme-preview.dark i:nth-child(1) { background:#0b1512; } .bs-theme-preview.dark i:nth-child(2) { background:#202925; } .bs-theme-preview.dark i:nth-child(3) { background:#111815; } .bs-theme-preview.dark i:nth-child(4) { background:#19211e; }
.bs-theme-preview.minimal i:nth-child(1) { background:#fff; border-bottom:1px solid #ddd; } .bs-theme-preview.minimal i:nth-child(2) { background:#fafafa; } .bs-theme-preview.minimal i:nth-child(3) { background:#fff; } .bs-theme-preview.minimal i:nth-child(4) { background:#f5f5f5; }
.bs-theme-preview.architect i:nth-child(1) { background:#242321; } .bs-theme-preview.architect i:nth-child(2) { background:#ece8df; } .bs-theme-preview.architect i:nth-child(3) { background:#bdbab2; } .bs-theme-preview.architect i:nth-child(4) { background:#f5f2ea; }
.bs-mode-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.bs-mode-features { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; color: var(--muted); font-size: calc(7.8px * var(--bs-font-scale)); }
.bs-mode-features li::before { content: "·"; margin-right: 5px; color: var(--brand-2); font-weight: 900; }
.bs-segmented { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: color-mix(in srgb, var(--panel) 86%, var(--paper)); }
.bs-segmented button { min-height: 36px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-weight: 750; }
.bs-segmented button.selected { background: var(--bs-surface-elevated); color: var(--ink); box-shadow: 0 1px 5px rgba(0,0,0,.09); }
.bs-toggle-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bs-toggle-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--bs-surface-elevated); }
.bs-toggle-row strong { display: block; font-size: calc(9.5px * var(--bs-font-scale)); }
.bs-toggle-row small { display: block; margin-top: 2px; color: var(--muted); font-size: calc(7.8px * var(--bs-font-scale)); line-height: 1.4; }
.bs-switch { width: 40px; height: 23px; position: relative; border: 0; border-radius: 99px; background: #cdd4d0; padding: 0; }
.bs-switch::after { content:""; position:absolute; width:17px; height:17px; left:3px; top:3px; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.2); transition:transform .16s ease; }
.bs-switch.on { background: var(--brand-2); }
.bs-switch.on::after { transform: translateX(17px); }
.bs-settings-note { padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--panel) 75%, var(--paper)); color: var(--muted); font-size: calc(8.5px * var(--bs-font-scale)); line-height: 1.5; }

.bs-command-panel { width: min(650px, 94vw); max-height: min(610px, 86vh); display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); box-shadow: var(--ds-shadow-lg); }
.bs-command-search { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bs-surface-elevated); }
.bs-command-search span { color: var(--muted); font-size: calc(18px * var(--bs-font-scale)); }
.bs-command-search input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: calc(14px * var(--bs-font-scale)); }
.bs-command-search kbd,
.bs-command-footer kbd { padding: 2px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--panel); color: var(--muted); font: inherit; font-size: calc(7.5px * var(--bs-font-scale)); }
.bs-command-list { min-height: 0; overflow: auto; padding: 7px; }
.bs-command-item { width: 100%; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 9px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; }
.bs-command-item:hover,
.bs-command-item.active { background: color-mix(in srgb, var(--brand-2) 11%, var(--paper)); }
.bs-command-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--bs-surface-elevated); }
.bs-command-item strong { display: block; font-size: calc(9.5px * var(--bs-font-scale)); }
.bs-command-item small { display: block; margin-top: 2px; color: var(--muted); font-size: calc(7.8px * var(--bs-font-scale)); }
.bs-command-item em { font-style: normal; color: var(--muted); font-size: calc(7.5px * var(--bs-font-scale)); }
.bs-command-empty { padding: 28px; text-align: center; color: var(--muted); font-size: calc(9.5px * var(--bs-font-scale)); }
.bs-command-footer { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line); color: var(--muted); background: color-mix(in srgb, var(--panel) 88%, var(--paper)); font-size: calc(7.8px * var(--bs-font-scale)); }

.bs-toast-root { position: fixed; z-index: 800; left: 50%; bottom: 18px; transform: translateX(-50%); display: grid; gap: 7px; pointer-events: none; }
.bs-toast { min-width: 240px; max-width: min(480px, 90vw); padding: 10px 13px; border-radius: 9px; background: #172f27; color: #fff; box-shadow: var(--ds-shadow-sm); text-align: center; font-size: calc(9px * var(--bs-font-scale)); animation: bs-toast-in .2s ease; }
@keyframes bs-toast-in { from { opacity:0; transform:translateY(6px); } }

body[data-bs-hints="off"] :is(.tool-context span, .draft-help, .estimate-disclaimer) { display: none !important; }
body[data-bs-motion="reduced"] *,
body[data-bs-motion="reduced"] *::before,
body[data-bs-motion="reduced"] *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }

@media (max-width: 1320px) {
  .ds-workflow-bar { grid-template-columns: minmax(0,1fr) minmax(160px,190px) auto; }
  .bs-next-copy span { display:none; }
}
@media (max-width: 1120px) {
  .bs-mode-pill { display:none; }
  .bs-next-step { grid-template-columns: 28px minmax(0,1fr); }
  .bs-next-arrow { display:none; }
  .ds-session-meter { display:grid; }
  .bs-theme-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 920px) {
  .ds-workflow-bar { grid-template-columns: minmax(0,1fr) auto; }
  .bs-next-step { display:none; }
  .bs-toggle-list { grid-template-columns: 1fr; }
  .bs-mode-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  body { --left-w: min(88vw, 320px); --right-w: min(88vw, 330px); }
  .bs-stage-qol { display:none; }
  .bs-experience-backdrop, .bs-command-backdrop { padding:0; }
  .bs-experience-panel { width:100vw; height:100dvh; max-height:none; border-radius:0; }
  .bs-theme-grid { grid-template-columns: 1fr 1fr; }
  .bs-segmented { grid-template-columns: 1fr 1fr; }
  .bs-settings-head { display:block; }
  .bs-settings-head p { margin-top:4px; text-align:left; }
}
.sr-only { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }

/* Theme-specific contrast corrections for active tabs and calm stage icons. */
body[data-bs-theme="minimal"] .panel-tab.active { color: #111; }
body[data-bs-theme="minimal"] .panel-tab.active::after { background: #111; }
body[data-bs-theme="minimal"] .ds-workflow-step.active:not(.complete) .bs-hourglass { color: #111; }
body[data-bs-theme="architect"] .ds-workflow-step.active:not(.complete) .bs-hourglass { color: #a44735; }

/* Large text stays operational on ordinary laptop and desktop widths. */
body[data-bs-font="large"] :is(.brand span, .save-state, .scenario-control label),
body[data-bs-font="xlarge"] :is(.brand span, .save-state, .scenario-control label) { display: none; }
body[data-bs-font="large"] .topbar,
body[data-bs-font="xlarge"] .topbar { grid-template-columns: minmax(185px,auto) minmax(140px,.6fr) auto; gap: 8px; }
body[data-bs-font="large"] .top-actions,
body[data-bs-font="xlarge"] .top-actions { gap: 4px; }
body[data-bs-font="large"] :is(.button, .mini-button),
body[data-bs-font="xlarge"] :is(.button, .mini-button) { padding-left: 9px; padding-right: 9px; }
body[data-bs-font="xlarge"] .bs-mode-pill,
body[data-bs-font="xlarge"] #helpButton { display: none; }
body[data-bs-font="xlarge"] .project-name-button { max-width: 190px; }
body[data-bs-font="xlarge"] .scenario-control select { max-width: 104px; }
body[data-bs-font="xlarge"] #dsPortfolioButton .ds-hide-narrow,
body[data-bs-font="xlarge"] #dsBriefButton .ds-hide-narrow,
body[data-bs-font="xlarge"] #dsPackageButton .ds-hide-narrow { display: none; }
body[data-bs-font="xlarge"] #dsPortfolioButton::after { content: "Sites"; }
body[data-bs-font="xlarge"] #dsBriefButton::after { content: "Brief"; }
body[data-bs-font="xlarge"] #dsPackageButton::after { content: "Package"; }
body[data-bs-font="xlarge"] #openButton { font-size: 0; }
body[data-bs-font="xlarge"] #openButton::after { content: "Open"; font-size: calc(12px * var(--bs-font-scale)); }


/* --------------------------------------------------------------------------
   2.0 calm guidance, corner settings, and explicit panel controls
   -------------------------------------------------------------------------- */
:root {
  --bs-guide-purple: #7653c7;
  --ds-workflow-h: 90px;
  --bs-guide-purple-soft: color-mix(in srgb, var(--bs-guide-purple) 18%, transparent);
}

.bs-preferences-button {
  position: fixed !important;
  right: 18px;
  bottom: 18px;
  z-index: 760;
  min-width: 142px;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 14px 9px 12px;
  border: 2px solid color-mix(in srgb, var(--brand-2) 72%, var(--ink));
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-surface-elevated) 94%, var(--brand-soft));
  color: var(--ink);
  box-shadow: 0 15px 42px rgba(18, 37, 31, .22), 0 0 0 4px color-mix(in srgb, var(--brand-2) 12%, transparent);
  font: 800 calc(13px * var(--bs-font-scale)) / 1 var(--ui-font);
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.bs-preferences-button:hover,
.bs-preferences-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 18px 48px rgba(18, 37, 31, .28), 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent);
  outline: none;
}
.bs-preferences-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  flex: 0 0 auto;
}
.bs-preferences-button span { display: inline !important; white-space: nowrap; }
.bs-preferences-button kbd {
  min-width: 28px;
  padding: 4px 5px;
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-bottom-width: 2px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--panel-2) 84%, transparent);
  color: var(--muted);
  font: 700 calc(9px * var(--bs-font-scale)) / 1 var(--ui-font);
}
.bs-preferences-button::after {
  right: 9px;
  bottom: 7px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--bs-surface-elevated);
  box-sizing: border-box;
}

/* The guide is deliberately spatial, not a countdown. */
.ds-workflow-bar {
  min-height: 90px;
  grid-template-columns: minmax(0, 1fr) minmax(245px, .72fr) minmax(275px, .72fr);
  align-items: stretch;
}
.ds-workflow-step { min-height: 72px; }
.bs-hourglass-wrap {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel-2) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  flex: 0 0 auto;
  transition: transform .28s ease, background .28s ease, box-shadow .28s ease, color .28s ease;
}
.bs-hourglass {
  width: 37px;
  height: 37px;
  transition: transform .34s ease, color .24s ease;
}
.ds-workflow-step.active:not(.paused) .bs-hourglass-wrap,
.ds-workflow-bar:not(.paused) .bs-rhythm-pause .bs-hourglass-wrap {
  color: #fff;
  background: color-mix(in srgb, var(--brand-2) 90%, #ffffff 4%);
  border-color: color-mix(in srgb, var(--brand-2) 62%, #ffffff);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand-2) 13%, transparent), 0 0 24px color-mix(in srgb, var(--brand-2) 40%, transparent);
  animation: bs-hourglass-breathe 3.8s ease-in-out infinite;
}
.ds-workflow-step.active:not(.paused) .bs-hourglass { color: #fff; }
.ds-workflow-step.complete .bs-hourglass-wrap {
  color: #207044;
  background: color-mix(in srgb, #dff2e5 86%, var(--panel));
  border-color: color-mix(in srgb, #207044 28%, var(--line));
}
.ds-workflow-step.complete .bs-hourglass { color: currentColor; opacity: .66; }
.bs-hourglass-check {
  right: -2px;
  bottom: -2px;
  width: 17px;
  height: 17px;
  font-size: calc(9px * var(--bs-font-scale));
  box-shadow: 0 0 0 2px var(--bs-surface-elevated);
}
.ds-workflow-bar.paused .bs-hourglass-wrap,
.ds-workflow-step.paused.active .bs-hourglass-wrap {
  color: #fff;
  background: var(--bs-guide-purple);
  border-color: color-mix(in srgb, var(--bs-guide-purple) 65%, #fff);
  box-shadow: 0 0 0 5px var(--bs-guide-purple-soft), 0 0 20px color-mix(in srgb, var(--bs-guide-purple) 32%, transparent);
  animation: none;
}
.ds-workflow-bar.paused .bs-hourglass,
.ds-workflow-step.paused.active .bs-hourglass {
  color: #fff;
  transform: rotate(90deg);
}

.ds-session-meter {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
  align-self: stretch;
  min-width: 0;
}
.bs-rhythm-pause {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: auto;
  min-height: 62px;
  align-self: stretch;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 7px 12px 7px 8px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 15px;
  background: color-mix(in srgb, var(--bs-surface-elevated) 94%, var(--brand-soft));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--bs-shadow-soft);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.bs-rhythm-pause:hover,
.bs-rhythm-pause:focus-visible {
  transform: translateY(-1px);
  border-color: var(--brand-2);
  box-shadow: 0 8px 22px rgba(20, 39, 33, .13);
  outline: none;
}
.bs-rhythm-hero { display: grid; place-items: center; }
.bs-rhythm-pause .bs-hourglass-wrap { width: 48px; height: 48px; }
.bs-rhythm-pause .bs-hourglass { width: 39px; height: 39px; }
.bs-rhythm-copy { min-width: 0; display: grid; gap: 2px; }
.bs-rhythm-copy > span {
  color: var(--muted);
  font-size: calc(9px * var(--bs-font-scale));
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.bs-rhythm-copy strong { color: var(--ink); font-size: calc(12px * var(--bs-font-scale)); line-height: 1.15; }
.bs-rhythm-copy small { color: var(--muted); font-size: calc(9px * var(--bs-font-scale)); line-height: 1.2; }
.ds-workflow-bar.paused .bs-rhythm-pause {
  border-color: color-mix(in srgb, var(--bs-guide-purple) 55%, var(--line));
  background: color-mix(in srgb, var(--bs-guide-purple) 10%, var(--bs-surface-elevated));
}
.ds-workflow-bar.paused .bs-rhythm-copy strong { color: var(--bs-guide-purple); }

.ds-session-meter .ds-progress-track {
  grid-column: 1;
  grid-row: 2;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--line) 48%, transparent);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08);
}
.ds-session-meter .ds-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand-2) 72%, #fff), var(--accent));
  transition: width .7s cubic-bezier(.2,.75,.2,1), background .24s ease;
}
.ds-workflow-bar:not(.paused) .ds-progress-track i {
  box-shadow: 0 0 14px color-mix(in srgb, var(--brand-2) 34%, transparent);
  animation: bs-progress-glow 3.8s ease-in-out infinite;
}
.ds-workflow-bar.paused .ds-progress-track i {
  opacity: 1;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bs-guide-purple) 72%, #fff), var(--bs-guide-purple));
  box-shadow: 0 0 10px color-mix(in srgb, var(--bs-guide-purple) 24%, transparent);
  animation: none;
}
.bs-next-step.paused {
  border-color: color-mix(in srgb, var(--bs-guide-purple) 55%, var(--line));
  background: color-mix(in srgb, var(--bs-guide-purple) 9%, var(--bs-surface-elevated));
  box-shadow: none;
}
.bs-next-step.paused .bs-next-symbol,
.bs-next-step.paused strong,
.bs-next-step.paused .bs-next-arrow { color: var(--bs-guide-purple); }

@keyframes bs-hourglass-breathe {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand-2) 13%, transparent), 0 0 18px color-mix(in srgb, var(--brand-2) 27%, transparent); }
  50% { transform: translateY(-1px) scale(1.035); box-shadow: 0 0 0 7px color-mix(in srgb, var(--brand-2) 9%, transparent), 0 0 30px color-mix(in srgb, var(--brand-2) 42%, transparent); }
}
@keyframes bs-progress-glow {
  0%, 100% { filter: saturate(.95); opacity: .83; }
  50% { filter: saturate(1.15); opacity: 1; }
}

body[data-bs-motion="reduced"] .bs-hourglass-wrap,
body[data-bs-motion="reduced"] .ds-progress-track i,
body[data-bs-motion="reduced"] .bs-preferences-button { animation: none !important; transition-duration: .01ms !important; }

body[data-bs-theme="dark"] .bs-preferences-button { box-shadow: 0 15px 42px rgba(0, 0, 0, .48), 0 0 0 4px color-mix(in srgb, var(--brand-2) 18%, transparent); }
body[data-bs-theme="minimal"] .bs-preferences-button { border-radius: 3px; box-shadow: 7px 7px 0 rgba(0,0,0,.10); }
body[data-bs-theme="architect"] .bs-preferences-button { border-radius: 2px; border-color: #a44735; box-shadow: 6px 6px 0 rgba(36,35,33,.16); text-transform: uppercase; letter-spacing: .09em; }
body[data-bs-theme="architect"] .ds-workflow-step.active:not(.paused) .bs-hourglass-wrap,
body[data-bs-theme="architect"] .ds-workflow-bar:not(.paused) .bs-rhythm-pause .bs-hourglass-wrap { background: #a44735; border-color: #d49b87; }

@media (max-width: 1180px) {
  .ds-workflow-bar { grid-template-columns: minmax(0, 1fr) minmax(220px, .65fr); }
  .ds-session-meter { display: none; }
}
@media (max-width: 860px) {
  body { --ds-workflow-h: calc(86px * var(--bs-space-scale)); }
  .bs-preferences-button { right: 12px; bottom: 12px; min-width: 52px; width: 52px; padding: 8px; }
  .bs-preferences-button span, .bs-preferences-button kbd { display: none !important; }
  .ds-workflow-bar { min-height: 72px; }
  .bs-hourglass-wrap { width: 39px; height: 39px; border-radius: 13px; }
  .bs-hourglass { width: 31px; height: 31px; }
}
