:root {
  color-scheme: light;
  --ink: #20231f;
  --muted: #676d64;
  --soft: #f6f4ee;
  --paper: #ffffff;
  --line: #d9d6cb;
  --stone: #3f4a3d;
  --stone-light: #e8ede4;
  --orange-strong: #ff7a1a;
  --sp-orange: #ff7a1a;
  --orange-text: #d85f12;
  --gold: #b8782f;
  --gold-light: #f5eadb;
  --red-strong: #d71920;
  --red: #8f3f36;
  --red-light: #f8e7e4;
  --green-strong: #18a34a;
  --blue: #385f7b;
  --blue-light: #e5eef4;
  --green: #315f3d;
  --green-light: #e5efe3;
  --shadow: 0 18px 42px rgba(31, 35, 28, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Launch polish: dark ready panel and SolidOATH Core account entry. */
body[data-theme="dark"] .progress-panel {
  background: rgba(255, 238, 219, 0.98) !important;
  border-color: #ff8a22 !important;
  color: #171612 !important;
}

body[data-theme="dark"] .progress-panel h2,
body[data-theme="dark"] .progress-panel strong,
body[data-theme="dark"] .progress-panel p,
body[data-theme="dark"] .progress-panel small,
body[data-theme="dark"] .progress-panel .handoff-list,
body[data-theme="dark"] .progress-panel .handoff-item {
  color: #171612 !important;
}

body[data-theme="dark"] .progress-panel .handoff-item {
  background: rgba(255, 213, 160, 0.76) !important;
  border-color: #ff7a1a !important;
}

body[data-theme="dark"] .progress-panel .handoff-status {
  background: #fffaf4 !important;
  border-color: #ff7a1a !important;
  color: #ad4200 !important;
}

body[data-theme="dark"] .progress-panel .panel-heading .badge {
  color: #fff !important;
}

.one-account-create {
  grid-column: 1 / -1;
  border-color: rgba(255, 120, 30, 0.42) !important;
  background: rgba(255, 120, 30, 0.1) !important;
}

.one-action-primary {
  justify-self: start;
  min-height: 38px;
  margin-top: 4px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--sp-orange);
  color: #fff;
  font: inherit;
  font-weight: 900;
}

body[data-theme="dark"] .one-account-create {
  background: rgba(255, 232, 204, 0.98) !important;
  color: #171612 !important;
}

body[data-theme="dark"] .one-account-create * {
  color: #171612 !important;
}

body[data-theme="dark"] .one-account-create .one-action-primary {
  color: #fff !important;
}

/* Absolute final shared app shell lock - 2026-06-28 */
.topbar {
  min-height: 194px !important;
  padding: 18px 28px !important;
}

.topbar-row,
.stage-strip-inner {
  width: min(1120px, calc(100% - 56px)) !important;
  margin-inline: auto !important;
}

.brand-block {
  max-width: calc(100% - 300px) !important;
}

.brand-name {
  font-size: 48px !important;
  line-height: .94 !important;
  font-weight: 700 !important;
}

.brand-start {
  color: rgba(255, 255, 255, .58) !important;
}

.brand-by,
.brand-by a {
  color: rgba(255, 255, 255, .82) !important;
  font-size: 16px !important;
}

.version-badge {
  border-radius: 999px !important;
  padding: 2px 6px !important;
  background: rgba(255, 255, 255, .14) !important;
  color: rgba(255, 255, 255, .84) !important;
  font-size: 11px !important;
}

.subhead,
body[data-theme="dark"] .subhead {
  left: max(116px, calc((100vw - 1120px) / 2 + 116px)) !important;
  right: max(160px, calc((100vw - 1120px) / 2 + 160px)) !important;
  top: 72px !important;
  bottom: auto !important;
  width: auto !important;
  max-width: 560px !important;
  transform: none !important;
  text-align: left !important;
  color: #ff781e !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere !important;
}

.top-actions {
  top: 18px !important;
  right: max(18px, calc((100vw - 1120px) / 2)) !important;
}

.header-stax {
  width: 108px !important;
  height: 108px !important;
  padding: 7px !important;
  border-radius: 9px !important;
}

.header-stax img {
  width: 64px !important;
  height: 64px !important;
}

.header-stax strong,
.header-stax em {
  color: #171612 !important;
}

.header-theme {
  left: max(18px, calc((100vw - 1120px) / 2 + 18px)) !important;
  bottom: 18px !important;
}

.theme-switcher {
  min-height: 24px !important;
  height: 24px !important;
  padding: 2px !important;
}

.theme-switcher button {
  width: 28px !important;
  height: 20px !important;
  min-height: 20px !important;
  font-size: 9px !important;
}

.stage-strip {
  top: 194px !important;
}

body[data-theme="dark"] .route-choice-row,
body[data-theme="dark"] .route-choice-row *,
body[data-theme="dark"] .route-panel,
body[data-theme="dark"] .route-panel * {
  color: #171612 !important;
}

select,
option,
input,
textarea,
body[data-theme="dark"] select,
body[data-theme="dark"] option,
body[data-theme="dark"] input,
body[data-theme="dark"] textarea {
  color: #171612 !important;
}

select,
option,
body[data-theme="dark"] select,
body[data-theme="dark"] option {
  background: #fffaf4 !important;
}

.one-card,
body[data-theme="dark"] .one-card {
  background: #fffaf4 !important;
  color: #171612 !important;
}

.one-card *,
body[data-theme="dark"] .one-card * {
  color: #171612 !important;
}

.one-kicker,
.one-grid section > span,
body[data-theme="dark"] .one-kicker,
body[data-theme="dark"] .one-grid section > span {
  color: #ad4200 !important;
}

@media (max-width: 560px) {
  .topbar {
    min-height: 178px !important;
    padding: 10px 12px 18px !important;
  }

  .topbar-row,
  .stage-strip-inner {
    width: min(430px, calc(100% - 18px)) !important;
  }

  .brand-block {
    max-width: calc(100% - 116px) !important;
  }

  .brand-name {
    font-size: 32px !important;
  }

  .brand-by,
  .brand-by a {
    font-size: 13px !important;
  }

  .subhead,
  body[data-theme="dark"] .subhead {
    left: 62px !important;
    right: 112px !important;
    top: 70px !important;
    font-size: 11px !important;
    line-height: 1.18 !important;
  }

  .top-actions {
    top: 10px !important;
    right: 12px !important;
  }

  .header-stax {
    width: 96px !important;
    height: 78px !important;
  }

  .header-stax img {
    width: 46px !important;
    height: 46px !important;
  }

  .stage-strip {
    position: sticky !important;
    top: 0 !important;
  }
}

/* True final shared app shell lock - 2026-06-28 */
.topbar {
  min-height: 194px !important;
  padding: 18px 28px !important;
}

.topbar-row,
.stage-strip-inner {
  width: min(1120px, calc(100% - 56px)) !important;
  margin-inline: auto !important;
}

.brand-block {
  max-width: calc(100% - 300px) !important;
}

.brand-name {
  font-size: 48px !important;
  line-height: .94 !important;
  font-weight: 700 !important;
}

.brand-start {
  color: rgba(255, 255, 255, .58) !important;
}

.brand-by,
.brand-by a {
  color: rgba(255, 255, 255, .82) !important;
  font-size: 16px !important;
}

.version-badge {
  border-radius: 999px !important;
  padding: 2px 6px !important;
  background: rgba(255, 255, 255, .14) !important;
  color: rgba(255, 255, 255, .84) !important;
  font-size: 11px !important;
}

.subhead,
body[data-theme="dark"] .subhead {
  left: max(116px, calc((100vw - 1120px) / 2 + 116px)) !important;
  right: max(160px, calc((100vw - 1120px) / 2 + 160px)) !important;
  top: 72px !important;
  bottom: auto !important;
  width: auto !important;
  max-width: 560px !important;
  transform: none !important;
  text-align: left !important;
  color: #ff781e !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere !important;
}

.top-actions {
  top: 18px !important;
  right: max(18px, calc((100vw - 1120px) / 2)) !important;
}

.header-stax {
  width: 108px !important;
  height: 108px !important;
  padding: 7px !important;
  border-radius: 9px !important;
}

.header-stax img {
  width: 64px !important;
  height: 64px !important;
}

.header-stax strong,
.header-stax em {
  color: #171612 !important;
}

.header-theme {
  left: max(18px, calc((100vw - 1120px) / 2 + 18px)) !important;
  bottom: 18px !important;
}

.theme-switcher {
  min-height: 24px !important;
  height: 24px !important;
  padding: 2px !important;
}

.theme-switcher button {
  width: 28px !important;
  height: 20px !important;
  min-height: 20px !important;
  font-size: 9px !important;
}

.stage-strip {
  top: 194px !important;
}

body[data-theme="dark"] .route-choice-row,
body[data-theme="dark"] .route-choice-row *,
body[data-theme="dark"] .route-panel,
body[data-theme="dark"] .route-panel * {
  color: #171612 !important;
}

select,
option,
input,
textarea,
body[data-theme="dark"] select,
body[data-theme="dark"] option,
body[data-theme="dark"] input,
body[data-theme="dark"] textarea {
  color: #171612 !important;
}

select,
option,
body[data-theme="dark"] select,
body[data-theme="dark"] option {
  background: #fffaf4 !important;
}

.one-card,
body[data-theme="dark"] .one-card {
  background: #fffaf4 !important;
  color: #171612 !important;
}

.one-card *,
body[data-theme="dark"] .one-card * {
  color: #171612 !important;
}

.one-kicker,
.one-grid section > span,
body[data-theme="dark"] .one-kicker,
body[data-theme="dark"] .one-grid section > span {
  color: #ad4200 !important;
}

@media (max-width: 560px) {
  .topbar {
    min-height: 178px !important;
    padding: 10px 12px 18px !important;
  }

  .topbar-row,
  .stage-strip-inner {
    width: min(430px, calc(100% - 18px)) !important;
  }

  .brand-block {
    max-width: calc(100% - 116px) !important;
  }

  .brand-name {
    font-size: 32px !important;
  }

  .brand-by,
  .brand-by a {
    font-size: 13px !important;
  }

  .subhead,
  body[data-theme="dark"] .subhead {
    left: 62px !important;
    right: 112px !important;
    top: 70px !important;
    font-size: 11px !important;
    line-height: 1.18 !important;
  }

  .top-actions {
    top: 10px !important;
    right: 12px !important;
  }

  .header-stax {
    width: 96px !important;
    height: 78px !important;
  }

  .header-stax img {
    width: 46px !important;
    height: 46px !important;
  }

  .stage-strip {
    position: sticky !important;
    top: 0 !important;
  }
}

/* Shared StonePath launch polish - 2026-06-28 */
.topbar {
  min-height: 194px !important;
  padding-top: 18px !important;
  padding-bottom: 18px !important;
}

.topbar-row {
  width: min(1120px, calc(100% - 56px)) !important;
  margin-inline: auto !important;
  align-items: flex-start !important;
}

.brand-block {
  max-width: calc(100% - 300px) !important;
  margin-left: 0 !important;
}

.brand-wordmark,
.brand-name,
.brand-by,
.brand-by a {
  font-family: var(--display-font, "Space Grotesk", system-ui, sans-serif) !important;
  font-weight: 700 !important;
}

.brand-name {
  font-size: 48px !important;
  line-height: .94 !important;
}

.brand-start {
  color: rgba(255, 255, 255, .58) !important;
}

.brand-by,
.brand-by a {
  color: rgba(255, 255, 255, .82) !important;
  font-size: 16px !important;
}

.version-badge {
  border-radius: 999px !important;
  padding: 2px 6px !important;
  background: rgba(255, 255, 255, .14) !important;
  color: rgba(255, 255, 255, .84) !important;
  font-size: 11px !important;
}

.subhead {
  left: max(116px, calc((100vw - 1120px) / 2 + 116px)) !important;
  right: max(160px, calc((100vw - 1120px) / 2 + 160px)) !important;
  bottom: auto !important;
  top: 72px !important;
  max-width: 560px !important;
  width: auto !important;
  transform: none !important;
  text-align: left !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

.top-actions {
  top: 18px !important;
  right: max(18px, calc((100vw - 1120px) / 2)) !important;
}

.header-stax {
  width: 108px !important;
  height: 108px !important;
  padding: 7px !important;
  border-radius: 9px !important;
}

.header-stax img {
  width: 64px !important;
  height: 64px !important;
}

.header-theme {
  left: max(18px, calc((100vw - 1120px) / 2 + 18px)) !important;
  bottom: 18px !important;
}

.theme-switcher {
  min-height: 24px !important;
  height: 24px !important;
  padding: 2px !important;
}

.theme-switcher button {
  width: 28px !important;
  height: 20px !important;
  min-height: 20px !important;
  font-size: 9px !important;
}

.stage-strip {
  top: 194px !important;
}

.stage-strip-inner {
  width: min(1120px, calc(100% - 56px)) !important;
}

body[data-theme="dark"] .route-choice-row,
body[data-theme="dark"] .route-choice-row *,
body[data-theme="dark"] .route-copy,
body[data-theme="dark"] .route-copy *,
body[data-theme="dark"] .route-panel,
body[data-theme="dark"] .route-panel p,
body[data-theme="dark"] .route-panel label {
  color: #171612 !important;
}

body[data-theme="dark"] .route-choice-row strong {
  color: #171612 !important;
}

select,
option,
input,
textarea,
body[data-theme="dark"] select,
body[data-theme="dark"] option,
body[data-theme="dark"] input,
body[data-theme="dark"] textarea {
  color: #171612 !important;
}

select,
option,
body[data-theme="dark"] select,
body[data-theme="dark"] option {
  background: #fffaf4 !important;
}

.one-card {
  color: #171612 !important;
  background: #fffaf4 !important;
}

.one-card *,
body[data-theme="dark"] .one-card *,
body[data-theme="dark"] .one-existing-projects *,
body[data-theme="dark"] .one-account-status *,
body[data-theme="dark"] .one-merge-note *,
body[data-theme="dark"] .one-note {
  color: #171612 !important;
}

.one-kicker,
.one-grid section > span {
  color: #ad4200 !important;
}

.modal-theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: max-content;
  min-height: 30px;
  padding: 3px;
  border: 1px solid rgba(31, 27, 22, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
}

.modal-theme-switcher button {
  width: 30px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #5f5968 !important;
  font-weight: 900;
  font-size: 10px;
}

.modal-theme-switcher button.active {
  background: var(--sp-orange);
  color: #fff !important;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  width: min(900px, calc(100% - 32px));
  margin: 28px auto 54px;
  color: #171612;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.app-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(31, 27, 22, .12);
  color: #6a6272;
  text-decoration: none;
}

body[data-theme="dark"] .app-footer,
body[data-theme="dark"] .app-footer b {
  color: #fffaf4 !important;
}

/* START-only AI placement: use Before You Act dead space on web/tablet; keep mobile compact. */
@media (min-width: 561px) {
  .ai-helper-bubble {
    left: max(72px, calc((100vw - 1180px) / 2 + 24px)) !important;
    right: auto !important;
    bottom: max(24px, env(safe-area-inset-bottom)) !important;
    box-sizing: border-box !important;
    width: 118px !important;
    height: 85px !important;
    min-width: 118px !important;
    min-height: 85px !important;
    max-width: 118px !important;
    max-height: 85px !important;
  }
}

@media (min-width: 1280px) {
  .ai-helper-bubble {
    left: calc((100vw - 1180px) / 2 + 24px) !important;
  }
}

@media (min-width: 561px) and (min-height: 900px) and (max-width: 1279px) {
  .ai-helper-bubble {
    bottom: max(84px, env(safe-area-inset-bottom)) !important;
  }
}

@media (min-width: 1280px) and (min-height: 900px) {
  .ai-helper-bubble {
    bottom: max(112px, env(safe-area-inset-bottom)) !important;
  }
}

@media (min-width: 561px) and (max-height: 899px) {
  .ai-helper-bubble {
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 560px) {
  .ai-helper-bubble {
    left: auto !important;
    right: max(16px, env(safe-area-inset-right)) !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
    box-sizing: border-box !important;
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;
    max-width: 54px !important;
    max-height: 54px !important;
    padding: 0 !important;
  }

  .ai-helper-bubble span {
    width: 54px !important;
    height: 54px !important;
  }

  .ai-helper-bubble b {
    display: none !important;
  }
}

/* Final StonePath product lockup override: Stone grey, Path white, app name orange italic. */
.brand-name {
  display: inline-flex !important;
  align-items: baseline !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

.brand-start {
  color: #77716b !important;
  font-style: normal !important;
}

.brand-path {
  color: #fff !important;
  font-style: normal !important;
}

.brand-app-name {
  color: #f36f21 !important;
  font-style: italic !important;
  font-weight: 800 !important;
  margin-left: .2em !important;
}

@media (max-width: 560px) {
  .brand-name {
    font-size: clamp(22px, 6.1vw, 27px) !important;
    line-height: .96 !important;
  }
}

/* StonePath product lockup: Stone grey, Path white, app name orange italic. */
.brand-name {
  align-items: baseline !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
  flex-wrap: wrap !important;
}

.brand-start {
  color: #77716b !important;
  font-style: normal !important;
}

.brand-path {
  color: #fff !important;
  font-style: normal !important;
}

.brand-app-name {
  color: #f36f21 !important;
  font-style: italic !important;
  font-weight: 800 !important;
  margin-left: .2em !important;
}

.app-pricing-strip {
  width: min(888px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(320px, 1.18fr);
  gap: 10px;
  align-items: stretch;
  margin: 18px auto 14px;
  border: 1px solid rgba(255, 120, 30, .24);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 120, 30, .10), rgba(255, 255, 255, .78));
  box-shadow: 0 16px 42px rgba(31, 24, 14, .08);
  padding: 12px;
}

.app-pricing-copy {
  display: grid;
  gap: 4px;
  align-content: center;
  min-width: 0;
}

.app-pricing-copy span,
.app-pricing-grid span {
  color: var(--sp-orange);
  font-family: var(--sp-mono);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.app-pricing-copy strong {
  color: #171612;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.16;
}

.app-pricing-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.app-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.app-pricing-grid div,
.app-pricing-grid button {
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 82px;
  border: 1px solid rgba(255, 120, 30, .22);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  color: inherit;
  font: inherit;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.app-pricing-grid button:hover,
.app-pricing-grid button:focus-visible {
  border-color: rgba(255, 120, 30, .68);
  box-shadow: 0 10px 24px rgba(255, 120, 30, .16);
  transform: translateY(-1px);
}

.app-pricing-grid b {
  color: #235f93;
  font-size: 28px;
  line-height: .95;
}

.app-pricing-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.pricing-shared-slot-pill {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  border: 1px solid rgba(255, 120, 30, .28);
  border-radius: 999px;
  background: rgba(255, 120, 30, .10);
  color: #8a3900;
  font-family: var(--sp-mono);
  font-size: 11px;
  font-weight: 950;
  line-height: 1.25;
  padding: 9px 12px;
  text-align: center;
}

.paid-mode-badge {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  border: 1px solid rgba(35, 95, 147, .24);
  border-radius: 999px;
  background: rgba(35, 95, 147, .08);
  color: #235f93;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  padding: 8px 12px;
  text-align: center;
}

.app-pricing-strip.assisted-mode .paid-mode-badge {
  border-color: rgba(39, 190, 117, .34);
  background: rgba(39, 190, 117, .10);
  color: #21724c;
}

body[data-theme="dark"] .app-pricing-strip {
  border-color: rgba(255, 136, 38, .42);
  background: linear-gradient(135deg, rgba(255, 113, 24, .12), rgba(255, 250, 243, .075));
  box-shadow: 0 0 18px rgba(255, 113, 24, .12);
}

body[data-theme="dark"] .app-pricing-copy strong {
  color: #fffaf4;
}

body[data-theme="dark"] .app-pricing-copy small {
  color: rgba(255, 250, 244, .78);
}

body[data-theme="dark"] .app-pricing-grid div,
body[data-theme="dark"] .app-pricing-grid button {
  border-color: rgba(255, 136, 38, .24);
  background: rgba(255, 255, 255, .075);
}

body[data-theme="dark"] .app-pricing-grid b {
  color: #8fc7ff;
}

body[data-theme="dark"] .pricing-shared-slot-pill {
  border-color: rgba(255, 136, 38, .50);
  background: rgba(255, 113, 24, .14);
  color: #ffd4a8;
}

body[data-theme="dark"] .paid-mode-badge {
  border-color: rgba(98, 183, 255, .36);
  background: rgba(98, 183, 255, .10);
  color: #cae8ff;
}

body[data-theme="dark"] .app-pricing-strip.assisted-mode .paid-mode-badge {
  border-color: rgba(39, 190, 117, .42);
  background: rgba(39, 190, 117, .12);
  color: #b8f2d2;
}

@media (max-width: 820px) {
  .app-pricing-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .app-pricing-strip {
    width: min(430px, calc(100% - 18px));
    margin-top: 10px;
    padding: 10px;
  }

  .app-pricing-grid {
    grid-template-columns: 1fr;
  }

  .app-pricing-grid div {
    min-height: 0;
  }

  .app-pricing-grid button {
    min-height: 0;
  }
}

/* BASE-style clickable section affordance for collapsed START boxes. */
.collapsible-section.is-collapsed:not(.check-item) {
  cursor: pointer !important;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease !important;
}

.collapsible-section.is-collapsed:not(.check-item):hover,
.collapsible-section.is-collapsed:not(.check-item):focus-within {
  border-color: rgba(255, 113, 24, .58) !important;
  background: rgba(255, 250, 243, .96) !important;
  box-shadow: 0 12px 28px rgba(31, 24, 14, .10) !important;
  transform: translateY(-1px) !important;
}

.collapsible-section.is-collapsed:not(.check-item):not(.is-step-ready):not(.finished-area) .collapse-heading-num {
  border: 1px solid rgba(255, 113, 24, .44) !important;
  background: #ff7118 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(255, 113, 24, .12) !important;
}

.collapsible-section.is-collapsed:not(.check-item):not(.is-step-ready):not(.finished-area):hover .collapse-heading-num,
.collapsible-section.is-collapsed:not(.check-item):not(.is-step-ready):not(.finished-area):focus-within .collapse-heading-num {
  border-color: #ff7118 !important;
  background: #ff7118 !important;
  color: #ffffff !important;
}

body[data-theme="dark"] .collapsible-section.is-collapsed:not(.check-item):hover,
body[data-theme="dark"] .collapsible-section.is-collapsed:not(.check-item):focus-within {
  border-color: rgba(255, 138, 42, .8) !important;
  background: rgba(255, 113, 24, .09) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .34), 0 0 0 1px rgba(255, 113, 24, .2) !important;
}

/* START AI lower-left on web/tablet; mobile keeps the shared compact dot. */
@media (min-width: 561px) {
  .ai-helper-bubble {
    left: max(20px, env(safe-area-inset-left)) !important;
    right: auto !important;
    bottom: max(20px, env(safe-area-inset-bottom)) !important;
  }
}

/* Stable scrollbar lock: stage changes should not shift the page width. */
html {
  overflow-y: scroll !important;
  scrollbar-gutter: stable;
}

/* Shared AI launcher: match Bridge's bottom-right helper button. */
.ai-helper-bubble {
  position: fixed !important;
  right: max(24px, env(safe-area-inset-right)) !important;
  bottom: max(24px, env(safe-area-inset-bottom)) !important;
  z-index: 90 !important;
  display: grid !important;
  grid-template-columns: auto !important;
  gap: 0 !important;
  align-items: center !important;
  justify-items: center !important;
  box-sizing: border-box !important;
  width: 118px !important;
  height: 85px !important;
  min-width: 118px !important;
  min-height: 85px !important;
  max-width: calc(100vw - 48px) !important;
  padding: 10px 13px !important;
  border: 1px solid rgba(255, 113, 24, .42) !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #08070f, #23140d 72%, #ff7118) !important;
  color: #ffffff !important;
  box-shadow:
    0 18px 54px rgba(31, 24, 14, .28),
    0 0 0 5px rgba(255, 113, 24, .10) !important;
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Consolas, monospace !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-align: center !important;
  cursor: pointer !important;
}

.ai-helper-bubble span {
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  height: 42px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #a93800 !important;
  color: #ffffff !important;
  font: inherit !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

.ai-helper-bubble b {
  display: block !important;
  margin-top: 3px !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  line-height: 1.08 !important;
  white-space: nowrap !important;
}

.ai-helper-bubble:hover,
.ai-helper-bubble:focus-visible {
  outline: 3px solid rgba(255, 120, 30, .28) !important;
  outline-offset: 3px !important;
}

@media (max-width: 560px) {
  .ai-helper-bubble {
    right: max(16px, env(safe-area-inset-right)) !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    padding: 0 !important;
    border: 2px solid #ff781e !important;
    background: #fffaf4 !important;
    color: #ad4200 !important;
    box-shadow:
      0 0 0 3px rgba(255, 120, 30, .18),
      0 16px 36px rgba(8, 7, 15, .22),
      0 0 26px rgba(255, 120, 30, .30) !important;
  }

  .ai-helper-bubble span {
    width: 54px !important;
    height: 54px !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: #ad4200 !important;
  }

  .ai-helper-bubble b {
    display: none !important;
  }
}

/* Dark stage rail contrast: keep the selected stage visibly orange. */
body[data-theme="dark"] .stage-tab.active,
body[data-theme="dark"] .stage-tab.active span,
body[data-theme="dark"] .stage-tab.done.active span {
  color: #ff8a2a !important;
  text-shadow: 0 0 14px rgba(255, 120, 30, .22) !important;
}

.stage-tab.active,
body[data-theme="dark"] .stage-tab.active {
  color: #944000 !important;
}

.stage-guide-panel h2,
#stage-guide-title {
  color: #7f3300 !important;
}

.progress-panel .panel-heading .badge.in-progress,
body[data-theme="dark"] .progress-panel .panel-heading .badge.in-progress,
#handoff-count.in-progress {
  background: #944000 !important;
  border-color: #944000 !important;
  color: #ffffff !important;
}

.stage-tab.active {
  color: #944000 !important;
}

.stage-guide-panel h2,
#stage-guide-title {
  color: #7f3300 !important;
}

.progress-panel .panel-heading .badge.in-progress,
body[data-theme="dark"] .progress-panel .panel-heading .badge.in-progress,
#handoff-count.in-progress {
  background: #944000 !important;
  border-color: #944000 !important;
  color: #ffffff !important;
}

/* Step-number truth lock: green only means finished/ready. */
body[data-theme="dark"] .collapsible-section:not(.is-step-ready):not(.finished-area) .collapse-heading-num,
body[data-theme="dark"] .check-item.workflow-step:not(.finished) .step-number {
  border: 1px solid rgba(255, 120, 30, .46) !important;
  background: rgba(255, 120, 30, .14) !important;
  color: #d85f12 !important;
  box-shadow: none !important;
}

body[data-theme="dark"] .check-item.workflow-step.next-step:not(.finished) .step-number {
  border-color: var(--sp-orange) !important;
  background: var(--sp-orange) !important;
  color: #fff !important;
}

body[data-theme="dark"] .collapsible-section.is-step-ready .collapse-heading-num,
body[data-theme="dark"] .collapsible-section.finished-area .collapse-heading-num,
body[data-theme="dark"] .workflow-step.finished .step-number,
body[data-theme="dark"] .check-item.finished .step-number {
  border-color: var(--green-strong) !important;
  background: var(--green-strong) !important;
  color: #fff !important;
}

/* SolidOATH Core tooltip lock: match Passage's anchored popover. */
.header-stax[data-tip]::after,
.header-stax:is(:hover, :focus-visible, .tip-open)::after {
  content: none !important;
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.header-tip-popover {
  position: fixed;
  z-index: 20000;
  display: block;
  pointer-events: none;
  padding: 10px 12px;
  border: 1px solid rgba(255, 120, 30, .78);
  border-radius: 10px;
  background: #fffdf9;
  color: #171612;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  box-shadow: 0 18px 46px rgba(8, 7, 15, .28);
}

.header-tip-popover[hidden] {
  display: none;
}

body[data-theme="dark"] .header-tip-popover {
  border-color: rgba(255, 120, 30, .9);
  background: #fff1e4;
  color: #171612;
  box-shadow:
    0 0 0 2px rgba(255, 120, 30, .26),
    0 18px 46px rgba(0, 0, 0, .62);
}

@media (max-width: 560px) {
  .topbar {
    min-height: 178px !important;
    padding: 10px 12px 18px !important;
  }

  .topbar-row {
    width: 100% !important;
  }

  .brand-block {
    max-width: calc(100% - 116px) !important;
  }

  .brand-name {
    font-size: 32px !important;
  }

  .subhead {
    left: 62px !important;
    right: 112px !important;
    top: 70px !important;
    bottom: auto !important;
    font-size: 11px !important;
    line-height: 1.18 !important;
  }

  .top-actions {
    top: 10px !important;
    right: 12px !important;
  }

  .header-stax {
    width: 96px !important;
    height: 78px !important;
  }

  .header-stax img {
    width: 46px !important;
    height: 46px !important;
  }

  .stage-strip {
    position: sticky !important;
    top: 0 !important;
  }

  .stage-strip-inner {
    width: min(430px, calc(100% - 18px)) !important;
  }
}

/* Shared tagline placement: match Bridge under-name sizing and placement. */
@media (min-width: 721px) {
  .subhead {
    top: 76px !important;
    left: 70px !important;
    right: auto !important;
    width: min(560px, calc(100% - 420px)) !important;
    max-width: 560px !important;
    transform: none !important;
    text-align: left !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
    font-weight: 950 !important;
    white-space: normal !important;
  }
}

/* Groundwork Launch-style header and stage rail. */
.brand-wordmark {
  gap: 4px 9px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}

.brand-name {
  font-size: 48px !important;
  line-height: .92 !important;
  font-weight: 800 !important;
}

.brand-start {
  color: rgba(255, 255, 255, .54) !important;
  font-weight: 800 !important;
}

.brand-path {
  font-weight: 800 !important;
}

.brand-by,
.brand-by a {
  color: rgba(255, 255, 255, .78) !important;
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}

.version-badge {
  transform: translateY(-2px) !important;
  min-height: 0 !important;
  border: .5px solid rgba(255, 255, 255, .18) !important;
  border-radius: 999px !important;
  padding: 2px 6px !important;
  background: rgba(255, 255, 255, .12) !important;
  color: rgba(255, 255, 255, .78) !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
}

.theme-switcher {
  display: inline-flex !important;
  align-items: center !important;
  gap: 1px !important;
  min-height: 34px !important;
  padding: 3px !important;
  border: .5px solid var(--line) !important;
  border-radius: 999px !important;
  background: var(--paper) !important;
}

.theme-switcher button {
  width: 28px !important;
  height: 28px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}

.theme-switcher button.active {
  background: var(--sp-orange) !important;
  color: #fff !important;
}

body[data-theme="dark"] .theme-switcher {
  background: #fffaf4 !important;
  border-color: #fff !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 112, 24, .7) !important;
}

body[data-theme="dark"] .theme-switcher button {
  color: #26211d !important;
}

body[data-theme="dark"] .theme-switcher button.active {
  background: var(--sp-orange) !important;
  color: #fff !important;
}

.stage-strip {
  position: sticky !important;
  top: 194px !important;
  z-index: 24 !important;
  width: min(1168px, calc(100% - 48px)) !important;
  margin: 0 auto !important;
  padding: 0 16px 10px !important;
  border: 1px solid rgba(31, 27, 22, .12) !important;
  border-top: 0 !important;
  border-radius: 0 0 14px 14px !important;
  background: rgba(255, 255, 255, .92) !important;
  box-shadow: 0 14px 34px rgba(31, 27, 22, .08) !important;
}

.stage-strip-inner {
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.stage-tabs {
  min-height: 56px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

.stage-tab,
body[data-theme="dark"] .stage-tab,
body[data-theme="dark"] .stage-tab:not(.active) {
  display: inline-grid !important;
  justify-items: center !important;
  align-content: center !important;
  gap: 5px !important;
  min-width: 0 !important;
  min-height: 56px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #1a1928 !important;
  padding: 15px 10px 12px !important;
  position: relative !important;
  z-index: 1 !important;
  box-shadow: none !important;
}

.stage-tab span {
  display: none !important;
}

.stage-tab {
  font-size: 13px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

.stage-tab.active {
  background: transparent !important;
  color: var(--sp-orange) !important;
  font-weight: 700 !important;
}

.stage-tab.active::after,
.stage-tab.done::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--sp-orange);
}

.start-overall-progress-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.start-overall-progress-row strong {
  color: #171612;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.readiness-track {
  height: 8px !important;
  border-radius: 999px !important;
  background: rgba(31, 27, 22, .12) !important;
  overflow: hidden !important;
}

.readiness-note {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
}

body[data-theme="dark"] .stage-strip {
  border-color: rgba(255, 255, 255, .12) !important;
  background: linear-gradient(180deg, rgba(8, 7, 15, .96), rgba(18, 15, 19, .92)) !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .28) !important;
}

body[data-theme="dark"] .stage-tab,
body[data-theme="dark"] .stage-tab:not(.active) {
  color: #f5efe7 !important;
}

body[data-theme="dark"] .stage-tab.active {
  color: var(--sp-orange) !important;
}

body[data-theme="dark"] .start-overall-progress-row strong {
  color: #fffaf4 !important;
}

body[data-theme="dark"] .readiness-track {
  background: rgba(255, 255, 255, .16) !important;
}

@media (max-width: 720px) {
  .brand-name {
    font-size: 28px !important;
  }

  .brand-by,
  .brand-by a {
    font-size: 12px !important;
  }

  .version-badge {
    font-size: 9px !important;
  }

  .stage-strip {
    top: 0 !important;
    width: min(430px, calc(100% - 18px)) !important;
    padding: 0 10px 9px !important;
  }

  .stage-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    min-height: 70px !important;
    gap: 4px !important;
  }

  .stage-tab {
    min-height: 34px !important;
    padding: 10px 4px 7px !important;
    font-size: 8.5px !important;
    line-height: 1.02 !important;
  }

  .theme-switcher {
    min-height: 30px !important;
    padding: 2px !important;
  }

  .theme-switcher button {
    width: 26px !important;
    height: 26px !important;
    font-size: 9px !important;
  }
}

/* Groundwork ONE position polish: keep the card at the far right of the header row. */
@media (min-width: 721px) {
  .topbar-row {
    position: relative !important;
  }

  .top-actions {
    right: 0 !important;
  }
}

/* Final shared header tagline lock: keep the line under the product name and wrap cleanly. */
.subhead {
  top: 76px !important;
  left: max(82px, calc((100vw - 1120px) / 2 + 82px)) !important;
  right: max(132px, calc((100vw - 1120px) / 2 + 132px)) !important;
  width: auto !important;
  max-width: 620px !important;
  text-align: left !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

@media (min-width: 721px) and (max-width: 1040px) {
  .subhead {
    top: 72px !important;
    left: max(78px, calc((100vw - 920px) / 2 + 78px)) !important;
    right: 128px !important;
    width: auto !important;
    max-width: min(520px, calc(100vw - 250px)) !important;
  }
}

@media (max-width: 720px) {
  .subhead {
    top: 68px !important;
    left: 62px !important;
    right: 112px !important;
    bottom: auto !important;
    max-width: none !important;
    max-height: none !important;
    font-size: 11.4px !important;
    line-height: 1.22 !important;
  }
}

@media (max-width: 390px) {
  .subhead {
    top: 64px !important;
    left: 56px !important;
    right: 102px !important;
    font-size: 10.8px !important;
  }
}

/* Unified StonePath Apps header + ONE treatment, matched to Bridge. */
.brand-block {
  align-items: start !important;
}

.brand-wordmark {
  align-items: baseline !important;
  min-height: auto !important;
  gap: 7px !important;
}

.brand-by,
.brand-by a {
  color: rgba(255, 250, 243, 0.9) !important;
  font-size: clamp(15px, 1.25vw, 18px) !important;
  font-weight: 850 !important;
}

.version-badge {
  transform: translateY(-1px);
}

.subhead {
  top: 72px !important;
  left: max(88px, calc((100vw - 1120px) / 2 + 88px)) !important;
  right: 188px !important;
  max-width: min(520px, calc(100vw - 300px)) !important;
  color: var(--sp-orange) !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.top-actions {
  top: 24px !important;
  right: max(18px, calc((100vw - 1120px) / 2 + 18px)) !important;
  min-width: 112px !important;
}

.header-stax {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  width: 112px !important;
  min-width: 112px !important;
  height: 112px !important;
  min-height: 112px !important;
  padding: 8px !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #2b2119 !important;
}

.header-stax img {
  width: 68px !important;
  height: 68px !important;
}

.header-stax span {
  display: grid !important;
  gap: 1px !important;
  transform: none !important;
  text-align: center !important;
}

.header-stax strong {
  color: #111 !important;
  font-size: 13px !important;
  letter-spacing: .16em !important;
  line-height: 1 !important;
}

.header-stax em {
  color: #ad4200 !important;
  font-size: 9px !important;
  font-weight: 950 !important;
  letter-spacing: .05em !important;
  text-transform: uppercase !important;
}

.one-card {
  width: min(680px, calc(100vw - 28px));
  gap: 18px !important;
}

.one-card > p {
  font-size: 15px;
  line-height: 1.42;
}

.one-grid {
  grid-template-columns: minmax(0, 1fr) minmax(210px, .75fr) !important;
}

.one-grid section {
  display: grid;
  gap: 6px;
  background: #fffaf4 !important;
}

.one-grid section > span,
.one-kicker {
  color: #a94607;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.one-grid section > p {
  margin: 0;
  color: #68606a;
  font-size: 13px;
  line-height: 1.35;
}

.one-merge-note {
  grid-column: 1 / -1;
  border-color: rgba(255, 120, 30, 0.28) !important;
  background: rgba(255, 120, 30, 0.06) !important;
}

.one-note {
  border: 1px solid #d8e3e9 !important;
  border-radius: 8px;
  padding: 12px !important;
  background: #eef3f5;
  color: #625d69;
}

.one-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.one-action-primary,
.one-action-secondary {
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 10px;
  font-weight: 900;
  cursor: pointer;
}

.one-action-primary {
  border: 0;
  background: var(--sp-orange);
  color: #fff;
}

.one-action-secondary {
  border: 1px solid var(--line);
  background: #fffaf4;
  color: #625d69;
}

.pricing-card {
  width: min(760px, 100%);
}

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

.pricing-plan-card {
  display: grid;
  position: relative;
  gap: 12px;
  border: 1px solid rgba(255, 120, 30, .26);
  border-radius: 10px;
  background: #fffaf4;
  cursor: pointer;
  padding: 14px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.pricing-plan-card:hover,
.pricing-plan-card:focus-visible {
  border-color: rgba(255, 120, 30, .74);
  box-shadow: 0 12px 28px rgba(255, 120, 30, .14);
  outline: none;
  transform: translateY(-1px);
}

.pricing-plan-card.selected {
  border-color: rgba(255, 120, 30, .82);
  box-shadow: 0 0 0 2px rgba(255, 120, 30, .16);
}

.pricing-plan-card.selected::after {
  content: "Selected";
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: .64rem;
  font-weight: 950;
  line-height: 1;
  padding: 5px 8px;
}

.pricing-plan-card span {
  color: var(--orange-strong);
  font-family: "Space Mono", monospace;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.pricing-plan-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  line-height: 1.22;
}

.pricing-phase-list {
  display: grid;
  gap: 6px;
}

.pricing-phase-list p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  border-top: 1px solid rgba(31, 27, 22, .10);
  padding-top: 6px;
  color: var(--muted);
}

.pricing-phase-list p:first-child {
  border-top: 0;
  padding-top: 0;
}

.pricing-phase-list b {
  color: var(--ink);
}

.pricing-phase-list em {
  color: #235f93;
  font-style: normal;
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1;
}

.pricing-plan-card small {
  color: var(--muted);
  line-height: 1.35;
}

.pricing-request-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
}

body[data-theme="dark"] .pricing-plan-card {
  background: rgba(255, 255, 255, .075);
  border-color: rgba(255, 136, 38, .32);
}

body[data-theme="dark"] .pricing-plan-card.selected {
  border-color: rgba(255, 136, 38, .9);
}

@media (max-width: 720px) {
  .pricing-plan-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card {
    max-height: min(86vh, 760px);
    overflow: auto;
  }
}

@media (max-width: 720px) {
  .brand-by,
  .brand-by a {
    font-size: 12px !important;
  }

  .subhead {
    top: 68px !important;
    left: 62px !important;
    right: 116px !important;
    max-width: none !important;
    font-size: 11.2px !important;
  }

  .top-actions {
    top: 10px !important;
    right: 10px !important;
    min-width: 96px !important;
  }

  .header-stax {
    width: 96px !important;
    min-width: 96px !important;
    height: 78px !important;
    min-height: 78px !important;
    padding: 6px !important;
  }

  .header-stax img {
    width: 46px !important;
    height: 46px !important;
  }

  .header-stax strong {
    font-size: 11px !important;
  }

  .header-stax em {
    font-size: 7px !important;
  }

  .one-grid,
  .one-actions {
    grid-template-columns: 1fr !important;
    flex-direction: column;
  }
}

@font-face {
  font-family: "Space Grotesk";
  src: url("assets/space-grotesk-700.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f3f1ea;
  --muted: #b7b9af;
  --soft: #171915;
  --paper: #22251f;
  --line: #3c4138;
  --stone: #b9d0b6;
  --stone-light: #303b2f;
  --orange-strong: #ff8a2a;
  --sp-orange: #ff8a2a;
  --orange-text: #ff9a3d;
  --gold: #e5bb76;
  --gold-light: #3f3424;
  --red-strong: #ff4b4b;
  --red: #e6aaa1;
  --red-light: #402b28;
  --green-strong: #3be06f;
  --blue: #a7c9dc;
  --blue-light: #273944;
  --green: #a7d0a6;
  --green-light: #273b2b;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  position: relative;
  background:
    linear-gradient(90deg, rgba(248, 246, 239, 0.62) 0%, var(--soft) 19%, var(--soft) 81%, rgba(248, 246, 239, 0.62) 100%),
    linear-gradient(180deg, rgba(248, 246, 239, 0.48) 0%, var(--soft) 58%, var(--soft) 100%),
    var(--soft);
  color: var(--ink);
  overflow-x: hidden;
}

body[data-theme="dark"] {
  background:
    linear-gradient(90deg, rgba(23, 25, 21, 0.42) 0%, var(--soft) 22%, var(--soft) 78%, rgba(23, 25, 21, 0.42) 100%),
    linear-gradient(180deg, rgba(23, 25, 21, 0.42) 0%, var(--soft) 58%, var(--soft) 100%),
    var(--soft);
}

body::before {
  display: none;
}

body[data-theme="dark"]::before {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
  min-width: 0;
}

.shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 194px;
  display: block;
  margin: -24px -24px 14px;
  padding: 14px 18px 24px;
  overflow: visible;
  border-bottom: 0.5px solid color-mix(in srgb, var(--line) 70%, transparent);
  background:
    linear-gradient(90deg, rgba(8, 7, 15, 0.92) 0%, rgba(8, 7, 15, 0.76) 42%, rgba(255, 120, 30, 0.16) 100%),
    url("assets/stonepath-hero-groundwork.png") 58% 60% / min(1180px, 74vw) auto no-repeat;
  backdrop-filter: blur(14px);
}

.topbar::before {
  display: none;
}

body[data-theme="dark"] .topbar {
  background:
    linear-gradient(90deg, rgba(8, 7, 15, 0.94) 0%, rgba(8, 7, 15, 0.82) 42%, rgba(255, 120, 30, 0.12) 100%),
    url("assets/stonepath-hero-groundwork.png") 58% 60% / min(1180px, 74vw) auto no-repeat;
  border-color: rgba(255, 255, 255, 0.12);
}

.topbar-row,
.top-actions,
.subhead,
.header-theme {
  position: relative;
  z-index: 1;
}

.topbar-row {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  display: flex;
  justify-content: normal;
  gap: 14px;
  align-items: center;
}

.brand-block {
  display: grid;
  grid-template-columns: 58px minmax(0, auto);
  align-items: start;
  column-gap: 12px;
  min-width: 0;
  max-width: calc(100% - 340px);
}

.brand-copy {
  min-width: 0;
}

.stonepath-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: var(--muted);
  text-decoration: none;
}

.stonepath-link:hover,
.stonepath-link:focus-visible {
  color: var(--ink);
}

.stonepath-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: 10px;
  background: var(--paper);
}

.stonepath-icon {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.stonepath-icon-dark {
  display: none;
}

body[data-theme="dark"] .stonepath-icon-light {
  display: none;
}

body[data-theme="dark"] .stonepath-icon-dark {
  display: block;
}

.stonepath-tooltip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  z-index: 20;
  width: max-content;
  max-width: 220px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-3px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.stonepath-link:hover .stonepath-tooltip,
.stonepath-link:focus-visible .stonepath-tooltip,
.brand-by a:hover .stonepath-tooltip,
.brand-by a:focus-visible .stonepath-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1 {
  margin-bottom: 4px;
  font-size: clamp(1.95rem, 3.25vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}

.brand-wordmark {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  min-height: 50px;
  font-weight: 850;
}

.brand-name {
  display: inline-flex;
  font-family: "Space Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-start {
  color: #6b6f72;
}

.brand-path {
  color: #f36f21;
}

.brand-by {
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  font-weight: 850;
  line-height: 1;
}

.brand-by a {
  position: relative;
  color: #8a8582;
  text-decoration: none;
}

body[data-theme="dark"] .brand-by a {
  color: rgba(243, 241, 234, 0.62);
}

.brand-by a:hover,
.brand-by a:focus-visible {
  color: var(--ink);
}

.version-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 7px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 82%, var(--stone-light));
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.subhead {
  position: absolute;
  left: 10%;
  right: max(270px, 10%);
  top: 106px;
  max-width: none;
  margin: 0;
  color: var(--sp-orange);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: clamp(14px, 1.55vw, 21px);
  line-height: 1.35;
  font-weight: 800;
  text-align: center;
}

body[data-theme="dark"] .subhead {
  color: rgba(243, 241, 234, 0.72);
}

.type-subhead {
  min-height: 1.55em;
}

.type-subhead::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  transform: translateY(0.14em);
  background: #f36f21;
  animation: cursor-blink 0.9s steps(1) infinite;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .type-subhead::after {
    animation: none;
  }
}

.top-actions {
  position: absolute;
  top: 27px;
  right: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-width: 112px;
}

.header-stax {
  position: relative;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 112px;
  min-width: 112px;
  height: 112px;
  padding: 10px;
  border: 3px solid var(--sp-orange);
  border-radius: 10px;
  background: #fff;
  color: #1d211b;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1;
  cursor: help;
  box-shadow:
    0 0 0 1px rgba(255, 120, 30, 0.18),
    0 0 18px rgba(255, 120, 30, 0.72),
    0 0 38px rgba(255, 120, 30, 0.36),
    0 14px 30px rgba(8, 7, 15, 0.18);
}

.header-stax img {
  width: 72px;
  height: 72px;
  border-radius: 0;
  object-fit: contain;
  box-shadow: none;
}

.header-stax span {
  display: inline-flex;
  align-items: center;
  flex-direction: column;
  gap: 1px;
  text-align: center;
  transform: translateY(2px);
  color: #242720;
}

.header-stax strong {
  font: inherit;
}

.header-stax em {
  color: #ad4200;
  font-size: 10px;
  font-style: normal;
  letter-spacing: .08em;
  line-height: 1;
}

.header-stax[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 108px);
  right: 0;
  z-index: 9999;
  width: min(320px, calc(100vw - 28px));
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--sp-orange) 58%, transparent);
  border-radius: 8px;
  background: #fffdf9;
  color: #171612;
  box-shadow: 0 18px 46px rgba(8, 7, 15, 0.18);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  display: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.header-stax:hover::after,
.header-stax:focus-visible::after {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

body[data-theme="dark"] .header-stax[data-tip]::after {
  border-color: color-mix(in srgb, var(--sp-orange) 80%, transparent);
  background: #17121a;
  color: #fffaf4;
}

.theme-switcher {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  min-height: 28px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  box-shadow: 0 8px 20px rgba(31, 35, 28, 0.08);
}

.header-theme {
  position: absolute;
  left: max(18px, calc(50% - 542px));
  bottom: 14px;
}

.theme-switcher button {
  width: 23px;
  height: 23px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 850;
}

.theme-switcher button.active {
  background: var(--sp-orange);
  color: #fff;
}

.theme-switcher button:focus-visible,
.header-stax:focus-visible {
  outline: 2px solid var(--sp-orange);
  outline-offset: 3px;
}

.stage-strip {
  position: sticky;
  top: 194px;
  z-index: 24;
  margin: -14px -24px 12px;
  padding: 10px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--sp-orange) 34%, transparent);
  background: color-mix(in srgb, var(--soft) 94%, transparent);
  backdrop-filter: blur(14px);
}

body[data-theme="dark"] .stage-strip {
  border-bottom-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(rgba(8, 7, 15, 0.96), rgba(18, 15, 19, 0.92));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.stage-strip-inner {
  width: min(1282px, calc(100% - 48px));
  margin: 0 auto;
}

.stage-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
}

.stage-tab {
  min-height: 48px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.stage-tab:last-child {
  border-right: 0;
}

.stage-tab span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.stage-tab.active {
  background: color-mix(in srgb, var(--sp-orange) 16%, var(--paper));
  color: var(--orange-text);
  font-weight: 700;
}

.stage-tab:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.stage-tab.done span {
  background: var(--green-strong);
  color: white;
}

.stage-tab.done span {
  font-size: 0;
}

.stage-tab.done span::before {
  content: "\2713";
  font-size: 0.82rem;
  font-weight: 900;
}

.readiness-row {
  display: none;
  grid-template-columns: minmax(150px, 0.25fr) minmax(180px, 1fr) minmax(240px, 0.8fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.readiness-row h2,
.readiness-row p {
  margin-bottom: 0;
}

.readiness-row > p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.readiness-track {
  height: 12px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.readiness-fill {
  width: 0;
  height: 100%;
  background: var(--green-strong);
  transition: width 180ms ease;
}

.dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.main-panel {
  display: grid;
  gap: 16px;
}

.stage-guide-panel {
  display: grid;
  gap: 14px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--paper) 86%, #fff3e6), var(--paper));
  padding: 18px;
}

.stage-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.stage-guide-header h2 {
  margin: 0;
  color: var(--ink);
}

.stage-guide-header .action-link {
  flex: 0 0 auto;
}

.stage-guide-intro {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--sp-orange) 42%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, #fff7ee 74%, var(--paper));
}

.stage-guide-intro strong {
  color: var(--orange-text);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stage-guide-intro p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.setup-row,
.formation-prep,
.support-row {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 16px;
}

.formation-prep {
  grid-template-columns: 1fr;
}

.prep-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.route-lock-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.route-lock-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--green-light) 45%, var(--paper));
  padding: 12px;
}

.route-lock-card.needs-route {
  border-color: rgba(255, 59, 48, 0.72);
  background: rgba(255, 235, 232, 0.88);
}

.route-lock-card span,
.route-lock-card small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.route-lock-card strong {
  display: block;
  margin: 5px 0;
  color: var(--ink);
  font-size: 1rem;
}

.prep-grid label {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper) 88%, var(--soft));
  padding: 12px;
}

.prep-grid label.finished {
  border-color: var(--green-strong);
  box-shadow: inset 3px 0 0 var(--green-strong);
}

.prep-grid label.needs-review {
  border-color: var(--sp-orange);
  background: rgba(255, 238, 219, 0.62);
  box-shadow: inset 3px 0 0 var(--sp-orange);
}

.prep-grid label.needs-review select {
  border-color: rgba(255, 120, 30, 0.78);
  background: rgba(255, 253, 249, 0.98);
}

body[data-theme="dark"] .prep-grid label.needs-review {
  border-color: var(--sp-orange);
  background: rgba(255, 238, 219, 0.94);
  box-shadow: inset 3px 0 0 var(--sp-orange);
}

body[data-theme="dark"] .prep-grid label.needs-review,
body[data-theme="dark"] .prep-grid label.needs-review .label-row,
body[data-theme="dark"] .prep-grid label.needs-review .field-note {
  color: #171612;
}

.prep-grid input,
.prep-grid select {
  margin-top: 7px;
}

.prep-grid input[readonly] {
  background: var(--soft);
  color: var(--muted);
  cursor: default;
}

.field-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.important-field-note {
  color: var(--orange-text);
  font-weight: 800;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.help-button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--stone);
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
}

.help-button:hover {
  background: var(--stone-light);
}

.inline-help {
  display: inline-grid;
  place-items: center;
  margin-left: 4px;
  vertical-align: middle;
}

.help-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 22, 18, 0.42);
}

.help-card {
  position: relative;
  width: min(620px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  padding: 22px;
}

.help-card h2 {
  margin-bottom: 12px;
}

.help-card p {
  color: var(--muted);
  line-height: 1.55;
}

.help-card p:last-child {
  margin-bottom: 0;
}

.one-card {
  display: grid;
  gap: 14px;
}

.one-kicker {
  color: var(--orange-strong);
  font-family: "Space Mono", monospace;
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.one-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.one-grid section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
  padding: 14px;
}

.one-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.one-note {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.route-steps {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.route-choice-guide {
  display: grid;
  gap: 7px;
  margin: 12px 0 6px;
}

.route-choice-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  padding: 1px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(35, 31, 26, 0.78);
  font-size: 0.92rem;
  line-height: 1.35;
}

.route-choice-row::before {
  content: "-";
  color: var(--sp-orange);
  font-weight: 950;
}

.route-choice-row strong {
  color: #171612;
  font-weight: 950;
}

.route-choice-row .help-button {
  margin-left: 0;
  align-self: center;
  opacity: 0.72;
}

.nested-route-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.note-callout {
  color: var(--orange-strong);
  font-weight: 900;
  text-shadow: 0 0 10px color-mix(in srgb, var(--orange-strong) 55%, transparent);
}

.help-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.panel,
.work-area {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.panel,
.work-area {
  padding: 18px;
}

.attention-area {
  border: 2px solid var(--orange-strong);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--orange-strong) 75%, transparent),
    0 0 26px color-mix(in srgb, var(--orange-strong) 34%, transparent),
    var(--shadow);
}

.finished-area {
  border-color: var(--green-strong);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--green-strong) 65%, transparent), var(--shadow);
}

.panel-wrap.finished-area {
  box-shadow: none;
}

.panel-wrap.finished-area > .panel {
  border-color: var(--green-strong);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--green-strong) 65%, transparent), var(--shadow);
}

.panel-heading,
.work-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.support-panel {
  min-height: 100%;
}

.support-panel .panel-heading {
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.safety-panel {
  border-color: #f04444;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 250, 247, 0.92)),
    var(--paper);
  box-shadow:
    0 0 0 1px rgba(240, 68, 68, 0.38),
    0 0 18px rgba(240, 68, 68, 0.16),
    var(--shadow);
}

.safety-panel .attention-title {
  color: #111;
  text-shadow: none;
}

.progress-panel {
  border-color: var(--green-strong);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--green-light) 34%, var(--paper)), var(--paper));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--green-strong) 48%, transparent),
    var(--shadow);
}

body[data-theme="dark"] .stage-guide-panel {
  border-color: var(--sp-orange);
  background:
    linear-gradient(135deg, rgba(66, 38, 25, 0.88), rgba(34, 37, 31, 0.94)),
    var(--paper);
}

body[data-theme="dark"] .stage-guide-header h2,
body[data-theme="dark"] .stage-guide-intro p {
  color: #fff;
}

body[data-theme="dark"] .stage-guide-intro {
  border-color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 241, 223, 0.12);
}

body[data-theme="dark"] .safety-panel {
  border-color: #fff;
  background:
    linear-gradient(180deg, rgba(74, 37, 33, 0.48), rgba(34, 37, 31, 0.94)),
    var(--paper);
  box-shadow:
    0 0 0 1px rgba(255, 75, 75, 0.48),
    0 0 20px rgba(255, 75, 75, 0.16),
    var(--shadow);
}

body[data-theme="dark"] .safety-panel .attention-title {
  color: #fff;
  border-bottom-color: var(--red-strong);
}

body[data-theme="dark"] .progress-panel {
  border-color: #fff;
  background:
    linear-gradient(180deg, rgba(39, 59, 43, 0.54), rgba(34, 37, 31, 0.94)),
    var(--paper);
}

.collapsible-section.is-collapsed > :not(.panel-heading):not(.work-header) {
  display: none;
}

.collapsible-section.is-collapsed > .panel-heading,
.collapsible-section.is-collapsed > .work-header {
  margin-bottom: 0;
}

.section-heading-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.collapsible-section > .panel-heading,
.collapsible-section > .work-header {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  margin: 0 0 16px;
  padding: 0;
  border-radius: 7px;
  cursor: pointer;
  transition: color 160ms ease;
}

.collapsible-section > .panel-heading:hover,
.collapsible-section > .panel-heading:focus-visible,
.collapsible-section > .work-header:hover,
.collapsible-section > .work-header:focus-visible {
  color: var(--sp-orange);
}

.collapse-heading-num {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,120,30,0.14);
  color: #c54b00;
  font-weight: 900;
}

.collapsible-section.is-step-ready {
  border-color: rgba(39,190,117,0.68);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--green-strong) 45%, transparent), var(--shadow);
}

.collapsible-section.finished-area .collapse-heading-num,
.collapsible-section.is-step-ready .collapse-heading-num {
  background: rgba(39,190,117,0.16);
  color: var(--green-strong);
}

.collapse-heading-main {
  min-width: 0;
}

.collapse-heading-main h2 {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.2;
}

.collapse-heading-detail {
  display: block;
  margin-top: 3px;
  color: #5b5046;
  font-size: 0.75rem;
  line-height: 1.25;
}

.collapsible-section > .panel-heading .section-heading-actions > .badge,
.collapsible-section > .work-header .section-heading-actions > .badge {
  display: none;
}

.collapsible-section > .panel-heading [role="button"],
.collapsible-section > .panel-heading button,
.collapsible-section > .panel-heading a,
.collapsible-section > .work-header [role="button"],
.collapsible-section > .work-header button,
.collapsible-section > .work-header a {
  cursor: pointer;
}

.badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  max-width: 100%;
}

.badge.ready {
  background: var(--green-light);
  color: var(--green-strong);
  border: 1px solid color-mix(in srgb, var(--green-strong) 55%, var(--green-light));
}

.badge.review {
  background: var(--gold-light);
  color: var(--gold);
}

.badge.next {
  border: 1px solid color-mix(in srgb, var(--sp-orange) 60%, var(--line));
  background: color-mix(in srgb, #fff3e6 78%, var(--paper));
  color: #b64b00;
}

.badge.later {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 82%, var(--soft));
  color: var(--muted);
}

.badge.manual {
  background: var(--blue-light);
  color: var(--blue);
}

.badge.sensitive {
  background: var(--red-light);
  color: var(--red-strong);
  border: 1px solid color-mix(in srgb, var(--red-strong) 55%, var(--red-light));
}

.attention-title {
  display: inline-block;
  color: var(--red-strong);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--red-strong);
  text-shadow: none;
}

body[data-theme="dark"] .attention-title {
  color: var(--red-strong);
  border-bottom-color: var(--red-strong);
  text-shadow: none;
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-heading label {
  margin-bottom: 0;
}

.field-heading {
  justify-content: flex-start;
  width: auto;
}

.field-heading .inline-help,
.tax-note .label-row .inline-help,
.route-detail .label-row .inline-help,
.prep-grid .label-row .help-button {
  margin-left: 0;
}

.tax-note .label-row,
.route-detail .label-row,
.prep-grid .label-row {
  justify-content: flex-start;
  width: auto;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--stone);
  cursor: pointer;
  font-weight: 800;
  padding: 4px 0;
}

.text-button:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

.field-counter {
  margin-top: -3px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper) 88%, var(--soft));
  color: var(--ink);
  padding: 11px 12px;
}

input:disabled,
select:disabled,
textarea:disabled,
button:disabled {
  cursor: not-allowed;
}

input:disabled,
textarea:disabled {
  opacity: 0.7;
}

textarea {
  resize: vertical;
}

#business-type {
  resize: none;
}

#business-type[readonly] {
  background: var(--soft);
  color: var(--muted);
  cursor: default;
}

.field-stack {
  display: grid;
  gap: 10px;
}

.helper {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.strong-helper {
  color: var(--ink);
  font-weight: 800;
}

.orange-helper {
  color: var(--orange-text);
}

.route-help {
  margin-top: 14px;
  border: 1px solid var(--orange-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--gold-light) 72%, var(--paper));
  padding: 14px;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--orange-strong) 58%, transparent),
    0 0 22px color-mix(in srgb, var(--orange-strong) 34%, transparent);
  animation: route-pulse 2.4s ease-in-out infinite;
}

@keyframes route-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--orange-strong) 55%, transparent),
      0 0 18px color-mix(in srgb, var(--orange-strong) 24%, transparent);
  }

  50% {
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--orange-strong) 70%, transparent),
      0 0 30px color-mix(in srgb, var(--orange-strong) 42%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .route-help {
    animation: none;
  }
}

.route-detail {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper) 88%, var(--soft));
  padding: 12px;
}

.route-detail.finished-area {
  border-color: var(--green-strong);
  box-shadow: inset 3px 0 0 var(--green-strong);
}

.route-detail strong {
  display: block;
  margin-bottom: 4px;
  color: var(--stone);
}

.route-detail p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.route-help-heading strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.route-help-heading p,
.route-options p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.route-options {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.route-options article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 12px;
}

.route-options h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.route-options a {
  display: inline-flex;
  margin-top: 8px;
  color: var(--stone);
  font-weight: 800;
}

.action-link {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--stone);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  text-decoration: none;
  font-weight: 800;
}

.action-link:hover {
  background: var(--stone-light);
}

.checklist,
.handoff-list,
.route-map {
  display: grid;
  gap: 10px;
}

.check-item,
.map-item {
  display: grid;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: color-mix(in srgb, var(--paper) 88%, var(--soft));
}

.check-item {
  grid-template-columns: 34px 28px 1fr auto;
}

.workflow-step {
  position: relative;
}

.workflow-step.next-step {
  border-color: color-mix(in srgb, var(--sp-orange) 68%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--sp-orange) 9%, transparent), transparent 48%),
    color-mix(in srgb, var(--paper) 88%, var(--soft));
  box-shadow: inset 4px 0 0 var(--sp-orange);
}

.step-number {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper) 70%, var(--soft));
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.workflow-step.next-step .step-number {
  background: var(--sp-orange);
  border-color: var(--sp-orange);
  color: #fff;
}

.workflow-step.finished .step-number {
  background: var(--green-strong);
  border-color: var(--green-strong);
  color: #fff;
}

.check-item.finished {
  border-color: var(--green-strong);
  box-shadow: inset 3px 0 0 var(--green-strong);
}

.check-item.auto-item {
  background: color-mix(in srgb, var(--blue-light) 35%, var(--paper));
}

.check-item input:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.map-item {
  grid-template-columns: minmax(120px, 0.24fr) 1fr;
}

.check-item input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--stone);
}

.check-item strong {
  display: block;
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}

.check-item p,
.map-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.map-item strong {
  color: var(--stone);
  overflow-wrap: anywhere;
}

.note-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.note-list li,
.handoff-item {
  border-left: 3px solid var(--gold);
  background: color-mix(in srgb, var(--paper) 88%, var(--soft));
  padding: 11px 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.note-list li {
  border-left-width: 6px;
  border-left-color: var(--red-strong);
}

.handoff-item.ready-item {
  border-left-color: var(--green-strong);
  border-color: var(--green-strong);
  color: var(--ink);
  background: color-mix(in srgb, var(--green-light) 55%, var(--paper));
  box-shadow: inset 3px 0 0 var(--green-strong);
}

.print-ready-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 2px solid var(--green-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--green-light) 58%, var(--paper));
  padding: 16px;
  box-shadow: inset 4px 0 0 var(--green-strong);
}

.print-ready-panel.completed {
  border: 3px solid var(--green-strong);
  box-shadow:
    0 0 0 2px rgba(39, 190, 117, 0.28),
    0 0 24px rgba(39, 190, 117, 0.24),
    inset 4px 0 0 var(--green-strong);
}

.print-ready-panel.locked {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold-light) 62%, var(--paper));
  box-shadow: inset 4px 0 0 var(--gold);
}

.print-ready-panel.hidden {
  display: none;
}

.print-ready-panel .print-pill.hidden {
  display: none;
}

.stage-next-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 2px solid var(--sp-orange);
  border-radius: 8px;
  background: color-mix(in srgb, #fff3e6 48%, var(--paper));
  padding: 16px;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--sp-orange) 40%, transparent),
    var(--shadow);
}

.stage-next-panel.hidden {
  display: none;
}

.stage-next-panel.finished-area {
  border-color: var(--green-strong);
  background: color-mix(in srgb, var(--green-light) 58%, var(--paper));
  box-shadow: inset 4px 0 0 var(--green-strong), var(--shadow);
}

body[data-theme="dark"] .stage-next-panel {
  border-color: var(--sp-orange);
  background:
    linear-gradient(90deg, rgba(255, 122, 26, 0.16), rgba(255, 122, 26, 0.05)),
    color-mix(in srgb, #3a2418 54%, var(--paper));
  box-shadow:
    0 0 0 1px rgba(255, 122, 26, 0.55),
    0 0 24px rgba(255, 122, 26, 0.16),
    var(--shadow);
}

body[data-theme="dark"] .stage-next-panel.finished-area {
  border-color: var(--green-strong);
  background:
    linear-gradient(90deg, rgba(24, 196, 95, 0.18), rgba(24, 196, 95, 0.05)),
    color-mix(in srgb, #21361f 54%, var(--paper));
  box-shadow:
    inset 4px 0 0 var(--green-strong),
    0 0 22px rgba(24, 196, 95, 0.16),
    var(--shadow);
}

.stage-next-panel h2 {
  margin-bottom: 4px;
}

.stage-next-panel p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.print-ready-panel h2 {
  margin-bottom: 4px;
}

.print-ready-panel p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.handoff-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: stretch;
}

.print-pill {
  width: 150px;
  min-height: 42px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--green-strong) 70%, var(--stone));
  border-radius: 999px;
  background: var(--green-strong);
  color: #fff;
  padding: 0 18px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(24, 163, 74, 0.18);
}

.handoff-link {
  text-decoration: none;
}

.passage-pill {
  border-color: color-mix(in srgb, var(--sp-orange) 78%, var(--stone));
  background: var(--sp-orange);
  box-shadow: 0 10px 20px rgba(255, 122, 26, 0.18);
}

.secondary-print-pill {
  border-color: color-mix(in srgb, var(--sp-orange) 78%, var(--line));
  background: color-mix(in srgb, #fff3e6 72%, var(--paper));
  color: var(--orange-text);
  box-shadow: none;
}

body[data-theme="dark"] .secondary-print-pill {
  border-color: #fff;
  background: #fff1df;
  color: #241915;
}

.print-pill:hover,
.print-pill:focus-visible {
  filter: brightness(0.96);
}

@media (max-width: 1040px) {
  .setup-row,
  .formation-prep,
  .support-row {
    grid-template-columns: 1fr 1fr;
  }

  .formation-prep {
    grid-template-columns: 1fr;
  }

  .prep-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body,
  body[data-theme="dark"] {
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--soft) 78%, transparent) 0%, var(--soft) 28%, var(--soft) 100%),
      var(--soft);
  }

  body::before {
    display: none;
  }

  body[data-theme="dark"]::before {
    display: none;
  }

  .shell {
    padding: 0 0 14px;
  }

  .topbar {
    position: relative;
    min-height: 136px;
    width: min(430px, calc(100% - 18px));
    margin: 10px auto 0;
    padding: 10px 10px 12px;
    border: 1px solid rgba(31, 27, 22, 0.12);
    border-radius: 14px 14px 0 0;
    background:
      linear-gradient(90deg, rgba(255, 253, 249, 0.9), rgba(255, 253, 249, 0.82)),
      url("assets/stonepath-hero-groundwork.png") 58% 60% / min(1180px, 74vw) auto no-repeat;
    box-shadow: 0 14px 34px rgba(31, 27, 22, 0.08);
  }

  body[data-theme="dark"] .topbar {
    border-color: rgba(255, 255, 255, 0.12);
    background:
      linear-gradient(90deg, rgba(17, 16, 24, 0.9), rgba(17, 16, 24, 0.78)),
      url("assets/stonepath-hero-groundwork.png") 58% 60% / min(1180px, 74vw) auto no-repeat;
  }

  .topbar-row {
    width: auto;
    margin: 0;
    gap: 10px;
    align-items: center;
  }

  .brand-block {
    grid-template-columns: 48px minmax(0, auto);
    column-gap: 8px;
    max-width: calc(100% - 96px);
  }

  .stonepath-mark {
    width: 48px;
    height: 48px;
  }

  h1 {
    font-size: 27px;
  }

  .brand-wordmark {
    display: grid;
    grid-template-columns: auto auto;
    gap: 1px 6px;
    align-items: end;
    min-height: 0;
    padding-top: 1px;
  }

  .brand-name {
    grid-column: 1 / -1;
  }

  .brand-by {
    font-size: 10.5px;
  }

  .version-badge {
    min-height: 13px;
    padding: 1px 5px;
    font-size: 9px;
  }

  .subhead {
    left: 12px;
    right: 12px;
    top: 78px;
    max-height: 32px;
    overflow: hidden;
    padding: 0;
    font-size: 10.5px;
    line-height: 1.35;
    text-align: center;
  }

  .top-actions {
    top: 0;
    right: 12px;
    gap: 5px;
    min-width: 0;
  }

  .header-stax {
    width: 74px;
    min-width: 74px;
    height: 42px;
    padding: 4px 5px 5px;
    gap: 2px;
    border-radius: 7px;
    font-size: 8px;
    letter-spacing: 0.055em;
  }

  .header-stax img {
    width: 23px;
    height: 23px;
    flex-basis: 23px;
    border-radius: 7px;
  }

  .header-stax span {
    font-size: 8px;
  }

  .header-stax[data-tip]::after {
    position: fixed;
    top: 148px;
    left: 50%;
    right: auto;
    width: min(330px, calc(100vw - 24px));
    transform: translateX(-50%) translateY(-4px);
  }

  .header-stax:hover::after,
  .header-stax:focus-visible::after {
    transform: translateX(-50%) translateY(0);
  }

  .header-theme {
    left: 12px;
    bottom: 10px;
  }

  .theme-switcher {
    min-height: 24px;
    padding: 2px;
  }

  .theme-switcher button {
    width: 19px;
    height: 19px;
    font-size: 9px;
  }

  .readiness-row,
  .dashboard {
    width: min(430px, calc(100% - 18px));
    margin-left: auto;
    margin-right: auto;
  }

  .stage-strip {
    position: sticky;
    top: 0;
    width: min(430px, calc(100% - 18px));
    margin: 0 auto 12px;
    padding: 8px 9px;
    border-width: 0 1px 1px;
    border-style: solid;
    border-color: rgba(31, 27, 22, 0.12);
    border-radius: 0 0 14px 14px;
    background: color-mix(in srgb, var(--paper) 96%, transparent);
    box-shadow: 0 14px 34px rgba(31, 27, 22, 0.08);
  }

  body[data-theme="dark"] .stage-strip {
    border-color: rgba(255, 255, 255, 0.12);
    background: #111018;
  }

  .stage-strip-inner {
    width: 100%;
  }

  .stage-tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    overflow: visible;
    background: transparent;
    margin-top: 0;
  }

  .readiness-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .stage-tab {
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--sp-orange) 65%, var(--line));
    border-radius: 8px;
    background: var(--paper);
    justify-content: flex-start;
    min-height: 42px;
    gap: 8px;
    padding: 7px 10px;
    white-space: normal;
    text-align: left;
    line-height: 1.1;
    font-size: 0.76rem;
  }

  .stage-tab span {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    font-size: 0.68rem;
  }

  .setup-row,
  .formation-prep,
  .support-row {
    grid-template-columns: 1fr;
  }

  .prep-grid {
    grid-template-columns: 1fr;
  }

  .check-item {
    grid-template-columns: 30px 24px 1fr;
    padding: 12px;
  }

  .check-item .badge {
    grid-column: 3;
    justify-self: start;
  }

  .panel,
  .work-area {
    padding: 15px;
  }

  .panel-heading,
  .work-header {
    align-items: stretch;
    display: grid;
    gap: 10px;
  }

  .collapsible-section > .panel-heading,
  .collapsible-section > .work-header {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    min-height: 54px;
    gap: 8px;
    padding: 0;
  }

  .collapse-heading-num {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    font-size: 0.75rem;
  }

  .collapse-heading-main h2 {
    font-size: 0.86rem;
  }

  .collapse-heading-detail {
    font-size: 0.69rem;
  }

}

@media (max-width: 430px) {
  .collapsible-section > .panel-heading,
  .collapsible-section > .work-header {
    grid-template-columns: 26px minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .panel-heading .badge,
  .work-header .badge,
  .work-header .action-link {
    justify-self: start;
  }

  input,
  select,
  textarea {
    font-size: 16px;
    min-height: 46px;
  }

  .map-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .print-ready-panel {
    display: grid;
  }

  .stage-next-panel {
    display: grid;
  }

  .stage-next-panel.hidden {
    display: none;
  }

  .handoff-actions {
    width: 100%;
  }

  .print-pill {
    width: 100%;
  }

}

@media (max-width: 480px) {
  .stonepath-tooltip {
    display: none;
  }

  .topbar {
    min-height: 142px;
    padding: 8px 10px 12px;
  }

  .topbar-row {
    gap: 10px;
  }

  .brand-block {
    grid-template-columns: 42px minmax(0, auto);
    column-gap: 8px;
    max-width: calc(100% - 96px);
  }

  .stonepath-mark {
    width: 42px;
    height: 42px;
    border-radius: 8px;
  }

  .brand-wordmark {
    grid-template-columns: auto auto;
    gap: 1px 6px;
  }

  .top-actions {
    top: 0;
    right: 8px;
    align-items: flex-start;
  }

  .header-stax {
    width: 62px;
    min-width: 62px;
    height: 60px;
    padding: 4px 5px 5px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }

  .header-stax img {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
    border-radius: 8px;
  }

  .header-stax span {
    display: inline;
    max-width: none;
    font-size: 8.5px;
    line-height: 1;
    white-space: normal;
    text-align: center;
  }

  .theme-switcher {
    min-height: 21px;
    padding: 1px;
    opacity: 0.96;
  }

  .header-theme {
    left: 10px;
    bottom: 10px;
  }

  .theme-switcher button {
    width: 17px;
    height: 17px;
    font-size: 8px;
  }
}

@media print {
  @page {
    margin: 0.55in;
  }

  body {
    background: #fff;
    color: #111;
  }

  .topbar,
  .stage-tabs,
  .readiness-row,
  .setup-row,
  .formation-prep,
  .work-area,
  .print-ready-panel,
  .support-row {
    display: none !important;
  }

  .shell {
    width: 100%;
    padding: 0;
  }

  .dashboard,
  .main-panel {
    display: block;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

}

@media (max-width: 390px) {
  .shell {
    padding: 0 0 10px;
  }

  h1 {
    font-size: 27px;
  }

  .check-item {
    grid-template-columns: 28px 22px 1fr;
    gap: 10px;
  }
}

/* Passage-style Groundwork pass: keep the old logic, simplify the surface. */
.stage-strip {
  border-bottom: 1px solid color-mix(in srgb, var(--sp-orange) 55%, transparent);
}

.stage-tab {
  border: 2px solid var(--sp-orange);
  border-radius: 8px;
  background: color-mix(in srgb, #fff3e6 72%, var(--paper));
}

.stage-tabs {
  gap: 18px;
  border: 0;
  overflow: visible;
  background: transparent;
}

.stage-tabs > .stage-tab {
  border-left: 2px solid var(--sp-orange);
  border-right: 2px solid var(--sp-orange);
}

.stage-tab.active {
  background: var(--sp-orange);
  border-color: var(--sp-orange);
  color: #fff;
}

.stage-tab.done span {
  background: var(--green-strong);
  border-color: var(--green-strong);
  color: #fff;
}

.collapsible-section {
  overflow: hidden;
}

.collapsible-section > .panel-heading,
.collapsible-section > .work-header {
  min-height: 58px;
  padding: 10px 12px;
  margin: 0 0 12px;
  border: 0;
  background: transparent;
}

.collapsible-section.is-collapsed > .panel-heading,
.collapsible-section.is-collapsed > .work-header {
  margin-bottom: 0;
}

.collapsible-section.is-step-ready > .panel-heading,
.collapsible-section.is-step-ready > .work-header {
  border-color: transparent;
  background: transparent;
}

.collapse-heading-num {
  border-radius: 7px;
}

.collapse-heading-main h2,
.check-item strong {
  color: var(--ink);
}

.collapse-heading-detail,
.check-item p,
.map-item p {
  color: #5b5046;
}

.check-item {
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  min-height: 64px;
}

.check-item input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.check-item .step-number {
  grid-column: 1;
}

.check-item > div {
  grid-column: 2;
}

.check-item > .badge {
  grid-column: 3;
}

.workflow-step.next-step {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--sp-orange) 11%, transparent), transparent 58%),
    color-mix(in srgb, var(--paper) 92%, var(--soft));
}

.workflow-step.finished {
  background: color-mix(in srgb, var(--green-light) 32%, var(--paper));
}

.badge.review {
  border: 1px solid color-mix(in srgb, var(--sp-orange) 45%, var(--line));
  background: color-mix(in srgb, #fff3e6 72%, var(--paper));
  color: #b64b00;
}

.badge.next {
  border: 1px solid color-mix(in srgb, var(--sp-orange) 62%, var(--line));
  background: color-mix(in srgb, #fff3e6 78%, var(--paper));
  color: #b64b00;
}

.badge.later {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 82%, var(--soft));
  color: var(--muted);
}

body[data-theme="dark"] .badge.next {
  border-color: var(--sp-orange);
  background: #fff1df;
  color: #9c3c00;
}

body[data-theme="dark"] .badge.later {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 241, 223, 0.8);
  color: #392313;
}

body[data-theme="dark"] .stage-tab,
body[data-theme="dark"] .check-item {
  background: color-mix(in srgb, #3a2418 42%, var(--paper));
  border-color: color-mix(in srgb, var(--sp-orange) 70%, var(--line));
}

body[data-theme="dark"] .stage-tab:not(.active) {
  background: #fff1df;
  border-color: #fff;
  color: #241915;
}

body[data-theme="dark"] .stage-tab:not(.active) span {
  background: #18c45f;
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(24, 196, 95, 0.45), 0 0 12px rgba(24, 196, 95, 0.34);
}

body[data-theme="dark"] .stage-tab.active span,
body[data-theme="dark"] .collapse-heading-num,
body[data-theme="dark"] .step-number {
  background: #18c45f;
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(24, 196, 95, 0.45), 0 0 12px rgba(24, 196, 95, 0.34);
}

body[data-theme="dark"] .collapsible-section {
  border-color: #fff;
}

body[data-theme="dark"] .check-item {
  border-color: #fff;
}

body[data-theme="dark"] .stage-tab.active {
  background: var(--sp-orange);
  color: #101010;
}

body[data-theme="dark"] .workflow-step.finished {
  background: color-mix(in srgb, #21361f 44%, var(--paper));
  border-color: color-mix(in srgb, var(--green-strong) 64%, var(--line));
}

/* StonePath shared app language, matched to the finalized Passage prototype. */
body {
  background: #f4ece3;
}

body[data-theme="dark"] {
  background:
    radial-gradient(circle at 82% 16%, rgba(255, 120, 30, 0.13), transparent 30%),
    linear-gradient(180deg, #120f14 0%, #19130f 46%, #0b0a10 100%);
}

.shell {
  width: 100%;
  max-width: none;
  padding: 24px;
}

.stage-strip {
  margin-left: -24px;
  margin-right: -24px;
  margin-bottom: 0;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 120, 30, 0.34);
  background: color-mix(in srgb, #f4ece3 94%, transparent);
}

.stage-strip-inner,
.dashboard,
.readiness-row {
  width: min(1180px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

.stage-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.stage-tab {
  flex: 1 1 0;
  max-width: 180px;
  min-width: 145px;
  min-height: 48px;
  padding: 8px 12px;
  border: 2px solid #ff9d00;
  border-radius: 9px;
  background: #fff1e4;
  color: #1a1928;
  font-weight: 900;
  white-space: normal;
}

.stage-tab:last-child {
  border-right: 2px solid #ff9d00;
}

.stage-tab span,
.stage-tab.done span,
.stage-tab.active span,
.stage-tab.done.active span {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(26, 25, 40, 0.18);
  border-radius: 999px;
  background: transparent;
  color: rgba(26, 25, 40, 0.48);
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.stage-tab.done span {
  background: var(--green-strong);
  border-color: var(--green-strong);
  color: #fff;
}

.stage-tab.done span::before {
  content: none;
}

.stage-tab.active {
  background: var(--sp-orange);
  border-color: #ff9d00;
  color: #fff;
  font-weight: 900;
}

.stage-tab.active span {
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
}

.stage-tab.done.active span {
  background: var(--green-strong);
  border-color: var(--green-strong);
  color: #fff;
}

.dashboard {
  gap: 18px;
  padding-top: 28px;
}

.setup-row {
  grid-template-columns: 1fr;
  gap: 10px;
}

.panel,
.stage-guide-panel,
.print-ready-panel,
.stage-next-panel {
  border: 1px solid rgba(255, 120, 30, 0.42);
  border-radius: 12px;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: none;
}

.stage-guide-panel {
  padding: 16px;
  background: rgba(255, 120, 30, 0.06);
}

.stage-guide-header h2 {
  color: #171612;
  font-size: 1.15rem;
}

.stage-guide-intro,
.map-item,
.route-detail,
.tax-note,
.strong-helper.orange-helper {
  border: 1px solid rgba(255, 120, 30, 0.42);
  border-radius: 10px;
  background: rgba(255, 120, 30, 0.07);
}

.map-item {
  grid-template-columns: minmax(180px, 0.28fr) 1fr;
  padding: 12px 13px;
}

.map-item strong,
.stage-guide-intro strong,
.eyebrow {
  color: #ad4200;
}

.map-item p,
.stage-guide-intro p {
  color: rgba(35, 31, 26, 0.7);
}

.work-area {
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.collapsible-section > .panel-heading,
.collapsible-section > .work-header {
  min-height: 62px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255, 120, 30, 0.42);
  border-radius: 12px;
  background: rgba(255, 253, 249, 0.9);
}

.collapsible-section:not(.is-collapsed) {
  border: 1px solid rgba(255, 120, 30, 0.42);
  border-radius: 12px;
  background: rgba(255, 253, 249, 0.9);
}

.collapsible-section.is-collapsed {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.collapsible-section:not(.is-collapsed) > .panel-heading,
.collapsible-section:not(.is-collapsed) > .work-header {
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.collapse-heading-num,
.step-number {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 120, 30, 0.14);
  color: #c54b00;
  font-size: 0.82rem;
  font-weight: 900;
}

.collapsible-section.is-step-ready .collapse-heading-num,
.workflow-step.finished .step-number,
.check-item.finished .step-number {
  background: var(--green-strong);
  color: #fff;
}

.collapse-heading-main h2,
.check-item strong {
  color: #171612;
  font-size: 15px;
  line-height: 1.2;
}

.collapse-heading-detail,
.check-item p {
  color: #5b5046;
  font-size: 12px;
  line-height: 1.25;
}

.checklist {
  gap: 10px;
}

.check-item {
  min-height: 62px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(255, 120, 30, 0.42);
  border-radius: 12px;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: none;
}

.check-item > div {
  grid-column: 2;
}

.check-item > .badge {
  grid-column: 3;
}

.workflow-step.next-step,
.workflow-step.finished {
  box-shadow: none;
}

.workflow-step.finished,
.check-item.finished {
  border-color: rgba(39, 190, 117, 0.68);
  background: rgba(255, 253, 249, 0.96);
}

.badge {
  border: 1px solid rgba(255, 120, 30, 0.35);
  border-radius: 999px;
  background: rgba(255, 120, 30, 0.08);
  color: #ad4200;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.badge.ready,
.check-item.finished .badge {
  border-color: rgba(39, 190, 117, 0.55);
  background: rgba(39, 190, 117, 0.12);
  color: var(--green-strong);
}

input,
select,
textarea {
  border: 1px solid rgba(31, 27, 22, 0.14);
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.82);
  color: #171612;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--sp-orange);
  box-shadow: 0 0 0 3px rgba(255, 120, 30, 0.16);
}

.safety-panel,
.progress-panel {
  background: rgba(255, 253, 249, 0.9);
  box-shadow: none;
}

.safety-panel {
  border: 2px solid #ff3b30;
  box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.1), 0 0 18px rgba(255, 59, 48, 0.16);
}

.progress-panel {
  border-color: rgba(39, 190, 117, 0.62);
}

.support-panel .panel-heading {
  border-bottom-color: rgba(31, 27, 22, 0.08);
}

.note-list li,
.handoff-item {
  border-left-width: 4px;
  border-radius: 0;
  background: rgba(255, 253, 249, 0.72);
  color: rgba(35, 31, 26, 0.72);
}

.note-list li {
  border-left-color: var(--red-strong);
}

.handoff-item.ready-item {
  border-left-color: var(--green-strong);
  background: rgba(39, 190, 117, 0.08);
}

body[data-theme="dark"] .stage-strip {
  border-bottom-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(8, 7, 15, 0.96), rgba(18, 15, 19, 0.92));
}

body[data-theme="dark"] .stage-tab,
body[data-theme="dark"] .stage-tab:not(.active) {
  border-color: #ff781e;
  background: #fff1e4;
  color: #171612;
}

body[data-theme="dark"] .stage-tab.active {
  background: var(--sp-orange);
  color: #fff;
}

body[data-theme="dark"] .stage-tab span,
body[data-theme="dark"] .stage-tab:not(.active) span,
body[data-theme="dark"] .stage-tab.active span,
body[data-theme="dark"] .stage-tab.done span {
  border-color: var(--green-strong);
  background: var(--green-strong);
  color: #fff;
}

body[data-theme="dark"] .panel,
body[data-theme="dark"] .stage-guide-panel,
body[data-theme="dark"] .print-ready-panel,
body[data-theme="dark"] .stage-next-panel {
  border-color: rgba(255, 120, 30, 0.36);
  background: rgba(15, 13, 20, 0.92);
  color: #fffaf4;
}

body[data-theme="dark"] h1,
body[data-theme="dark"] .stage-guide-header h2,
body[data-theme="dark"] .work-header h2,
body[data-theme="dark"] .panel-heading h2,
body[data-theme="dark"] .attention-title {
  color: var(--sp-orange);
}

body[data-theme="dark"] .stage-guide-panel {
  background: rgba(255, 120, 30, 0.13);
}

body[data-theme="dark"] .stage-guide-intro,
body[data-theme="dark"] .map-item,
body[data-theme="dark"] .route-detail,
body[data-theme="dark"] .tax-note,
body[data-theme="dark"] .strong-helper.orange-helper {
  border-color: rgba(255, 138, 31, 0.82);
  background: rgba(255, 120, 30, 0.13);
  color: #fffaf4;
}

body[data-theme="dark"] .map-item p,
body[data-theme="dark"] .stage-guide-intro p,
body[data-theme="dark"] .helper,
body[data-theme="dark"] label,
body[data-theme="dark"] .note-list li,
body[data-theme="dark"] .handoff-item {
  color: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .collapsible-section:not(.is-collapsed),
body[data-theme="dark"] .collapsible-section > .panel-heading,
body[data-theme="dark"] .collapsible-section > .work-header,
body[data-theme="dark"] .check-item {
  border-color: #ff781e;
  background: #fff1e4;
  color: #171612;
}

body[data-theme="dark"] .collapsible-section.is-collapsed {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-theme="dark"] .collapse-heading-main h2,
body[data-theme="dark"] .check-item strong {
  color: #171612;
}

body[data-theme="dark"] .collapse-heading-detail,
body[data-theme="dark"] .check-item p {
  color: rgba(35, 31, 26, 0.66);
}

body[data-theme="dark"] .collapse-heading-num,
body[data-theme="dark"] .step-number,
body[data-theme="dark"] .workflow-step.finished .step-number,
body[data-theme="dark"] .check-item.finished .step-number {
  border: 1px solid var(--green-strong);
  background: var(--green-strong);
  color: #fff;
  box-shadow: none;
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
  border-color: rgba(31, 27, 22, 0.16);
  background: rgba(255, 253, 249, 0.94);
  color: #171612;
}

body[data-theme="dark"] .safety-panel {
  border-color: #ff3b30;
  background: rgba(15, 13, 20, 0.92);
}

body[data-theme="dark"] .progress-panel {
  border-color: rgba(39, 190, 117, 0.72);
  background: rgba(15, 13, 20, 0.92);
}

body[data-theme="dark"] .note-list li,
body[data-theme="dark"] .handoff-item {
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 1040px) {
  .stage-tabs {
    flex-wrap: wrap;
  }

  .stage-tab {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 10px;
  }

  .stage-strip {
    margin-left: -10px;
    margin-right: -10px;
  }

  .stage-strip-inner,
  .dashboard,
  .readiness-row {
    width: min(430px, calc(100% - 18px));
  }

  .stage-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .stage-tab {
    min-width: 0;
    min-height: 42px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .setup-row,
  .support-row {
    grid-template-columns: 1fr;
  }

  .map-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .stage-guide-panel {
    padding: 14px;
  }

  .stage-guide-header {
    display: grid;
    gap: 10px;
  }

  .stage-guide-header .action-link {
    width: 100%;
    min-height: 40px;
  }

  .stage-guide-intro,
  .map-item {
    grid-template-columns: 1fr;
  }

  .readiness-row {
    display: none;
  }

  .stage-tabs {
    background: transparent;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .stage-tab {
    min-height: 42px;
    border-radius: 8px;
  }

  .setup-row,
  .formation-prep,
  .support-row {
    grid-template-columns: 1fr;
  }

  .collapsible-section > .panel-heading,
  .collapsible-section > .work-header {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    min-height: 54px;
    padding: 9px 10px;
  }

  .collapsible-section > .panel-heading .section-heading-actions,
  .collapsible-section > .work-header .section-heading-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .collapsible-section > .panel-heading .section-heading-actions > button,
  .collapsible-section > .panel-heading .section-heading-actions > .action-link,
  .collapsible-section > .work-header .section-heading-actions > button,
  .collapsible-section > .work-header .section-heading-actions > .action-link {
    flex: 1 1 150px;
    justify-content: center;
    text-align: center;
  }

  .collapse-heading-detail {
    font-size: 0.72rem;
  }

  .check-item {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 9px;
  }

  .check-item > .badge {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .stage-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .stage-tab {
    min-width: 0;
    min-height: 42px;
    padding: 7px 8px;
    border-radius: 9px;
    font-size: 12px;
  }
}

/* Final intent-color corrections. Keep this at the end so notes, cautions, and progress stay distinct. */
.stage-guide-intro strong {
  color: #ff781e;
  font-weight: 950;
}

.route-map {
  gap: 9px;
}

.guide-point {
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.guide-point > p {
  margin: 0;
}

.point-chip {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 120, 30, 0.16);
  color: #c54b00;
  font-size: 0.82rem;
  font-weight: 950;
}

.primary-guide-point .point-chip {
  background: var(--sp-orange);
  color: #fff;
}

.primary-guide-point p {
  color: #171612;
  font-weight: 700;
}

.stage-next-panel:not(.finished-area) {
  border: 3px solid #ff781e;
  box-shadow:
    0 0 0 1px rgba(255, 120, 30, 0.38),
    0 0 22px rgba(255, 120, 30, 0.18);
}

.progress-panel {
  border: 3px solid #ad4200;
  box-shadow: 0 0 0 1px rgba(173, 66, 0, 0.18);
}

.safety-panel {
  border-width: 3px;
}

.handoff-item {
  border-left-color: #ad4200;
}

.handoff-item.ready-item {
  border-left-color: var(--green-strong);
  box-shadow: inset 3px 0 0 var(--green-strong);
}

body[data-theme="dark"] .stage-guide-intro strong {
  color: #ff781e;
}

body[data-theme="dark"] .point-chip {
  background: var(--green-strong);
  color: #fff;
}

body[data-theme="dark"] .primary-guide-point .point-chip {
  background: var(--sp-orange);
  color: #fff;
}

body[data-theme="dark"] .primary-guide-point p {
  color: #fffaf4;
}

body[data-theme="dark"] .stage-next-panel:not(.finished-area) {
  border-color: #ff781e;
  box-shadow:
    0 0 0 1px rgba(255, 120, 30, 0.62),
    0 0 26px rgba(255, 120, 30, 0.2);
}

body[data-theme="dark"] .progress-panel {
  border: 3px solid #ad4200;
  box-shadow: 0 0 0 1px rgba(255, 120, 30, 0.2);
}

body[data-theme="dark"] .safety-panel {
  border-width: 3px;
}

body[data-theme="dark"] .handoff-item {
  border-left-color: #ad4200;
}

body[data-theme="dark"] .handoff-item.ready-item {
  border-left-color: var(--green-strong);
  box-shadow: inset 3px 0 0 var(--green-strong);
}

/* Last-word mobile polish: these rules intentionally sit at the end. */
.stage-tab.done:not(.active),
body[data-theme="dark"] .stage-tab.done:not(.active) {
  border-color: var(--green-strong) !important;
  background: rgba(232, 255, 241, 0.96) !important;
  color: #171612 !important;
}

.route-lock-card.needs-route,
body[data-theme="dark"] .route-lock-card.needs-route,
.route-lock-card.needs-route span,
.route-lock-card.needs-route small,
.route-lock-card.needs-route strong,
body[data-theme="dark"] .route-lock-card.needs-route span,
body[data-theme="dark"] .route-lock-card.needs-route small,
body[data-theme="dark"] .route-lock-card.needs-route strong {
  background-color: rgba(255, 235, 232, 0.98) !important;
  color: #171612 !important;
}

.route-lock-card.needs-route,
body[data-theme="dark"] .route-lock-card.needs-route {
  border-color: #ff3b30 !important;
}

.check-item.workflow-step:not(.auto-item) input[type="checkbox"],
body[data-theme="dark"] .check-item.workflow-step:not(.auto-item) input[type="checkbox"] {
  width: 24px !important;
  height: 24px !important;
  inline-size: 24px !important;
  block-size: 24px !important;
  margin: 0 !important;
  border: 2px solid var(--sp-orange) !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background-color: #fff !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 15px 15px !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.check-item.workflow-step:not(.auto-item) input[type="checkbox"]:checked,
body[data-theme="dark"] .check-item.workflow-step:not(.auto-item) input[type="checkbox"]:checked {
  border-color: var(--green-strong) !important;
  background-color: var(--green-strong) !important;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 9.2 7.2 12.4 14 5.6' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

@media (max-width: 720px) {
  .route-choice-row {
    gap: 8px !important;
    padding: 1px 0 !important;
    font-size: 0.84rem !important;
    line-height: 1.24 !important;
  }

  .route-choice-row strong {
    font-size: 0.85rem !important;
  }

  .route-choice-row .help-button {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
  }

  body[data-theme="dark"] .prep-grid label,
  body[data-theme="dark"] .snapshot-panel {
    border-color: rgba(255, 120, 30, 0.48) !important;
    background: rgba(255, 238, 219, 0.96) !important;
    color: #171612 !important;
  }

  body[data-theme="dark"] .prep-grid label.finished {
    border-color: var(--green-strong) !important;
    background: rgba(232, 255, 241, 0.96) !important;
  }

  body[data-theme="dark"] .prep-grid label.needs-review {
    border-color: var(--sp-orange) !important;
    background: rgba(255, 238, 219, 0.96) !important;
  }

  body[data-theme="dark"] .prep-grid label .label-row,
  body[data-theme="dark"] .prep-grid label strong,
  body[data-theme="dark"] .prep-grid label .field-note,
  body[data-theme="dark"] .snapshot-panel label,
  body[data-theme="dark"] .snapshot-panel .helper,
  body[data-theme="dark"] .snapshot-panel .field-counter {
    color: #171612 !important;
  }

  body[data-theme="dark"] .prep-grid input,
  body[data-theme="dark"] .prep-grid select,
  body[data-theme="dark"] .snapshot-panel input,
  body[data-theme="dark"] .snapshot-panel select,
  body[data-theme="dark"] .snapshot-panel textarea,
  body[data-theme="dark"] #business-type,
  body[data-theme="dark"] #business-type[readonly],
  body[data-theme="dark"] #business-type:not(:placeholder-shown),
  body[data-theme="dark"] #business-type[readonly]:not(:placeholder-shown) {
    border-color: rgba(255, 120, 30, 0.45) !important;
    background: rgba(255, 253, 249, 0.98) !important;
    color: #171612 !important;
  }

  .check-item.workflow-step,
  body[data-theme="dark"] .check-item.workflow-step {
    grid-template-columns: 30px minmax(0, 1fr) auto !important;
    column-gap: 12px !important;
  }
}

@media (max-width: 430px) {
  .check-item.workflow-step,
  body[data-theme="dark"] .check-item.workflow-step {
    grid-template-columns: 30px minmax(0, 1fr) !important;
  }

  .check-item.workflow-step > .badge {
    grid-column: 2 !important;
    justify-self: start !important;
    margin-top: 6px !important;
  }
}

/* Groundwork mobile walkthrough polish: keep the phone flow readable and action-first. */
@media (max-width: 720px) {
  .app-tagline,
  .subhead,
  body[data-theme="dark"] .app-tagline,
  body[data-theme="dark"] .subhead {
    color: var(--sp-orange) !important;
  }

  .route-panel .helper,
  .snapshot-panel .helper,
  .snapshot-panel label,
  .snapshot-panel .field-counter,
  body[data-theme="dark"] .route-panel .helper,
  body[data-theme="dark"] .snapshot-panel .helper,
  body[data-theme="dark"] .snapshot-panel label,
  body[data-theme="dark"] .snapshot-panel .field-counter {
    color: #171612 !important;
  }

  .route-choice-row {
    align-items: baseline !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
  }

  .route-choice-row span {
    min-width: 0 !important;
    font-size: 0.82rem !important;
  }

  .route-choice-row .help-button,
  .field-heading .help-button,
  .prep-grid .label-row .help-button,
  .check-item.workflow-step .has-inline-help .inline-help {
    position: static !important;
    transform: none !important;
    justify-self: start !important;
    flex: 0 0 24px !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
  }

  .field-heading,
  .prep-grid .label-row,
  .check-item.workflow-step .has-inline-help .label-row {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    max-width: 100% !important;
    gap: 7px !important;
  }

  .route-lock-card.needs-route,
  body[data-theme="dark"] .route-lock-card.needs-route {
    background: rgba(255, 235, 232, 0.98) !important;
    border: 2px solid #ff3b30 !important;
    color: #171612 !important;
  }

  .route-lock-card.needs-route *,
  body[data-theme="dark"] .route-lock-card.needs-route * {
    color: #171612 !important;
  }

  .route-lock-card.finished-area,
  body[data-theme="dark"] .route-lock-card.finished-area {
    background: rgba(232, 255, 241, 0.96) !important;
    border: 2px solid var(--green-strong) !important;
    color: #171612 !important;
  }

  .route-lock-card.finished-area *,
  body[data-theme="dark"] .route-lock-card.finished-area * {
    color: #171612 !important;
  }

  .strong-helper.orange-helper {
    padding: 14px 16px !important;
    line-height: 1.45 !important;
  }

  .check-item.workflow-step,
  body[data-theme="dark"] .check-item.workflow-step {
    grid-template-columns: 36px minmax(0, 1fr) max-content !important;
    column-gap: 12px !important;
    row-gap: 6px !important;
    padding: 15px 16px !important;
  }

  .check-item.workflow-step:not(.auto-item) input[type="checkbox"],
  body[data-theme="dark"] .check-item.workflow-step:not(.auto-item) input[type="checkbox"] {
    width: 24px !important;
    height: 24px !important;
    inline-size: 24px !important;
    block-size: 24px !important;
    justify-self: center !important;
    align-self: center !important;
    border: 2px solid var(--sp-orange) !important;
    border-radius: 0 !important;
    background-color: #fff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
  }

  .check-item.workflow-step:not(.auto-item) input[type="checkbox"]:checked,
  body[data-theme="dark"] .check-item.workflow-step:not(.auto-item) input[type="checkbox"]:checked {
    border-color: var(--green-strong) !important;
    background-color: var(--green-strong) !important;
  }

  body[data-theme="dark"] .prep-grid label,
  body[data-theme="dark"] .snapshot-panel,
  body[data-theme="dark"] .checklist-panel,
  body[data-theme="dark"] .collapsible-section:not(.is-collapsed):not(.check-item) {
    background: rgba(255, 238, 219, 0.96) !important;
    color: #171612 !important;
  }

  body[data-theme="dark"] .prep-grid label strong,
  body[data-theme="dark"] .prep-grid label .field-note,
  body[data-theme="dark"] .prep-grid label .label-row,
  body[data-theme="dark"] .check-item.workflow-step strong,
  body[data-theme="dark"] .check-item.workflow-step p {
    color: #171612 !important;
  }
}

@media (max-width: 430px) {
  .stage-tab {
    min-height: 44px !important;
    padding: 8px 10px !important;
  }

  .stage-tab span {
    min-width: 24px !important;
    width: 24px !important;
    height: 24px !important;
    font-size: 0.78rem !important;
  }

  .check-item.workflow-step,
  body[data-theme="dark"] .check-item.workflow-step {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    padding: 16px !important;
  }

  .check-item.workflow-step > .badge {
    grid-column: 2 !important;
    justify-self: start !important;
    margin-top: 4px !important;
  }

  .check-item.workflow-step:not(.auto-item) input[type="checkbox"],
  body[data-theme="dark"] .check-item.workflow-step:not(.auto-item) input[type="checkbox"] {
    justify-self: center !important;
  }
}

/* Reliable visible check targets for guided mobile rows. */
.check-item.workflow-step {
  cursor: pointer;
}

.check-item.workflow-step input[type="checkbox"] {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.check-visual {
  grid-column: 1;
  justify-self: center;
  align-self: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--sp-orange);
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 120, 30, 0.12);
}

.check-visual.checked {
  border-color: var(--green-strong);
  background: var(--green-strong);
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 9.2 7.2 12.4 14 5.6' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

.check-item.workflow-step > .check-visual + div {
  grid-column: 2;
}

@media (max-width: 430px) {
  .check-visual {
    width: 24px !important;
    height: 24px !important;
  }
}

@media (max-width: 720px) {
  .subhead,
  body[data-theme="dark"] .subhead {
    color: var(--sp-orange) !important;
  }

  .stonepath-link .stonepath-tooltip {
    display: block !important;
    left: 0 !important;
    top: calc(100% + 6px) !important;
    z-index: 80 !important;
    border: 2px solid var(--sp-orange) !important;
    background: rgba(255, 253, 249, 0.98) !important;
    color: #171612 !important;
    box-shadow: 0 10px 24px rgba(20, 12, 6, 0.22) !important;
    transform: translateY(-3px) !important;
  }

  .stonepath-link:hover .stonepath-tooltip,
  .stonepath-link:focus-visible .stonepath-tooltip,
  .stonepath-link:active .stonepath-tooltip {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}

/* Final mobile readability lock: keep the compact guided UI clear in dark mode. */
.stage-tab.done:not(.active) {
  border-color: var(--green-strong) !important;
  background: rgba(232, 255, 241, 0.96) !important;
  color: #171612 !important;
}

body[data-theme="dark"] .stage-tab.done:not(.active) {
  border-color: var(--green-strong) !important;
  background: rgba(232, 255, 241, 0.96) !important;
  color: #171612 !important;
}

.route-lock-card.needs-route,
body[data-theme="dark"] .route-lock-card.needs-route {
  border-color: #ff3b30 !important;
  background: rgba(255, 235, 232, 0.98) !important;
  color: #171612 !important;
}

.route-lock-card.needs-route span,
.route-lock-card.needs-route small,
.route-lock-card.needs-route strong,
body[data-theme="dark"] .route-lock-card.needs-route span,
body[data-theme="dark"] .route-lock-card.needs-route small,
body[data-theme="dark"] .route-lock-card.needs-route strong {
  color: #171612 !important;
}

.check-item.workflow-step:not(.auto-item) input[type="checkbox"],
body[data-theme="dark"] .check-item.workflow-step:not(.auto-item) input[type="checkbox"] {
  position: static !important;
  inline-size: 24px !important;
  block-size: 24px !important;
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  border: 2px solid var(--sp-orange) !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background-color: #fff !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 15px 15px !important;
  box-shadow: none !important;
  opacity: 1 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.check-item.workflow-step:not(.auto-item) input[type="checkbox"]:checked,
body[data-theme="dark"] .check-item.workflow-step:not(.auto-item) input[type="checkbox"]:checked {
  border-color: var(--green-strong) !important;
  background-color: var(--green-strong) !important;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 9.2 7.2 12.4 14 5.6' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

@media (max-width: 720px) {
  .route-choice-row {
    gap: 8px !important;
    padding: 1px 0 !important;
    font-size: 0.84rem !important;
    line-height: 1.24 !important;
  }

  .route-choice-row strong {
    font-size: 0.85rem !important;
  }

  .route-choice-row .help-button {
    inline-size: 22px !important;
    block-size: 22px !important;
    min-inline-size: 22px !important;
  }

  body[data-theme="dark"] .prep-grid label,
  body[data-theme="dark"] .snapshot-panel {
    border-color: rgba(255, 120, 30, 0.48) !important;
    background: rgba(255, 238, 219, 0.96) !important;
    color: #171612 !important;
  }

  body[data-theme="dark"] .prep-grid label.finished {
    border-color: var(--green-strong) !important;
    background: rgba(232, 255, 241, 0.96) !important;
  }

  body[data-theme="dark"] .prep-grid label.needs-review {
    border-color: var(--sp-orange) !important;
    background: rgba(255, 238, 219, 0.96) !important;
  }

  body[data-theme="dark"] .prep-grid label .label-row,
  body[data-theme="dark"] .prep-grid label strong,
  body[data-theme="dark"] .prep-grid label .field-note,
  body[data-theme="dark"] .snapshot-panel label,
  body[data-theme="dark"] .snapshot-panel .helper,
  body[data-theme="dark"] .snapshot-panel .field-counter {
    color: #171612 !important;
  }

  body[data-theme="dark"] .prep-grid input,
  body[data-theme="dark"] .prep-grid select,
  body[data-theme="dark"] .snapshot-panel input,
  body[data-theme="dark"] .snapshot-panel select,
  body[data-theme="dark"] .snapshot-panel textarea,
  body[data-theme="dark"] #business-type,
  body[data-theme="dark"] #business-type[readonly],
  body[data-theme="dark"] #business-type:not(:placeholder-shown),
  body[data-theme="dark"] #business-type[readonly]:not(:placeholder-shown) {
    border-color: rgba(255, 120, 30, 0.45) !important;
    background: rgba(255, 253, 249, 0.98) !important;
    color: #171612 !important;
  }

  .check-item.workflow-step,
  body[data-theme="dark"] .check-item.workflow-step {
    grid-template-columns: 30px minmax(0, 1fr) auto !important;
    column-gap: 12px !important;
  }

  .check-item.workflow-step > .badge {
    align-self: center !important;
  }
}

@media (max-width: 430px) {
  .check-item.workflow-step,
  body[data-theme="dark"] .check-item.workflow-step {
    grid-template-columns: 30px minmax(0, 1fr) !important;
  }

  .check-item.workflow-step > .badge {
    grid-column: 2 !important;
    justify-self: start !important;
    margin-top: 6px !important;
  }
}

/* Mobile polish pass: keep dark mobile readable and make checkoffs feel intentional. */
.stage-tab.done:not(.active) {
  border-color: var(--green-strong);
  background: rgba(232, 255, 241, 0.96);
  color: #171612;
}

body[data-theme="dark"] .stage-tab.done:not(.active) {
  border-color: var(--green-strong);
  background: rgba(232, 255, 241, 0.96);
  color: #171612;
}

.route-lock-card.needs-route {
  border-color: #ff3b30;
  background: rgba(255, 235, 232, 0.98);
  color: #171612;
}

.route-lock-card.needs-route span,
.route-lock-card.needs-route small,
.route-lock-card.needs-route strong,
body[data-theme="dark"] .route-lock-card.needs-route span,
body[data-theme="dark"] .route-lock-card.needs-route small,
body[data-theme="dark"] .route-lock-card.needs-route strong {
  color: #171612;
}

body[data-theme="dark"] .route-lock-card.needs-route {
  border-color: #ff3b30;
  background: rgba(255, 235, 232, 0.98);
}

.check-item.workflow-step:not(.auto-item) input[type="checkbox"] {
  position: static !important;
  inline-size: 24px !important;
  block-size: 24px !important;
  width: 24px !important;
  height: 24px !important;
  margin: 0;
  border: 2px solid var(--sp-orange);
  border-radius: 0;
  outline: 0;
  background-color: #fff !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 15px 15px;
  box-shadow: none;
  opacity: 1 !important;
  appearance: none;
  -webkit-appearance: none;
}

.check-item.workflow-step:not(.auto-item) input[type="checkbox"]:checked {
  border-color: var(--green-strong);
  background-color: var(--green-strong) !important;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 9.2 7.2 12.4 14 5.6' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

body[data-theme="dark"] .check-item.workflow-step:not(.auto-item) input[type="checkbox"] {
  border-color: var(--sp-orange);
  background-color: #fff !important;
}

body[data-theme="dark"] .check-item.workflow-step:not(.auto-item) input[type="checkbox"]:checked {
  border-color: var(--green-strong);
  background-color: var(--green-strong) !important;
}

@media (max-width: 720px) {
  .route-choice-row {
    gap: 8px;
    padding: 1px 0;
    font-size: 0.84rem;
    line-height: 1.24;
  }

  .route-choice-row strong {
    font-size: 0.85rem;
  }

  .route-choice-row .help-button {
    inline-size: 22px;
    block-size: 22px;
    min-inline-size: 22px;
  }

  body[data-theme="dark"] .prep-grid label,
  body[data-theme="dark"] .snapshot-panel {
    border-color: rgba(255, 120, 30, 0.48);
    background: rgba(255, 238, 219, 0.96) !important;
    color: #171612;
  }

  body[data-theme="dark"] .prep-grid label.finished {
    border-color: var(--green-strong);
    background: rgba(232, 255, 241, 0.96) !important;
  }

  body[data-theme="dark"] .prep-grid label.needs-review {
    border-color: var(--sp-orange);
    background: rgba(255, 238, 219, 0.96) !important;
  }

  body[data-theme="dark"] .prep-grid label .label-row,
  body[data-theme="dark"] .prep-grid label strong,
  body[data-theme="dark"] .prep-grid label .field-note,
  body[data-theme="dark"] .snapshot-panel label,
  body[data-theme="dark"] .snapshot-panel .helper,
  body[data-theme="dark"] .snapshot-panel .field-counter {
    color: #171612 !important;
  }

  body[data-theme="dark"] .prep-grid input,
  body[data-theme="dark"] .prep-grid select,
  body[data-theme="dark"] .snapshot-panel input,
  body[data-theme="dark"] .snapshot-panel select,
  body[data-theme="dark"] .snapshot-panel textarea,
  body[data-theme="dark"] #business-type,
  body[data-theme="dark"] #business-type[readonly] {
    border-color: rgba(255, 120, 30, 0.45) !important;
    background: rgba(255, 253, 249, 0.98) !important;
    color: #171612 !important;
  }

  body[data-theme="dark"] #business-type:not(:placeholder-shown),
  body[data-theme="dark"] #business-type[readonly]:not(:placeholder-shown) {
    background: rgba(255, 253, 249, 0.98) !important;
    color: #171612 !important;
  }

  .check-item.workflow-step,
  body[data-theme="dark"] .check-item.workflow-step {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    column-gap: 12px;
  }

  .check-item.workflow-step > .badge {
    align-self: center;
  }
}

@media (max-width: 430px) {
  .check-item.workflow-step,
  body[data-theme="dark"] .check-item.workflow-step {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .check-item.workflow-step > .badge {
    grid-column: 2;
    justify-self: start;
    margin-top: 6px;
  }
}

/* Finished main numbered sections: open = outer glow, closed = header glow. */
.collapsible-section.is-step-ready:not(.is-collapsed):not(.check-item),
.collapsible-section.finished-area:not(.is-collapsed):not(.check-item) {
  border: 4px solid var(--green-strong);
  box-shadow:
    0 0 0 2px rgba(39, 190, 117, 0.46),
    0 0 18px rgba(39, 190, 117, 0.24);
}

.collapsible-section.is-step-ready:not(.is-collapsed):not(.check-item) > .panel-heading,
.collapsible-section.finished-area:not(.is-collapsed):not(.check-item) > .panel-heading,
.collapsible-section.is-step-ready:not(.is-collapsed):not(.check-item) > .work-header,
.collapsible-section.finished-area:not(.is-collapsed):not(.check-item) > .work-header {
  border-top: 0;
  border-right: 0;
  border-left: 0;
  border-bottom: 1px solid rgba(255, 120, 30, 0.34);
  box-shadow: none;
}

.collapsible-section.is-step-ready.is-collapsed:not(.check-item),
.collapsible-section.finished-area.is-collapsed:not(.check-item) {
  border: 0;
  box-shadow: none;
}

.collapsible-section.is-step-ready.is-collapsed:not(.check-item) > .panel-heading,
.collapsible-section.finished-area.is-collapsed:not(.check-item) > .panel-heading,
.collapsible-section.is-step-ready.is-collapsed:not(.check-item) > .work-header,
.collapsible-section.finished-area.is-collapsed:not(.check-item) > .work-header {
  border: 4px solid var(--green-strong);
  box-shadow:
    0 0 0 2px rgba(39, 190, 117, 0.46),
    0 0 18px rgba(39, 190, 117, 0.24);
}

body[data-theme="dark"] .collapsible-section.is-step-ready:not(.is-collapsed):not(.check-item),
body[data-theme="dark"] .collapsible-section.finished-area:not(.is-collapsed):not(.check-item) {
  border: 4px solid var(--green-strong);
  box-shadow:
    0 0 0 2px rgba(59, 224, 111, 0.54),
    0 0 22px rgba(59, 224, 111, 0.28);
}

body[data-theme="dark"] .collapsible-section.is-step-ready:not(.is-collapsed):not(.check-item) > .panel-heading,
body[data-theme="dark"] .collapsible-section.finished-area:not(.is-collapsed):not(.check-item) > .panel-heading,
body[data-theme="dark"] .collapsible-section.is-step-ready:not(.is-collapsed):not(.check-item) > .work-header,
body[data-theme="dark"] .collapsible-section.finished-area:not(.is-collapsed):not(.check-item) > .work-header {
  border-top: 0;
  border-right: 0;
  border-left: 0;
  border-bottom: 1px solid rgba(255, 120, 30, 0.42);
  box-shadow: none;
}

body[data-theme="dark"] .collapsible-section.is-step-ready.is-collapsed:not(.check-item),
body[data-theme="dark"] .collapsible-section.finished-area.is-collapsed:not(.check-item) {
  border: 0;
  box-shadow: none;
}

body[data-theme="dark"] .collapsible-section.is-step-ready.is-collapsed:not(.check-item) > .panel-heading,
body[data-theme="dark"] .collapsible-section.finished-area.is-collapsed:not(.check-item) > .panel-heading,
body[data-theme="dark"] .collapsible-section.is-step-ready.is-collapsed:not(.check-item) > .work-header,
body[data-theme="dark"] .collapsible-section.finished-area.is-collapsed:not(.check-item) > .work-header {
  border: 4px solid var(--green-strong);
  box-shadow:
    0 0 0 2px rgba(59, 224, 111, 0.54),
    0 0 22px rgba(59, 224, 111, 0.28);
}

/* Purpose-note pass: stage guide explains purpose only; action rows carry the numbers. */
.stage-next-panel {
  display: none !important;
}

.stage-purpose-line,
.guide-point.stage-purpose-line {
  display: block;
  min-height: auto;
  padding: 10px 12px;
  border: 1px solid rgba(255, 120, 30, 0.48);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.86);
}

.stage-purpose-line::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--sp-orange);
  vertical-align: 0.12em;
}

.stage-purpose-line > p,
.stage-purpose-line > div {
  display: inline;
}

.stage-purpose-line strong {
  color: #171612;
  font-weight: 950;
}

.stage-purpose-line p {
  display: inline;
  margin: 0;
  color: rgba(35, 31, 26, 0.76);
}

.stage-purpose-line strong + p::before {
  content: ": ";
  color: rgba(35, 31, 26, 0.76);
  font-weight: 500;
}

.primary-guide-point.stage-purpose-line p {
  color: #171612;
  font-weight: 800;
}

body[data-theme="dark"] .stage-purpose-line,
body[data-theme="dark"] .guide-point.stage-purpose-line {
  border-color: rgba(255, 120, 30, 0.82);
  background: rgba(255, 238, 219, 0.96);
}

body[data-theme="dark"] .stage-purpose-line strong,
body[data-theme="dark"] .stage-purpose-line p,
body[data-theme="dark"] .primary-guide-point.stage-purpose-line p {
  color: #171612;
}

/* Readiness pills: orange means still being prepared, green means genuinely ready. */
.handoff-item {
  border: 2px solid rgba(255, 120, 30, 0.76);
  border-left-width: 6px;
  border-radius: 8px;
  background: rgba(255, 238, 219, 0.88);
  box-shadow: none;
}

.handoff-status {
  border: 2px solid rgba(255, 120, 30, 0.82);
  background: rgba(255, 120, 30, 0.14);
  color: #b64500;
  font-weight: 950;
}

.handoff-item.ready-item {
  border: 3px solid var(--green-strong);
  background: rgba(232, 255, 241, 0.96);
  box-shadow: 0 0 0 1px rgba(39, 190, 117, 0.22);
}

.handoff-status.ready {
  border: 2px solid var(--green-strong);
  background: rgba(232, 255, 241, 0.98);
  color: var(--green-strong);
  font-weight: 950;
}

body[data-theme="dark"] .handoff-item {
  border-color: rgba(255, 255, 255, 0.86);
  border-left-color: var(--sp-orange);
  background: rgba(255, 238, 219, 0.96);
}

body[data-theme="dark"] .handoff-status {
  border-color: rgba(255, 120, 30, 0.94);
  background: rgba(255, 120, 30, 0.18);
  color: #b64500;
}

body[data-theme="dark"] .handoff-item.ready-item {
  border-color: var(--green-strong);
  background: rgba(232, 255, 241, 0.98);
}

body[data-theme="dark"] .handoff-status.ready {
  border-color: var(--green-strong);
  background: rgba(232, 255, 241, 1);
  color: var(--green-strong);
}

/* Numbered rows should clearly read as the action path. */
.collapsible-section,
.check-item.workflow-step {
  border: 3px solid var(--sp-orange);
  box-shadow: 0 0 0 1px rgba(255, 120, 30, 0.18);
}

.collapsible-section.is-step-ready,
.collapsible-section.finished-area,
.check-item.workflow-step.finished {
  border-color: var(--green-strong);
  box-shadow: 0 0 0 1px rgba(39, 190, 117, 0.28);
}

.collapsible-section > .panel-heading,
.collapsible-section > .work-header {
  grid-template-columns: 30px minmax(0, 1fr) auto;
}

.section-heading-actions {
  flex-wrap: wrap;
}

body[data-theme="dark"] .print-ready-panel.completed {
  border-color: var(--green-strong);
  box-shadow:
    0 0 0 2px rgba(39, 190, 117, 0.42),
    0 0 28px rgba(39, 190, 117, 0.28),
    inset 4px 0 0 var(--green-strong);
}

.ein-info-panel {
  border: 2px solid rgba(255, 120, 30, 0.74);
  background: rgba(255, 253, 249, 0.9);
  box-shadow: none;
}

.ein-info-panel .work-header {
  margin-bottom: 8px;
}

.ein-info-panel h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

body[data-theme="dark"] .collapsible-section,
body[data-theme="dark"] .check-item.workflow-step {
  border-color: var(--sp-orange);
  box-shadow: 0 0 0 1px rgba(255, 120, 30, 0.34);
}

body[data-theme="dark"] .collapsible-section.is-step-ready,
body[data-theme="dark"] .collapsible-section.finished-area,
body[data-theme="dark"] .check-item.workflow-step.finished {
  border-color: var(--green-strong);
  box-shadow: 0 0 0 1px rgba(39, 190, 117, 0.35);
}

.collapsible-section:not(.is-collapsed):not(.check-item) {
  box-shadow:
    0 0 0 1px rgba(255, 120, 30, 0.28),
    0 0 14px rgba(255, 120, 30, 0.12);
}

.collapsible-section:not(.is-collapsed).is-step-ready:not(.check-item),
.collapsible-section:not(.is-collapsed).finished-area:not(.check-item) {
  box-shadow:
    0 0 0 1px rgba(39, 190, 117, 0.34),
    0 0 13px rgba(39, 190, 117, 0.12);
}

body[data-theme="dark"] .collapsible-section:not(.is-collapsed):not(.check-item) {
  box-shadow:
    0 0 0 1px rgba(255, 120, 30, 0.42),
    0 0 15px rgba(255, 120, 30, 0.16);
}

body[data-theme="dark"] .collapsible-section:not(.is-collapsed).is-step-ready:not(.check-item),
body[data-theme="dark"] .collapsible-section:not(.is-collapsed).finished-area:not(.check-item) {
  box-shadow:
    0 0 0 1px rgba(39, 190, 117, 0.42),
    0 0 14px rgba(39, 190, 117, 0.15);
}

body[data-theme="dark"] .ein-info-panel {
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 238, 219, 0.96);
}

body[data-theme="dark"] .ein-info-panel h2,
body[data-theme="dark"] .ein-info-panel p {
  color: #171612;
}

/* What is ready: unfinished rows should look active, not complete. */
.progress-panel .handoff-item {
  border: 2px solid #ff7a1a;
  border-left-width: 6px;
  background: rgba(255, 195, 128, 0.42);
}

.progress-panel {
  border: 3px solid #ff7a1a;
  box-shadow:
    0 0 0 1px rgba(255, 120, 30, 0.28),
    0 0 18px rgba(255, 120, 30, 0.12),
    var(--shadow);
}

.progress-panel .handoff-status {
  border: 2px solid #ff7a1a;
  background: rgba(255, 238, 219, 0.96);
  color: #ad4200;
}

.progress-panel .panel-heading .badge,
.progress-panel .panel-heading .badge.ready,
.progress-panel .panel-heading .badge.in-progress {
  border: 2px solid #ff7a1a;
  background: #ff7a1a;
  color: #fff;
  font-weight: 950;
}

.progress-panel .panel-heading .badge.complete {
  border-color: var(--green-strong);
  background: var(--green-strong);
  color: #fff;
}

.progress-panel .handoff-item.ready-item {
  border: 3px solid var(--green-strong);
  background: rgba(232, 255, 241, 0.98);
}

.progress-panel:has(.handoff-item.ready-item):not(:has(.handoff-item:not(.ready-item))) {
  border-color: var(--green-strong);
  box-shadow:
    0 0 0 1px rgba(39, 190, 117, 0.35),
    0 0 18px rgba(39, 190, 117, 0.16),
    var(--shadow);
}

.progress-panel .handoff-status.ready {
  border: 2px solid var(--green-strong);
  background: var(--green-strong);
  color: #fff;
}

body[data-theme="dark"] .progress-panel .handoff-item {
  border-color: #ff8a22;
  border-left-color: #ff8a22;
  background: rgba(255, 195, 128, 0.5);
}

body[data-theme="dark"] .progress-panel {
  border-color: #ff8a22;
  box-shadow:
    0 0 0 1px rgba(255, 120, 30, 0.38),
    0 0 20px rgba(255, 120, 30, 0.18);
}

body[data-theme="dark"] .progress-panel .handoff-status {
  border-color: #ff8a22;
  background: rgba(255, 238, 219, 1);
  color: #ad4200;
}

body[data-theme="dark"] .progress-panel .panel-heading .badge,
body[data-theme="dark"] .progress-panel .panel-heading .badge.ready,
body[data-theme="dark"] .progress-panel .panel-heading .badge.in-progress {
  border-color: #ff8a22;
  background: #ff8a22;
  color: #fff;
}

body[data-theme="dark"] .progress-panel .panel-heading .badge.complete {
  border-color: var(--green-strong);
  background: var(--green-strong);
  color: #fff;
}

body[data-theme="dark"] .progress-panel .handoff-item.ready-item {
  border-color: var(--green-strong);
  background: rgba(232, 255, 241, 1);
}

body[data-theme="dark"] .progress-panel:has(.handoff-item.ready-item):not(:has(.handoff-item:not(.ready-item))) {
  border-color: var(--green-strong);
  box-shadow:
    0 0 0 1px rgba(39, 190, 117, 0.42),
    0 0 20px rgba(39, 190, 117, 0.2);
}

body[data-theme="dark"] .progress-panel .handoff-status.ready {
  border-color: var(--green-strong);
  background: var(--green-strong);
  color: #fff;
}

/* Guide copy is not a clickable step; keep it plain. */
.stage-purpose-line,
.guide-point.stage-purpose-line,
body[data-theme="dark"] .stage-purpose-line,
body[data-theme="dark"] .guide-point.stage-purpose-line {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 3px 0;
  box-shadow: none;
}

.stage-purpose-line::before {
  width: 7px;
  height: 7px;
  margin-right: 9px;
}

/* EIN explainer is a plain text note, not a bordered step. */
.ein-info-panel,
body[data-theme="dark"] .ein-info-panel {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ein-info-panel .work-header {
  display: block;
  min-height: 0;
  margin: 0 0 4px;
  padding: 0;
  cursor: default;
}

.ein-info-panel h2 {
  color: #171612;
  font-size: 1rem;
  font-weight: 950;
}

.ein-info-panel .helper {
  margin: 0;
  color: rgba(35, 31, 26, 0.74);
}

body[data-theme="dark"] .ein-info-panel h2,
body[data-theme="dark"] .ein-info-panel .helper {
  color: #fffaf4;
}

/* Stage guide is one box with simple bullet points, not a stack of mini-cards. */
.route-map {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stage-purpose-item {
  position: relative;
  display: block;
  margin: 0;
  padding: 0 0 0 18px;
  color: rgba(35, 31, 26, 0.76);
  font-size: 0.95rem;
  line-height: 1.45;
}

.stage-purpose-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--sp-orange);
}

.stage-purpose-item strong {
  color: #171612;
  font-weight: 950;
}

.primary-purpose-item {
  color: #171612;
  font-weight: 850;
}

.stage-purpose-line strong + p::before {
  content: none;
}

body[data-theme="dark"] .stage-purpose-item,
body[data-theme="dark"] .stage-purpose-item strong,
body[data-theme="dark"] .primary-purpose-item {
  color: #fffaf4;
}

body[data-theme="dark"] .route-choice-row {
  border: 0;
  background: transparent;
  color: rgba(35, 31, 26, 0.82);
}

body[data-theme="dark"] .route-choice-row strong {
  color: #171612;
}

/* Items inside an opened step are checklist lines, not more numbered steps. */
.check-item.workflow-step,
body[data-theme="dark"] .check-item.workflow-step {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 120, 30, 0.34);
  background: transparent;
  box-shadow: none;
  padding: 11px 0;
}

.check-item.workflow-step:last-child {
  border-bottom: 0;
}

.check-item.workflow-step .step-number {
  display: none;
}

.check-item.workflow-step input {
  grid-column: 1;
  width: 22px;
  height: 22px;
  margin: 0;
  align-self: center;
  justify-self: center;
  accent-color: var(--green-strong);
  cursor: pointer;
}

.check-item.workflow-step input:not(:disabled) {
  outline: 2px solid rgba(255, 120, 30, 0.72);
  outline-offset: 2px;
}

.check-item.workflow-step input:disabled {
  cursor: default;
  opacity: 0.45;
  outline: 0;
}

.check-item.workflow-step > div {
  grid-column: 2;
}

.check-item.workflow-step > .badge {
  grid-column: 3;
}

.workflow-step.next-step,
.workflow-step.finished,
.check-item.workflow-step.finished,
body[data-theme="dark"] .workflow-step.next-step,
body[data-theme="dark"] .workflow-step.finished,
body[data-theme="dark"] .check-item.workflow-step.finished {
  border-color: rgba(255, 120, 30, 0.34);
  background: transparent;
  box-shadow: none;
}

.check-item.workflow-step,
.check-item.workflow-step.finished,
body[data-theme="dark"] .check-item.workflow-step,
body[data-theme="dark"] .check-item.workflow-step.finished {
  box-shadow: none;
}

.check-item.workflow-step,
.check-item.workflow-step.finished,
body[data-theme="dark"] .check-item.workflow-step,
body[data-theme="dark"] .check-item.workflow-step.finished {
  border-width: 0 0 1px;
  box-shadow: none;
}

.check-item.workflow-step.auto-item {
  background: transparent;
}

.check-item.workflow-step > .badge.needed {
  border: 2px solid #ff3b30;
  background: rgba(255, 235, 232, 0.98);
  color: #d0180f;
  font-weight: 950;
}

body[data-theme="dark"] .check-item.workflow-step > .badge.needed {
  border-color: #ff3b30;
  background: rgba(255, 235, 232, 1);
  color: #d0180f;
}

.ein-info-panel {
  margin-bottom: 4px;
}

/* Usability polish: help buttons, inner status pills, and Formation spacing. */
.help-button {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
}

.check-item.workflow-step,
body[data-theme="dark"] .check-item.workflow-step {
  grid-template-columns: 34px minmax(0, 1fr) max-content;
  column-gap: 14px;
  padding: 13px 14px;
}

.check-item.workflow-step > .badge {
  align-self: center;
  justify-self: end;
  margin-right: 0;
}

.check-item.workflow-step .has-inline-help .label-row {
  display: inline-flex;
  justify-content: flex-start;
  width: auto;
  gap: 7px;
}

.check-item.workflow-step .has-inline-help .inline-help {
  margin-left: 0;
  transform: translateY(-1px);
}

.check-item.workflow-step:not(.auto-item) input {
  position: static !important;
  inline-size: 24px !important;
  block-size: 24px !important;
  width: 24px;
  height: 24px;
  opacity: 1 !important;
  pointer-events: auto !important;
  appearance: auto;
  accent-color: var(--green-strong);
  outline: 2px solid rgba(255, 120, 30, 0.76);
  outline-offset: 2px;
  border-radius: 4px;
}

.check-item.workflow-step.auto-item input {
  position: static !important;
  inline-size: 24px !important;
  block-size: 24px !important;
  width: 24px;
  height: 24px;
  opacity: 0;
  pointer-events: none;
}

.route-lock-grid {
  margin-top: 10px;
  align-items: start;
}

.route-lock-card {
  padding: 14px 16px;
  min-height: 86px;
}

.strong-helper.orange-helper {
  display: block;
  margin-top: 14px;
  padding: 14px 16px;
  line-height: 1.5;
  background: rgba(255, 120, 30, 0.07);
  color: #ad4200;
}

body[data-theme="dark"] .strong-helper.orange-helper {
  background: rgba(255, 238, 219, 0.96);
  color: #ad4200;
}

/* Visual point-flow pass: fewer labels, clearer next action, stronger status rows. */
.stage-guide-header h2 {
  color: var(--sp-orange);
  font-size: 0.92rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stage-guide-header .action-link {
  border-color: rgba(255, 120, 30, 0.68);
  color: #9f3c00;
  background: rgba(255, 120, 30, 0.08);
}

.guide-point {
  min-height: 54px;
  padding: 11px 12px;
  border-color: rgba(255, 120, 30, 0.64);
  background: rgba(255, 253, 249, 0.94);
}

.guide-point strong {
  display: block;
  margin-bottom: 2px;
  color: #171612;
  font-size: 0.96rem;
  font-weight: 900;
}

.guide-point p {
  line-height: 1.35;
}

.stage-next-panel .eyebrow {
  display: none;
}

.stage-next-panel:not(.finished-area) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background: rgba(255, 120, 30, 0.08);
}

.stage-next-panel:not(.finished-area) h2 {
  color: #b64500;
  font-size: 0.98rem;
  font-weight: 950;
  letter-spacing: 0;
  margin: 0 0 6px;
}

#stage-next-message {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #171612;
  font-size: 1.02rem;
  font-weight: 850;
}

#stage-next-message::before {
  content: none;
}

.note-list li {
  position: relative;
  min-height: 46px;
  padding: 8px 0 8px 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #171612;
}

.note-list li::before {
  content: "!";
  position: absolute;
  left: 12px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  transform: translateY(-50%);
  background: rgba(255, 59, 48, 0.12);
  color: #ff3b30;
  font-weight: 950;
}

.handoff-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 56px;
  border-left-width: 0;
  border: 1px solid rgba(173, 66, 0, 0.32);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.86);
  color: #171612;
}

.handoff-item strong {
  display: block;
  color: #171612;
  font-weight: 900;
  line-height: 1.2;
}

.handoff-item p {
  margin: 2px 0 0;
  color: rgba(35, 31, 26, 0.72);
  font-size: 0.85rem;
  line-height: 1.25;
}

.handoff-status {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 28px;
  border: 1px solid rgba(255, 120, 30, 0.78);
  border-radius: 999px;
  background: rgba(255, 120, 30, 0.12);
  color: #b64500;
  font-size: 0.76rem;
  font-weight: 950;
}

.handoff-status.ready {
  border-color: var(--green-strong);
  background: var(--green-strong);
  color: #fff;
}

.handoff-item.ready-item {
  border-color: rgba(39, 190, 117, 0.62);
  background: rgba(39, 190, 117, 0.08);
  box-shadow: none;
}

body[data-theme="dark"] .stage-guide-header h2,
body[data-theme="dark"] .stage-next-panel:not(.finished-area) h2 {
  color: var(--sp-orange);
}

body[data-theme="dark"] .stage-guide-header .action-link {
  border-color: rgba(255, 255, 255, 0.9);
  color: #fffaf4;
  background: rgba(255, 120, 30, 0.18);
}

body[data-theme="dark"] .guide-point {
  border-color: rgba(255, 120, 30, 0.9);
  background: rgba(255, 238, 219, 0.96);
}

body[data-theme="dark"] .guide-point strong,
body[data-theme="dark"] .guide-point p,
body[data-theme="dark"] #stage-next-message {
  color: #171612;
}

body[data-theme="dark"] .stage-next-panel:not(.finished-area) {
  background: rgba(255, 238, 219, 0.96);
}

body[data-theme="dark"] .handoff-item {
  background: rgba(255, 238, 219, 0.96);
  color: #171612;
}

body[data-theme="dark"] .note-list li {
  background: transparent;
  color: #171612;
}

body[data-theme="dark"] .handoff-item strong {
  color: #171612;
}

body[data-theme="dark"] .handoff-item p {
  color: rgba(35, 31, 26, 0.72);
}

body[data-theme="dark"] .handoff-item.ready-item {
  border-color: var(--green-strong);
  background: rgba(232, 255, 241, 0.96);
}

@media (max-width: 720px) {
  .stage-next-panel:not(.finished-area),
  .handoff-item,
  .guide-point {
    grid-template-columns: 1fr;
  }

  .guide-point {
    justify-items: start;
  }

  .stage-next-panel:not(.finished-area) {
    gap: 10px;
  }

  #stage-next-message {
    align-items: flex-start;
  }
}

.stage-guide-intro strong {
  color: var(--sp-orange);
  font-weight: 950;
}

.stage-next-panel:not(.finished-area) {
  border: 3px solid var(--sp-orange);
  box-shadow:
    0 0 0 1px rgba(255, 120, 30, 0.36),
    0 0 22px rgba(255, 120, 30, 0.18);
}

.progress-panel {
  border-color: #ad4200;
  box-shadow: 0 0 0 1px rgba(173, 66, 0, 0.18);
}

.handoff-item {
  border-left-color: #ad4200;
}

.handoff-item.ready-item {
  border-left-color: var(--green-strong);
  box-shadow: inset 3px 0 0 var(--green-strong);
}

body[data-theme="dark"] .stage-guide-intro strong {
  color: var(--sp-orange);
}

body[data-theme="dark"] .stage-next-panel:not(.finished-area) {
  border-color: var(--sp-orange);
  box-shadow:
    0 0 0 1px rgba(255, 120, 30, 0.62),
    0 0 26px rgba(255, 120, 30, 0.2);
}

body[data-theme="dark"] .progress-panel {
  border-color: #ad4200;
  box-shadow: 0 0 0 1px rgba(255, 120, 30, 0.2);
}

body[data-theme="dark"] .handoff-item {
  border-left-color: #ad4200;
}

body[data-theme="dark"] .handoff-item.ready-item {
  border-left-color: var(--green-strong);
  box-shadow: inset 3px 0 0 var(--green-strong);
}

/* Last-word mobile polish: these rules intentionally sit at the end. */
.stage-tab.done:not(.active),
body[data-theme="dark"] .stage-tab.done:not(.active) {
  border-color: var(--green-strong) !important;
  background: rgba(232, 255, 241, 0.96) !important;
  color: #171612 !important;
}

.route-lock-card.needs-route,
body[data-theme="dark"] .route-lock-card.needs-route {
  border-color: #ff3b30 !important;
  background: rgba(255, 235, 232, 0.98) !important;
  color: #171612 !important;
}

.route-lock-card.needs-route span,
.route-lock-card.needs-route small,
.route-lock-card.needs-route strong,
body[data-theme="dark"] .route-lock-card.needs-route span,
body[data-theme="dark"] .route-lock-card.needs-route small,
body[data-theme="dark"] .route-lock-card.needs-route strong {
  color: #171612 !important;
}

.check-item.workflow-step:not(.auto-item) input[type="checkbox"],
body[data-theme="dark"] .check-item.workflow-step:not(.auto-item) input[type="checkbox"] {
  width: 24px !important;
  height: 24px !important;
  inline-size: 24px !important;
  block-size: 24px !important;
  margin: 0 !important;
  border: 2px solid var(--sp-orange) !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background-color: #fff !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 15px 15px !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.check-item.workflow-step:not(.auto-item) input[type="checkbox"]:checked,
body[data-theme="dark"] .check-item.workflow-step:not(.auto-item) input[type="checkbox"]:checked {
  border-color: var(--green-strong) !important;
  background-color: var(--green-strong) !important;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 9.2 7.2 12.4 14 5.6' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

@media (max-width: 720px) {
  .route-choice-row {
    gap: 8px !important;
    padding: 9px 10px !important;
    font-size: 0.84rem !important;
    line-height: 1.24 !important;
  }

  .route-choice-row strong {
    font-size: 0.85rem !important;
  }

  .route-choice-row .help-button {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
  }

  body[data-theme="dark"] .prep-grid label,
  body[data-theme="dark"] .snapshot-panel {
    border-color: rgba(255, 120, 30, 0.48) !important;
    background: rgba(255, 238, 219, 0.96) !important;
    color: #171612 !important;
  }

  body[data-theme="dark"] .prep-grid label.finished {
    border-color: var(--green-strong) !important;
    background: rgba(232, 255, 241, 0.96) !important;
  }

  body[data-theme="dark"] .prep-grid label.needs-review {
    border-color: var(--sp-orange) !important;
    background: rgba(255, 238, 219, 0.96) !important;
  }

  body[data-theme="dark"] .prep-grid label .label-row,
  body[data-theme="dark"] .prep-grid label strong,
  body[data-theme="dark"] .prep-grid label .field-note,
  body[data-theme="dark"] .snapshot-panel label,
  body[data-theme="dark"] .snapshot-panel .helper,
  body[data-theme="dark"] .snapshot-panel .field-counter {
    color: #171612 !important;
  }

  body[data-theme="dark"] .prep-grid input,
  body[data-theme="dark"] .prep-grid select,
  body[data-theme="dark"] .snapshot-panel input,
  body[data-theme="dark"] .snapshot-panel select,
  body[data-theme="dark"] .snapshot-panel textarea,
  body[data-theme="dark"] #business-type,
  body[data-theme="dark"] #business-type[readonly],
  body[data-theme="dark"] #business-type:not(:placeholder-shown),
  body[data-theme="dark"] #business-type[readonly]:not(:placeholder-shown) {
    border-color: rgba(255, 120, 30, 0.45) !important;
    background: rgba(255, 253, 249, 0.98) !important;
    color: #171612 !important;
  }

  .check-item.workflow-step,
  body[data-theme="dark"] .check-item.workflow-step {
    grid-template-columns: 30px minmax(0, 1fr) auto !important;
    column-gap: 12px !important;
  }
}

@media (max-width: 430px) {
  .check-item.workflow-step,
  body[data-theme="dark"] .check-item.workflow-step {
    grid-template-columns: 30px minmax(0, 1fr) !important;
  }

  .check-item.workflow-step > .badge {
    grid-column: 2 !important;
    justify-self: start !important;
    margin-top: 6px !important;
  }
}

/* True final override: desktop consistency and one clear checkbox square. */
@media (min-width: 721px) {
  .dashboard {
    gap: 18px 20px;
  }

  .stage-guide-panel {
    padding: 24px 28px;
    border: 1.5px solid rgba(255, 120, 30, 0.62);
    border-radius: 12px;
    background: rgba(255, 238, 219, 0.68);
  }

  .stage-guide-header {
    align-items: flex-start;
    gap: 18px;
  }

  .stage-guide-header .action-link {
    min-width: 0;
    padding: 10px 16px;
    white-space: nowrap;
  }

  .stage-purpose-item {
    max-width: 920px;
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .collapsible-section,
  .work-area,
  .support-panel,
  .progress-panel,
  .print-ready-panel {
    border-radius: 12px;
  }

  .collapsible-section > .panel-heading,
  .collapsible-section > .work-header {
    min-height: 62px;
    padding: 16px 18px;
  }

  .collapsible-section:not(.is-collapsed):not(.check-item) {
    background: rgba(255, 253, 249, 0.96);
  }

  .section-heading-actions {
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
  }

  .check-item.workflow-step,
  body[data-theme="dark"] .check-item.workflow-step {
    grid-template-columns: 34px minmax(0, 1fr) max-content;
    min-height: 64px;
    padding: 14px 18px;
  }

  .support-grid {
    align-items: stretch;
    gap: 18px;
  }

  .support-panel,
  .progress-panel {
    min-height: 280px;
  }

  .progress-panel .handoff-item {
    min-height: 66px;
  }
}

.check-item.workflow-step:not(.auto-item) input[type="checkbox"],
body[data-theme="dark"] .check-item.workflow-step:not(.auto-item) input[type="checkbox"] {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.check-visual {
  grid-column: 1;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  align-self: center;
  justify-self: center;
  border: 2px solid var(--sp-orange);
  border-radius: 0;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255, 120, 30, 0.08);
}

.check-visual.checked {
  border-color: var(--green-strong);
  background: var(--green-strong);
  box-shadow: 0 0 0 2px rgba(39, 190, 117, 0.14);
}

.check-visual.checked::after {
  content: "";
  width: 13px;
  height: 8px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}

.check-item.workflow-step > .check-visual + div {
  grid-column: 2;
}

body[data-theme="dark"] .stage-guide-panel {
  border-color: rgba(255, 120, 30, 0.74);
  background: rgba(86, 38, 18, 0.86);
}

body[data-theme="dark"] .collapsible-section:not(.is-collapsed):not(.check-item) {
  background: rgba(255, 238, 219, 0.96);
  color: #171612;
}

body[data-theme="dark"] .collapsible-section:not(.is-collapsed):not(.check-item) .collapse-heading-main h2,
body[data-theme="dark"] .collapsible-section:not(.is-collapsed):not(.check-item) .collapse-heading-detail,
body[data-theme="dark"] .collapsible-section:not(.is-collapsed):not(.check-item) label,
body[data-theme="dark"] .collapsible-section:not(.is-collapsed):not(.check-item) .helper,
body[data-theme="dark"] .collapsible-section:not(.is-collapsed):not(.check-item) strong,
body[data-theme="dark"] .collapsible-section:not(.is-collapsed):not(.check-item) p {
  color: #171612;
}

body[data-theme="dark"] .support-panel {
  background: rgba(16, 13, 18, 0.94);
  border-color: #ff3b30;
}

body[data-theme="dark"] .progress-panel {
  background: rgba(255, 238, 219, 0.96);
  color: #171612;
}

body[data-theme="dark"] .progress-panel h2,
body[data-theme="dark"] .progress-panel strong,
body[data-theme="dark"] .progress-panel p {
  color: #171612;
}

/* Formation prep dark-mode readability lock. Completed cards stay light enough to read. */
body[data-theme="dark"] #formation-prep .route-lock-card,
body[data-theme="dark"] #formation-prep .prep-grid label {
  background: rgba(255, 238, 219, 0.97) !important;
  border-color: rgba(255, 120, 30, 0.58) !important;
  color: #171612 !important;
}

body[data-theme="dark"] #formation-prep .route-lock-card.finished-area,
body[data-theme="dark"] #formation-prep .prep-grid label.finished {
  background: rgba(232, 255, 241, 0.97) !important;
  border-color: var(--green-strong) !important;
  box-shadow: inset 3px 0 0 var(--green-strong) !important;
  color: #171612 !important;
}

body[data-theme="dark"] #formation-prep .route-lock-card.needs-route {
  background: rgba(255, 232, 232, 0.97) !important;
  border-color: #ff3b30 !important;
  color: #171612 !important;
}

body[data-theme="dark"] #formation-prep .route-lock-card *,
body[data-theme="dark"] #formation-prep .prep-grid label,
body[data-theme="dark"] #formation-prep .prep-grid label *,
body[data-theme="dark"] #formation-prep .field-note,
body[data-theme="dark"] #formation-prep .important-field-note {
  color: #171612 !important;
}

body[data-theme="dark"] #formation-prep .prep-grid input,
body[data-theme="dark"] #formation-prep .prep-grid select {
  background: rgba(255, 253, 249, 0.99) !important;
  border-color: rgba(255, 120, 30, 0.45) !important;
  color: #171612 !important;
}

/* Route choice polish: make the main route picker read as the decision point. */
#route-select {
  border: 3px solid var(--sp-orange) !important;
  box-shadow: 0 0 0 2px rgba(255, 120, 30, 0.12) !important;
}

body[data-theme="dark"] #route-select {
  border-color: var(--sp-orange) !important;
  background: rgba(255, 253, 249, 0.99) !important;
  color: #171612 !important;
}

body:not([data-theme="dark"]) .route-choice-row {
  border: 0 !important;
  background: transparent !important;
  color: #171612 !important;
  box-shadow: none !important;
}

body:not([data-theme="dark"]) .route-choice-row strong {
  color: #171612 !important;
}

@media (max-width: 720px) {
  .one-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile/dark readability polish for route pickers and support panels. */
@media (max-width: 720px) {
  #route-select {
    font-size: 0.96rem !important;
    line-height: 1.25 !important;
    min-height: 48px !important;
    padding: 10px 42px 10px 12px !important;
    text-overflow: ellipsis;
  }
}

body[data-theme="dark"] #route-select {
  background: rgba(255, 232, 204, 0.98) !important;
  color: #22140b !important;
  border-color: rgba(255, 120, 30, 0.92) !important;
}

body[data-theme="dark"] .route-choice-row {
  color: rgba(255, 244, 230, 0.94) !important;
}

body[data-theme="dark"] .route-choice-row strong {
  color: #ffffff !important;
}

body[data-theme="dark"] .support-panel,
body[data-theme="dark"] .support-panel * {
  color: rgba(255, 244, 230, 0.95) !important;
}

body[data-theme="dark"] .support-panel h2,
body[data-theme="dark"] .support-panel strong,
body[data-theme="dark"] .support-panel b {
  color: #ffffff !important;
}

body[data-theme="dark"] .note-list li {
  background: rgba(255, 120, 30, 0.12) !important;
  border-color: rgba(255, 93, 93, 0.42) !important;
  color: rgba(255, 244, 230, 0.96) !important;
}

/* Mobile header system shared with the other SolidOATH apps. */
@media (min-width: 721px) and (max-width: 1040px) {
  .topbar {
    min-height: 178px !important;
    padding: 14px 18px 20px !important;
  }

  .topbar-row {
    width: min(100%, 920px) !important;
  }

  .brand-block {
    grid-template-columns: 52px minmax(0, auto) !important;
    max-width: calc(100% - 260px) !important;
  }

  .stonepath-mark {
    width: 52px !important;
    height: 52px !important;
  }

  .brand-wordmark {
    gap: 5px 7px !important;
  }

  .brand-name {
    font-size: clamp(38px, 5.2vw, 46px) !important;
  }

  .brand-by {
    font-size: 15px !important;
  }

  .version-badge {
    font-size: 10px !important;
  }

  .subhead {
    width: min(520px, calc(100% - 280px)) !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
  }

  .top-actions {
    right: max(18px, calc((100vw - 920px) / 2 + 18px)) !important;
  }

  .header-stax {
    width: 100px !important;
    height: 94px !important;
    padding: 8px !important;
    border-width: 2px !important;
  }

  .header-stax img {
    width: 58px !important;
    height: 58px !important;
  }

  .header-theme {
    left: max(18px, calc((100vw - 920px) / 2 + 18px)) !important;
  }

  .stage-strip-inner {
    width: min(100%, 920px) !important;
  }
}

@media (max-width: 560px) {
  .topbar {
    min-height: 178px !important;
    padding: 10px 12px 18px !important;
  }

  .topbar-row {
    width: 100% !important;
    margin: 0 !important;
    align-items: flex-start !important;
  }

  .brand-block {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    column-gap: 8px !important;
    max-width: calc(100% - 116px) !important;
  }

  .stonepath-mark {
    width: 42px !important;
    height: 42px !important;
    border-radius: 8px !important;
  }

  .brand-wordmark {
    align-items: flex-start !important;
    gap: 3px 5px !important;
    min-height: 0 !important;
    line-height: .96 !important;
  }

  .brand-name {
    font-size: 32px !important;
  }

  .brand-by {
    font-size: 13px !important;
  }

  .version-badge {
    min-height: 17px !important;
    padding: 2px 5px !important;
    font-size: 9px !important;
  }

  .subhead {
    left: 62px !important;
    right: 112px !important;
    bottom: 50px !important;
    max-width: none !important;
    font-size: 12px !important;
    line-height: 1.22 !important;
    text-align: left !important;
  }

  .top-actions {
    top: 10px !important;
    right: 12px !important;
  }

  .header-stax {
    width: 96px !important;
    height: 78px !important;
    padding: 7px !important;
    border-width: 2px !important;
    font-size: 11px !important;
  }

  .header-stax img {
    width: 46px !important;
    height: 46px !important;
  }

  .header-stax em {
    font-size: 8px !important;
  }

  .header-theme {
    left: 12px !important;
    bottom: 14px !important;
  }

  .theme-switcher {
    min-height: 30px !important;
    padding: 2px !important;
  }

  .theme-switcher button {
    width: 26px !important;
    height: 26px !important;
    font-size: 9px !important;
  }
}

@media (max-width: 390px) {
  .topbar {
    min-height: 190px !important;
  }

  .brand-block {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    max-width: calc(100% - 106px) !important;
  }

  .stonepath-mark {
    width: 38px !important;
    height: 38px !important;
  }

  .brand-name {
    font-size: 28px !important;
  }

  .brand-by {
    font-size: 12px !important;
  }

  .header-stax {
    width: 88px !important;
    height: 72px !important;
  }

  .subhead {
    left: 56px !important;
    right: 102px !important;
    font-size: 11px !important;
  }
}

/* Final launch polish override: keep dark ready panel readable. */
body[data-theme="dark"] .progress-panel {
  background: rgba(255, 238, 219, 0.98) !important;
  border-color: #ff8a22 !important;
  color: #171612 !important;
}

body[data-theme="dark"] .progress-panel h2,
body[data-theme="dark"] .progress-panel strong,
body[data-theme="dark"] .progress-panel p,
body[data-theme="dark"] .progress-panel small,
body[data-theme="dark"] .progress-panel .handoff-list,
body[data-theme="dark"] .progress-panel .handoff-item {
  color: #171612 !important;
}

body[data-theme="dark"] .progress-panel .handoff-item {
  background: rgba(255, 213, 160, 0.76) !important;
  border-color: #ff7a1a !important;
}

body[data-theme="dark"] .progress-panel .handoff-status {
  background: #fffaf4 !important;
  border-color: #ff7a1a !important;
  color: #ad4200 !important;
}

body[data-theme="dark"] .progress-panel .panel-heading .badge {
  color: #fff !important;
}

.one-account-create {
  grid-column: 1 / -1;
  border-color: rgba(255, 120, 30, 0.42) !important;
  background: rgba(255, 120, 30, 0.1) !important;
}

.one-action-primary {
  justify-self: start;
  min-height: 38px;
  margin-top: 4px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--sp-orange);
  color: #fff;
  font: inherit;
  font-weight: 900;
}

body[data-theme="dark"] .one-account-create {
  background: rgba(255, 232, 204, 0.98) !important;
  color: #171612 !important;
}

body[data-theme="dark"] .one-account-create * {
  color: #171612 !important;
}

body[data-theme="dark"] .one-account-create .one-action-primary {
  color: #fff !important;
}

/* Absolute EOF shared app shell lock - 2026-06-28 */
.topbar { min-height: 194px !important; padding: 18px 28px !important; }
.topbar-row, .stage-strip-inner { width: min(1120px, calc(100% - 56px)) !important; margin-inline: auto !important; }
.brand-block { max-width: calc(100% - 300px) !important; }
.brand-name { font-size: 48px !important; line-height: .94 !important; font-weight: 700 !important; }
.brand-start { color: rgba(255, 255, 255, .58) !important; }
.brand-by, .brand-by a { color: rgba(255, 255, 255, .82) !important; font-size: 16px !important; }
.version-badge { border-radius: 999px !important; padding: 2px 6px !important; background: rgba(255, 255, 255, .14) !important; color: rgba(255, 255, 255, .84) !important; font-size: 11px !important; }
.subhead, body[data-theme="dark"] .subhead { left: max(116px, calc((100vw - 1120px) / 2 + 116px)) !important; right: max(160px, calc((100vw - 1120px) / 2 + 160px)) !important; top: 72px !important; bottom: auto !important; width: auto !important; max-width: 560px !important; transform: none !important; text-align: left !important; color: #ff781e !important; font-size: 13px !important; line-height: 1.25 !important; white-space: normal !important; overflow: visible !important; overflow-wrap: anywhere !important; }
.top-actions { top: 18px !important; right: max(18px, calc((100vw - 1120px) / 2)) !important; }
.header-stax { width: 108px !important; height: 108px !important; padding: 7px !important; border-radius: 9px !important; }
.header-stax img { width: 64px !important; height: 64px !important; }
.header-stax strong, .header-stax em { color: #171612 !important; }
.header-theme { left: max(18px, calc((100vw - 1120px) / 2 + 18px)) !important; bottom: 18px !important; }
.theme-switcher { min-height: 24px !important; height: 24px !important; padding: 2px !important; }
.theme-switcher button { width: 28px !important; height: 20px !important; min-height: 20px !important; font-size: 9px !important; }
.stage-strip { top: 194px !important; }
body[data-theme="dark"] .route-choice-row, body[data-theme="dark"] .route-choice-row *, body[data-theme="dark"] .route-panel, body[data-theme="dark"] .route-panel * { color: #171612 !important; }
select, option, input, textarea, body[data-theme="dark"] select, body[data-theme="dark"] option, body[data-theme="dark"] input, body[data-theme="dark"] textarea { color: #171612 !important; }
select, option, body[data-theme="dark"] select, body[data-theme="dark"] option { background: #fffaf4 !important; }
.one-card, body[data-theme="dark"] .one-card { background: #fffaf4 !important; color: #171612 !important; }
.one-card *, body[data-theme="dark"] .one-card * { color: #171612 !important; }
.one-kicker, .one-grid section > span, body[data-theme="dark"] .one-kicker, body[data-theme="dark"] .one-grid section > span { color: #ad4200 !important; }
@media (max-width: 560px) { .topbar { min-height: 178px !important; padding: 10px 12px 18px !important; } .topbar-row, .stage-strip-inner { width: min(430px, calc(100% - 18px)) !important; } .brand-block { max-width: calc(100% - 116px) !important; } .brand-name { font-size: 32px !important; } .brand-by, .brand-by a { font-size: 13px !important; } .subhead, body[data-theme="dark"] .subhead { left: 62px !important; right: 112px !important; top: 70px !important; font-size: 11px !important; line-height: 1.18 !important; } .top-actions { top: 10px !important; right: 12px !important; } .header-stax { width: 96px !important; height: 78px !important; } .header-stax img { width: 46px !important; height: 46px !important; } .stage-strip { position: sticky !important; top: 0 !important; } }

/* True EOF alignment lock - 2026-06-28 */
.top-actions { right: 0 !important; }
.subhead, body[data-theme="dark"] .subhead {
  left: max(70px, calc((100vw - 1120px) / 2 + 70px)) !important;
  right: max(160px, calc((100vw - 1120px) / 2 + 160px)) !important;
}
@media (max-width: 560px) {
  .top-actions { right: 0 !important; }
  .subhead, body[data-theme="dark"] .subhead {
    left: 91px !important;
    right: 112px !important;
    top: 70px !important;
  }
}

/* Micro alignment: tagline begins under app name, not logo/byline. */
.subhead, body[data-theme="dark"] .subhead {
  left: max(63px, calc((100vw - 1120px) / 2 + 63px)) !important;
}
@media (max-width: 560px) {
  .subhead, body[data-theme="dark"] .subhead { left: 72px !important; }
}

/* Header and ONE final punch-list lock - 2026-06-28 */
.topbar {
  min-height: 194px !important;
  height: 194px !important;
}

.topbar-row,
.stage-strip-inner {
  width: min(1120px, calc(100% - 56px)) !important;
  margin-inline: auto !important;
}

.stonepath-mark {
  width: 58px !important;
  height: 58px !important;
  border-radius: 10px !important;
}

.stonepath-icon {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.subhead,
body[data-theme="dark"] .subhead {
  top: 72px !important;
  left: max(63px, calc((100vw - 1120px) / 2 + 63px)) !important;
  right: max(160px, calc((100vw - 1120px) / 2 + 160px)) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

.header-theme {
  left: max(18px, calc((100vw - 1120px) / 2 + 18px)) !important;
  bottom: 18px !important;
}

.top-actions {
  top: 18px !important;
  right: max(18px, calc((100vw - 1120px) / 2)) !important;
}

.stage-strip {
  top: 194px !important;
  margin-top: -14px !important;
}

.modal-theme-switcher {
  display: none !important;
}

@media (max-width: 560px) {
  .topbar {
    min-height: 178px !important;
    height: 178px !important;
    padding: 10px 12px 18px !important;
  }

  .topbar-row,
  .stage-strip-inner {
    width: min(430px, calc(100% - 18px)) !important;
  }

  .stonepath-mark {
    width: 42px !important;
    height: 42px !important;
  }

  .subhead,
  body[data-theme="dark"] .subhead {
    left: 72px !important;
    right: 112px !important;
    top: 70px !important;
    font-size: 11px !important;
    line-height: 1.18 !important;
  }

  .top-actions {
    top: 10px !important;
    right: 12px !important;
  }

  .header-theme {
    left: 28px !important;
    bottom: 18px !important;
  }

  .stage-strip {
    position: sticky !important;
    top: 0 !important;
    margin-top: 0 !important;
  }

  .shell {
    padding: 0 !important;
  }

  .topbar {
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  .stage-strip {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* Light-theme header contrast correction - 2026-06-28 */
body:not([data-theme="dark"]) .brand-start {
  color: rgba(148, 143, 135, .96) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .58) !important;
}

body:not([data-theme="dark"]) .brand-by,
body:not([data-theme="dark"]) .brand-by a,
body:not([data-theme="dark"]) .version-badge {
  color: rgba(148, 143, 135, .96) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .58) !important;
}

body[data-theme="dark"] .brand-start {
  color: rgba(255, 255, 255, .58) !important;
}

body[data-theme="dark"] .brand-by,
body[data-theme="dark"] .brand-by a,
body[data-theme="dark"] .version-badge {
  color: rgba(255, 255, 255, .82) !important;
}

/* Desktop web markup pass - keep mobile rules untouched. */
@media (min-width: 901px) {
  .topbar {
    min-height: 194px !important;
    height: 194px !important;
    padding: 0 28px !important;
  }

  .topbar-row {
    position: relative !important;
    display: block !important;
    width: min(1120px, calc(100% - 56px)) !important;
    height: 194px !important;
    min-height: 194px !important;
    margin-inline: auto !important;
  }

  .brand-block {
    position: absolute !important;
    top: 16px !important;
    left: 0 !important;
    right: 150px !important;
    width: auto !important;
    max-width: none !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .stonepath-mark {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    flex: 0 0 58px !important;
  }

  .brand-wordmark {
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
  }

  .brand-start {
    color: rgba(255, 255, 255, .72) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .62) !important;
  }

  .brand-by,
  .brand-by a,
  .version-badge {
    color: rgba(255, 255, 255, .86) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .62) !important;
  }

  .subhead,
  body[data-theme="dark"] .subhead {
    top: 76px !important;
    left: max(70px, calc((100vw - 1120px) / 2 + 70px)) !important;
    right: max(160px, calc((100vw - 1120px) / 2 + 160px)) !important;
    max-width: 660px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.22 !important;
    overflow-wrap: normal !important;
  }

  .top-actions {
    position: absolute !important;
    top: 20px !important;
    right: 0 !important;
    left: auto !important;
    width: 108px !important;
    height: 108px !important;
  }

  .header-stax {
    width: 108px !important;
    height: 108px !important;
  }

  .header-theme {
    left: max(18px, calc((100vw - 1120px) / 2 + 18px)) !important;
    bottom: 18px !important;
  }

  .stage-strip {
    margin-top: 0 !important;
    top: 0 !important;
  }

  .stage-strip-inner {
    width: min(1120px, calc(100% - 56px)) !important;
  }
}

.app-footer .brand-tm {
  color: currentColor;
  font-size: .9em;
  line-height: 0;
  margin-left: 2px;
  vertical-align: super;
}

/* Desktop logo lock: use the same visual treatment as Passage. */
@media (min-width: 901px) {
  .stonepath-mark {
    display: block !important;
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    flex: 0 0 58px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .stonepath-icon,
  body[data-theme="dark"] .stonepath-icon {
    display: block !important;
    width: 58px !important;
    height: 58px !important;
    object-fit: contain !important;
    border-radius: 10px !important;
  }
}

/* Mobile header fit pass - app name, tagline, and ONE button only. */
@media (max-width: 560px) {
  .topbar {
    min-height: 152px !important;
    height: 152px !important;
    padding: 0 9px !important;
  }

  .topbar-row,
  .stage-strip-inner {
    width: min(430px, calc(100% - 18px)) !important;
  }

  .brand-block {
    max-width: calc(100% - 88px) !important;
    gap: 7px !important;
  }

  .stonepath-mark,
  .stonepath-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    flex-basis: 36px !important;
  }

  .brand-name {
    font-size: 28px !important;
    line-height: .94 !important;
  }

  .brand-by,
  .brand-by a {
    font-size: 10px !important;
    line-height: 1.05 !important;
  }

  .version-badge {
    font-size: 8px !important;
    padding: 1px 4px !important;
  }

  .subhead,
  body[data-theme="dark"] .subhead {
    top: 50px !important;
    left: 45px !important;
    right: 112px !important;
    max-width: none !important;
    font-size: 10px !important;
    line-height: 1.12 !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere !important;
  }

  .top-actions {
    top: 12px !important;
    right: 10px !important;
    width: 76px !important;
    height: 64px !important;
  }

  .header-stax {
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
    flex-basis: 76px !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    padding: 5px !important;
  }

  .header-stax img {
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px !important;
  }

  .header-stax strong,
  .header-stax em {
    font-size: 9px !important;
    line-height: 1 !important;
  }

  .header-theme {
    left: 10px !important;
    bottom: 12px !important;
  }
}

@media (max-width: 390px) {
  .brand-name {
    font-size: 25px !important;
  }

  .brand-by,
  .brand-by a {
    font-size: 9px !important;
  }

  .subhead,
  body[data-theme="dark"] .subhead {
    top: 48px !important;
    left: 43px !important;
    right: 104px !important;
    font-size: 9px !important;
  }

  .top-actions {
    right: 8px !important;
    width: 72px !important;
    height: 62px !important;
  }

  .header-stax {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    flex-basis: 72px !important;
    height: 62px !important;
    min-height: 62px !important;
    max-height: 62px !important;
  }
}

/* Mobile review correction: version beside name and Launch-style stage rail. */
@media (max-width: 560px) {
  .brand-wordmark {
    display: grid !important;
    grid-template-columns: auto auto !important;
    grid-template-areas:
      "name version"
      "by by" !important;
    align-items: center !important;
    justify-content: start !important;
    column-gap: 5px !important;
    row-gap: 1px !important;
  }

  .brand-name {
    grid-area: name !important;
    font-size: 28px !important;
    line-height: .92 !important;
  }

  .version-badge {
    grid-area: version !important;
    align-self: center !important;
    margin: 0 !important;
    font-size: 8px !important;
    line-height: 1 !important;
    padding: 2px 5px !important;
  }

  .brand-by {
    grid-area: by !important;
    font-size: 10px !important;
    line-height: 1.05 !important;
  }

  .brand-by a {
    font-size: inherit !important;
    line-height: inherit !important;
  }

  .stage-strip {
    padding: 0 0 9px !important;
    border: 1px solid rgba(31, 27, 22, .12) !important;
    border-top: 0 !important;
    border-radius: 0 0 14px 14px !important;
    background: rgba(255, 255, 255, .92) !important;
    box-shadow: 0 14px 34px rgba(31, 27, 22, .08) !important;
  }

  .stage-strip-inner {
    width: min(430px, calc(100% - 18px)) !important;
    margin-inline: auto !important;
  }

  .stage-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    min-height: 72px !important;
    gap: 4px !important;
    align-items: center !important;
    justify-content: stretch !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .stage-tab {
    display: inline-grid !important;
    justify-items: center !important;
    align-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 36px !important;
    padding: 11px 5px 7px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #1a1928 !important;
    font-size: 10.5px !important;
    line-height: 1.1 !important;
    text-align: center !important;
    white-space: normal !important;
    position: relative !important;
    box-shadow: none !important;
  }

  .stage-tab span {
    display: none !important;
  }

  .stage-tab.active {
    background: transparent !important;
    color: var(--sp-orange) !important;
  }

  .stage-tab.active::after,
  .stage-tab.done::after {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: var(--sp-orange) !important;
  }

  body[data-theme="dark"] .stage-strip {
    border-color: rgba(255, 255, 255, .12) !important;
    background: linear-gradient(180deg, rgba(8, 7, 15, .96), rgba(18, 15, 19, .92)) !important;
    box-shadow: 0 14px 32px rgba(0, 0, 0, .28) !important;
  }

  body[data-theme="dark"] .stage-tab,
  body[data-theme="dark"] .stage-tab.active {
    background: transparent !important;
    border-color: transparent !important;
  }
}

@media (max-width: 390px) {
  .brand-name {
    font-size: 25px !important;
  }

  .stage-tab {
    font-size: 9.5px !important;
  }
}

/* Mobile exact alignment pass: shared header geometry across SolidOATH apps. */
@media (max-width: 560px) {
  .topbar {
    min-height: 168px !important;
    height: 168px !important;
  }

  .topbar-row {
    position: relative !important;
    min-height: 168px !important;
    height: 168px !important;
  }

  .brand-block {
    position: absolute !important;
    top: 10px !important;
    left: 2px !important;
    max-width: calc(100% - 98px) !important;
    gap: 7px !important;
  }

  .stonepath-mark,
  .stonepath-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    flex-basis: 36px !important;
  }

  .brand-name {
    font-size: 25px !important;
    line-height: 23px !important;
  }

  .version-badge {
    font-size: 8px !important;
    line-height: 1 !important;
    padding: 2px 5px !important;
  }

  .brand-by,
  .brand-by a {
    font-size: 10px !important;
    line-height: 1.05 !important;
  }

  .subhead,
  body[data-theme="dark"] .subhead {
    top: 64px !important;
    left: 20px !important;
    right: auto !important;
    width: min(270px, calc(100vw - 120px)) !important;
    max-width: none !important;
    color: #ff781e !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 11.8px !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: normal !important;
  }

  .top-actions {
    top: 10px !important;
    right: 9px !important;
    width: 78px !important;
    height: 72px !important;
  }

  .header-stax {
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    height: 72px !important;
    min-height: 72px !important;
    max-height: 72px !important;
    padding: 5px !important;
    display: grid !important;
    place-items: center !important;
    align-content: center !important;
    gap: 0 !important;
    text-align: center !important;
  }

  .header-stax img {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
  }

  .header-stax span {
    display: grid !important;
    place-items: center !important;
    gap: 0 !important;
  }

  .header-stax strong,
  .header-stax em {
    display: block !important;
    color: #171612 !important;
    font-size: 9px !important;
    line-height: 8.82px !important;
    font-weight: 950 !important;
    letter-spacing: .18px !important;
    text-transform: none !important;
    text-align: center !important;
  }

  .header-theme {
    left: 11px !important;
    bottom: 14px !important;
  }

  .stage-strip {
    width: min(430px, calc(100% - 18px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Mobile final numeric alignment: match Base/Launch top offsets and stage insets. */
@media (max-width: 560px) {
  .brand-block {
    top: 8px !important;
  }

  .stonepath-mark,
  .stonepath-icon {
    position: relative !important;
    top: 1px !important;
  }

  .top-actions {
    right: -10px !important;
  }

  .stage-tabs {
    padding-inline: 10px !important;
  }
}

/* Mobile source-of-truth lock: match Bridge header geometry and Passage tab centering. */
@media (max-width: 560px) {
  .brand-block {
    top: 9px !important;
    left: 1px !important;
    gap: 7px !important;
  }

  .stonepath-mark {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    flex-basis: 36px !important;
    position: relative !important;
    top: 0 !important;
    display: grid !important;
    place-items: center !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  .stonepath-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 0 !important;
    flex-basis: auto !important;
    position: static !important;
    top: auto !important;
    object-fit: contain !important;
    border-radius: 7px !important;
    transform: none !important;
  }

  .brand-copy {
    position: relative !important;
    left: -2px !important;
  }

  .top-actions {
    top: 10px !important;
    right: -10px !important;
    width: 78px !important;
    height: 72px !important;
  }

  .brand-name {
    position: relative !important;
    top: -1px !important;
  }

  .header-stax {
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    height: 72px !important;
    min-height: 72px !important;
    max-height: 72px !important;
    padding: 5px !important;
    display: grid !important;
    place-items: center !important;
    align-content: center !important;
    gap: 0 !important;
    text-align: center !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    letter-spacing: .18px !important;
  }

  .header-stax img {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
    position: relative !important;
    top: -1px !important;
  }

  .header-stax span {
    display: grid !important;
    place-items: center !important;
    gap: 0 !important;
    width: 38px !important;
    transform: none !important;
  }

  .header-stax strong,
  .header-stax em {
    display: block !important;
    color: #171612 !important;
    font-size: 9px !important;
    line-height: 8.82px !important;
    font-weight: 950 !important;
    letter-spacing: .18px !important;
    text-transform: none !important;
    text-align: center !important;
    transform: none !important;
  }

  .stage-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
    align-items: center !important;
    justify-content: stretch !important;
    padding-inline: 10px !important;
  }

  .stage-tab {
    display: grid !important;
    place-items: center !important;
    justify-content: center !important;
    align-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 36px !important;
    padding: 11px 5px 7px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center !important;
    white-space: normal !important;
  }

  .stage-tab span {
    display: none !important;
  }

  .ai-helper-bubble {
    position: fixed !important;
    right: max(16px, env(safe-area-inset-right)) !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
    z-index: 90 !important;
    display: grid !important;
    place-items: center !important;
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    padding: 0 !important;
    border: 2px solid #ff781e !important;
    border-radius: 999px !important;
    background: #fffaf4 !important;
    color: #ad4200 !important;
    box-shadow: 0 0 0 3px rgba(255, 120, 30, .18), 0 16px 36px rgba(8, 7, 15, .22), 0 0 26px rgba(255, 120, 30, .30) !important;
    font-family: "Space Mono", ui-monospace, SFMono-Regular, Consolas, monospace !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-align: center !important;
  }

  .version-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 15px !important;
    padding: 2px 7px !important;
    border: 1px solid rgba(255, 120, 30, .35) !important;
    border-radius: 999px !important;
    background: rgba(255, 250, 243, .86) !important;
    color: #ad4200 !important;
    box-shadow: 0 4px 10px rgba(31, 24, 14, .10) !important;
    font-size: 8.5px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-shadow: none !important;
  }

  body[data-theme="dark"] .version-badge {
    background: rgba(255, 250, 243, .92) !important;
    color: #ad4200 !important;
    border-color: rgba(255, 120, 30, .45) !important;
    text-shadow: none !important;
  }

  .subhead,
  body[data-theme="dark"] .subhead {
    width: min(188px, calc(100vw - 190px)) !important;
    max-width: 188px !important;
    white-space: pre-line !important;
    overflow-wrap: normal !important;
  }
}

/* Mobile hero tint: bring START closer to BASE's darker forest treatment. */
@media (max-width: 768px) {
  .topbar {
    background:
      radial-gradient(circle at 72% 29%, rgba(255, 176, 74, .18) 0%, rgba(255, 176, 74, .08) 12%, transparent 26%),
      linear-gradient(90deg, rgba(8, 7, 15, .96) 0%, rgba(8, 7, 15, .84) 45%, rgba(8, 7, 15, .44) 100%),
      linear-gradient(180deg, rgba(8, 7, 15, .30) 0%, rgba(8, 7, 15, .12) 50%, rgba(8, 7, 15, .58) 100%),
      url("assets/stonepath-hero-groundwork.png") 58% 62% / min(1180px, 118vw) auto no-repeat !important;
  }

  body[data-theme="dark"] .topbar {
    background:
      radial-gradient(circle at 72% 29%, rgba(255, 176, 74, .18) 0%, rgba(255, 176, 74, .08) 12%, transparent 26%),
      linear-gradient(90deg, rgba(8, 7, 15, .97) 0%, rgba(8, 7, 15, .85) 45%, rgba(8, 7, 15, .40) 100%),
      linear-gradient(180deg, rgba(8, 7, 15, .30) 0%, rgba(8, 7, 15, .10) 50%, rgba(8, 7, 15, .60) 100%),
      url("assets/stonepath-hero-groundwork.png") 58% 62% / min(1180px, 118vw) auto no-repeat !important;
  }
}

/* Final mobile version pill lock: keep START crisp in both themes. */
@media (max-width: 560px) {
  .version-badge,
  body:not([data-theme="dark"]) .version-badge,
  body[data-theme="dark"] .version-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 15px !important;
    padding: 2px 7px !important;
    border: 1px solid rgba(255, 120, 30, .35) !important;
    border-radius: 999px !important;
    background: rgba(255, 250, 243, .92) !important;
    color: #ad4200 !important;
    box-shadow: 0 4px 10px rgba(31, 24, 14, .10) !important;
    font-size: 8.5px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-shadow: none !important;
  }
}

/* Final dark mobile stage surface: warm separation from the forest header. */
@media (max-width: 560px) {
  body[data-theme="dark"] .stage-strip {
    border-color: rgba(255, 120, 30, .20) !important;
    background:
      radial-gradient(circle at 50% -34%, rgba(255, 120, 30, .16), transparent 72%),
      linear-gradient(180deg, rgba(18, 11, 13, .98), rgba(10, 8, 12, .96)) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 120, 30, .08) !important;
  }

  body[data-theme="dark"] .readiness-track {
    background: rgba(255, 176, 106, .16) !important;
  }
}

/* Final START mobile rail height lock: theme changes must not resize the stage/progress bar. */
@media (max-width: 560px) {
  .stage-tabs,
  body[data-theme="dark"] .stage-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, 36px) !important;
    min-height: 72px !important;
    height: 76px !important;
    gap: 4px !important;
  }

  .stage-tab,
  body[data-theme="dark"] .stage-tab,
  body[data-theme="dark"] .stage-tab:not(.active),
  body[data-theme="dark"] .stage-tab.active {
    min-height: 36px !important;
    height: 36px !important;
    padding: 11px 5px 7px !important;
  }
}

/* Desktop web pass: tuck START's stage/progress rail up into the header edge. */
@media (min-width: 901px) {
  .stage-strip {
    top: 180px !important;
    margin-top: -14px !important;
    margin-bottom: -14px !important;
    transform: translateY(-14px) !important;
  }
}

/* Desktop web punch-list pass: stable rail, crisp version pill, and readable modal controls. */
.version-badge,
body:not([data-theme="dark"]) .version-badge,
body[data-theme="dark"] .version-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 16px !important;
  padding: 2px 7px !important;
  border: 1px solid rgba(255, 120, 30, .38) !important;
  border-radius: 999px !important;
  background: rgba(255, 250, 243, .94) !important;
  color: #ad4200 !important;
  box-shadow: 0 4px 10px rgba(31, 24, 14, .12) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-shadow: none !important;
}

body[data-theme="dark"] .route-panel .route-choice-row strong,
body[data-theme="dark"] .route-panel .route-choice-row b,
body[data-theme="dark"] .route-choice-guide .route-choice-row strong,
body[data-theme="dark"] .route-choice-guide .route-choice-row b {
  color: #ff781e !important;
  text-shadow: none !important;
}

#one-close.help-close,
body[data-theme="dark"] #one-close.help-close {
  display: inline-grid !important;
  place-items: center !important;
  width: 34px !important;
  height: 34px !important;
  border: 1px solid rgba(255, 120, 30, .55) !important;
  border-radius: 9px !important;
  background: #fffaf4 !important;
  color: #171612 !important;
  box-shadow: 0 0 0 3px rgba(255, 120, 30, .12), 0 8px 18px rgba(31, 24, 14, .14) !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-shadow: none !important;
}

#one-close.help-close:hover,
#one-close.help-close:focus-visible,
body[data-theme="dark"] #one-close.help-close:hover,
body[data-theme="dark"] #one-close.help-close:focus-visible {
  background: #fff2e3 !important;
  color: #ad4200 !important;
  outline: 2px solid rgba(255, 120, 30, .38) !important;
  outline-offset: 2px !important;
}

@media (min-width: 901px) {
  .subhead,
  body[data-theme="dark"] .subhead {
    top: 76px !important;
    left: max(70px, calc((100vw - 1120px) / 2 + 70px)) !important;
    right: max(160px, calc((100vw - 1120px) / 2 + 160px)) !important;
    transform: none !important;
    text-align: left !important;
  }

  .stage-strip,
  body[data-theme="dark"] .stage-strip {
    top: 180px !important;
    margin-top: -14px !important;
    margin-bottom: -14px !important;
    transform: translateY(-14px) !important;
    min-height: 86px !important;
    height: 86px !important;
    padding: 0 0 8px !important;
    box-sizing: border-box !important;
  }

  .stage-strip-inner,
  body[data-theme="dark"] .stage-strip-inner {
    height: 78px !important;
    min-height: 78px !important;
    box-sizing: border-box !important;
    align-content: center !important;
  }

  .stage-tabs,
  body[data-theme="dark"] .stage-tabs {
    min-height: 56px !important;
    height: 56px !important;
    align-items: center !important;
  }

  .stage-tab,
  body[data-theme="dark"] .stage-tab,
  body[data-theme="dark"] .stage-tab:not(.active),
  body[data-theme="dark"] .stage-tab.active {
    min-height: 56px !important;
    height: 56px !important;
    padding-top: 15px !important;
    padding-bottom: 12px !important;
    box-sizing: border-box !important;
  }

  .readiness-track,
  body[data-theme="dark"] .readiness-track {
    height: 8px !important;
  }
}

@media (max-width: 560px) {
  .version-badge,
  body:not([data-theme="dark"]) .version-badge,
  body[data-theme="dark"] .version-badge {
    min-height: 15px !important;
    padding: 2px 7px !important;
    font-size: 8.5px !important;
  }
}

/* Local support-panel calm-down: keep the warning/readiness meaning, reduce border weight. */
.safety-panel,
body[data-theme="dark"] .safety-panel {
  border: 1px solid rgba(255, 59, 48, .56) !important;
  box-shadow: 0 0 0 1px rgba(255, 59, 48, .05) !important;
}

.safety-panel .note-list li,
body[data-theme="dark"] .safety-panel .note-list li {
  border-left-width: 2px !important;
  border-left-color: rgba(255, 59, 48, .56) !important;
}

.progress-panel,
body[data-theme="dark"] .progress-panel {
  border: 1px solid rgba(255, 122, 26, .58) !important;
  box-shadow: 0 0 0 1px rgba(255, 120, 30, .06) !important;
}

.progress-panel .handoff-item,
body[data-theme="dark"] .progress-panel .handoff-item {
  border: 1px solid rgba(255, 122, 26, .58) !important;
  border-left-width: 2px !important;
  box-shadow: none !important;
}

.progress-panel .handoff-status,
body[data-theme="dark"] .progress-panel .handoff-status,
.progress-panel .panel-heading .badge,
.progress-panel .panel-heading .badge.ready,
.progress-panel .panel-heading .badge.in-progress,
body[data-theme="dark"] .progress-panel .panel-heading .badge,
body[data-theme="dark"] .progress-panel .panel-heading .badge.ready,
body[data-theme="dark"] .progress-panel .panel-heading .badge.in-progress {
  border-width: 1px !important;
}

.progress-panel .handoff-item.ready-item,
body[data-theme="dark"] .progress-panel .handoff-item.ready-item {
  border: 1px solid rgba(39, 190, 117, .62) !important;
  border-left-width: 2px !important;
  box-shadow: none !important;
}

.progress-panel:has(.handoff-item.ready-item):not(:has(.handoff-item:not(.ready-item))),
body[data-theme="dark"] .progress-panel:has(.handoff-item.ready-item):not(:has(.handoff-item:not(.ready-item))) {
  box-shadow: 0 0 0 1px rgba(39, 190, 117, .08) !important;
}

body[data-theme="dark"] .route-choice-guide .route-choice-row .help-button,
body[data-theme="dark"] .route-choice-guide .route-choice-row .help-button:hover,
body[data-theme="dark"] .route-choice-guide .route-choice-row .help-button:focus-visible {
  border-color: rgba(255, 120, 30, .48) !important;
  background: rgba(255, 250, 243, .96) !important;
  color: #ad4200 !important;
  opacity: 1 !important;
  box-shadow: 0 2px 8px rgba(31, 24, 14, .12) !important;
}

/* Dark route fields must stay readable after Enter commits the text. */
body[data-theme="dark"] .snapshot-panel #business-type,
body[data-theme="dark"] .snapshot-panel #business-type[readonly],
body[data-theme="dark"] .snapshot-panel #business-type:not(:placeholder-shown),
body[data-theme="dark"] .snapshot-panel #business-type[readonly]:not(:placeholder-shown),
body[data-theme="dark"] .snapshot-panel #business-type:focus {
  border-color: rgba(255, 120, 30, .44) !important;
  background: rgba(255, 250, 244, .98) !important;
  color: #171612 !important;
  -webkit-text-fill-color: #171612 !important;
  caret-color: var(--sp-orange) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 120, 30, .10) !important;
}

body[data-theme="dark"] .snapshot-panel #business-type::placeholder {
  color: rgba(23, 22, 18, .54) !important;
  -webkit-text-fill-color: rgba(23, 22, 18, .54) !important;
}

/* Keep completed readiness rows green in dark mode, matching the light theme. */
body[data-theme="dark"] .progress-panel .handoff-item.ready-item {
  border-color: rgba(39, 190, 117, .68) !important;
  background: rgba(224, 250, 234, .96) !important;
  color: #171612 !important;
}

body[data-theme="dark"] .progress-panel .handoff-item.ready-item strong,
body[data-theme="dark"] .progress-panel .handoff-item.ready-item p {
  color: #171612 !important;
}

body[data-theme="dark"] .progress-panel .handoff-item.ready-item .handoff-status.ready {
  border-color: var(--green-strong) !important;
  background: var(--green-strong) !important;
  color: #fff !important;
}

/* Completed handoff actions read as two deliberate rows. */
.print-ready-panel.completed .handoff-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(150px, 1fr)) !important;
  gap: 10px !important;
  width: min(470px, 100%) !important;
}

.print-ready-panel.completed .handoff-actions .print-pill {
  width: 100% !important;
  min-height: 44px !important;
}

.print-ready-panel.completed #download-plan {
  order: 1;
}

.print-ready-panel.completed #copy-plan {
  order: 2;
}

.print-ready-panel.completed #print-plan {
  order: 3;
}

.print-ready-panel.completed #passage-link {
  order: 4;
}

/* Mobile scroll rail: header leaves with the page, progress stays pinned. */
@media (max-width: 560px) {
  .topbar {
    position: relative !important;
    top: auto !important;
    z-index: 1 !important;
  }

  .stage-strip,
  body[data-theme="dark"] .stage-strip {
    position: sticky !important;
    top: 0 !important;
    z-index: 60 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    transform: none !important;
  }

  .stage-strip {
    border-color: rgba(31, 27, 22, .10) !important;
    background: rgba(255, 255, 255, .82) !important;
    box-shadow: 0 10px 24px rgba(31, 27, 22, .10), inset 0 1px 0 rgba(255, 255, 255, .62) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  body[data-theme="dark"] .stage-strip {
    border-color: rgba(255, 120, 30, .20) !important;
    background:
      radial-gradient(circle at 50% -34%, rgba(255, 120, 30, .16), transparent 72%),
      linear-gradient(180deg, rgba(18, 11, 13, .92), rgba(10, 8, 12, .88)) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 120, 30, .08) !important;
  }

  .subhead,
  body[data-theme="dark"] .subhead {
    right: 94px !important;
    font-size: 10px !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .top-actions {
    top: auto !important;
    right: -10px !important;
    bottom: 14px !important;
    width: 78px !important;
    height: 72px !important;
  }
}

/* Mobile ONE button lock: canonical START size and placement. */
@media (max-width: 560px) {
  .top-actions {
    top: auto !important;
    right: -10px !important;
    bottom: 14px !important;
    width: 78px !important;
    height: 72px !important;
  }

  .header-stax {
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    height: 72px !important;
    min-height: 72px !important;
    max-height: 72px !important;
    padding: 5px !important;
  }

  .header-stax img {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
  }
}

/* Desktop web lock: match BASE/LAUNCH rail height and center the ONE button vertically. */
@media (min-width: 901px) {
  .topbar {
    margin-bottom: 0 !important;
  }

  .top-actions {
    top: calc(50% - 2px) !important;
    transform: translateY(-50%) !important;
  }

  .stage-strip,
  body[data-theme="dark"] .stage-strip {
    top: 194px !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 16px 10px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    transform: none !important;
  }

  .stage-strip-inner,
  body[data-theme="dark"] .stage-strip-inner {
    height: auto !important;
    min-height: 86px !important;
  }
}

/* Ready section polish: keep green success, but reduce the heavy outer outline. */
.collapsible-section.is-step-ready:not(.is-collapsed):not(.check-item),
.collapsible-section.finished-area:not(.is-collapsed):not(.check-item),
body[data-theme="dark"] .collapsible-section.is-step-ready:not(.is-collapsed):not(.check-item),
body[data-theme="dark"] .collapsible-section.finished-area:not(.is-collapsed):not(.check-item) {
  border-width: 3px !important;
  box-shadow:
    0 0 0 1px rgba(39, 190, 117, .34),
    0 0 14px rgba(39, 190, 117, .16) !important;
}

.collapsible-section.is-step-ready.is-collapsed:not(.check-item) > .panel-heading,
.collapsible-section.finished-area.is-collapsed:not(.check-item) > .panel-heading,
.collapsible-section.is-step-ready.is-collapsed:not(.check-item) > .work-header,
.collapsible-section.finished-area.is-collapsed:not(.check-item) > .work-header,
body[data-theme="dark"] .collapsible-section.is-step-ready.is-collapsed:not(.check-item) > .panel-heading,
body[data-theme="dark"] .collapsible-section.finished-area.is-collapsed:not(.check-item) > .panel-heading,
body[data-theme="dark"] .collapsible-section.is-step-ready.is-collapsed:not(.check-item) > .work-header,
body[data-theme="dark"] .collapsible-section.finished-area.is-collapsed:not(.check-item) > .work-header {
  border-width: 3px !important;
  box-shadow:
    0 0 0 1px rgba(39, 190, 117, .34),
    0 0 14px rgba(39, 190, 117, .16) !important;
}

/* Public preview locks: visible controls, no live interaction until unlock. */
.stage-next-panel:not(.hidden) {
  display: grid !important;
}

.stage-next-panel.locked {
  border-color: var(--sp-orange);
  background: rgba(255, 120, 30, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 120, 30, 0.32),
    0 0 20px rgba(255, 120, 30, 0.14);
}

.stage-next-panel.locked h2 {
  color: #b64500;
}

.check-item.workflow-step.preview-locked {
  cursor: default;
}

.check-item.workflow-step.preview-locked input,
.check-item.workflow-step.preview-locked .inline-help {
  cursor: not-allowed;
}

.collapsible-section.preview-locked-section > .panel-heading,
.collapsible-section.preview-locked-section > .work-header {
  cursor: not-allowed !important;
}

.collapsible-section.preview-locked-section.is-collapsed:not(.check-item):hover,
.collapsible-section.preview-locked-section.is-collapsed:not(.check-item):focus-within {
  transform: none !important;
}

/* Final Groundwork accessibility contrast lock. */
.stage-tab.active,
body[data-theme="dark"] .stage-tab.active {
  color: #944000 !important;
}

.stage-guide-panel h2,
#stage-guide-title {
  color: #7f3300 !important;
}

body[data-theme="dark"] .stage-tab.active,
body[data-theme="dark"] .stage-tab.active span,
body[data-theme="dark"] .stage-tab.done.active span {
  color: #ff8a2a !important;
  text-shadow: 0 0 14px rgba(255, 120, 30, .22) !important;
}

body[data-theme="dark"] .stage-guide-panel h2,
body[data-theme="dark"] #stage-guide-title {
  color: #ff8a2a !important;
  text-shadow: 0 0 14px rgba(255, 120, 30, .18) !important;
}

.progress-panel .panel-heading .badge.in-progress,
body[data-theme="dark"] .progress-panel .panel-heading .badge.in-progress,
#handoff-count.in-progress {
  background: #944000 !important;
  border-color: #944000 !important;
  color: #ffffff !important;
}

/* Footer lock: match Passage's footer type and wrapping in light/dark, web/mobile. */
.app-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  width: min(900px, calc(100% - 32px)) !important;
  margin: 28px auto 54px !important;
  color: #171612 !important;
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

.app-footer b {
  color: #171612 !important;
}

.app-footer a {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 28px !important;
  padding: 5px 11px !important;
  border: 1px solid rgba(31, 27, 22, .12) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .72) !important;
  color: #6a6272 !important;
  font: inherit !important;
  text-decoration: none !important;
}

body[data-theme="dark"] .app-footer,
body[data-theme="dark"] .app-footer b {
  color: #fffaf4 !important;
}

/* START final AI placement: web/tablet uses Before You Act space; mobile stays compact. */
@media (min-width: 561px) {
  .ai-helper-bubble {
    left: max(72px, calc((100vw - 1180px) / 2 + 24px)) !important;
    right: auto !important;
    bottom: max(24px, env(safe-area-inset-bottom)) !important;
    box-sizing: border-box !important;
    width: 118px !important;
    height: 85px !important;
    min-width: 118px !important;
    min-height: 85px !important;
    max-width: 118px !important;
    max-height: 85px !important;
  }
}

@media (min-width: 1280px) {
  .ai-helper-bubble {
    left: calc((100vw - 1180px) / 2 + 24px) !important;
  }
}

@media (min-width: 561px) and (min-height: 900px) and (max-width: 1279px) {
  .ai-helper-bubble {
    bottom: max(84px, env(safe-area-inset-bottom)) !important;
  }
}

@media (min-width: 1280px) and (min-height: 900px) {
  .ai-helper-bubble {
    bottom: max(112px, env(safe-area-inset-bottom)) !important;
  }
}

@media (min-width: 561px) and (max-height: 899px) {
  .ai-helper-bubble {
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 560px) {
  .ai-helper-bubble {
    left: auto !important;
    right: max(16px, env(safe-area-inset-right)) !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
    box-sizing: border-box !important;
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;
    max-width: 54px !important;
    max-height: 54px !important;
    padding: 0 !important;
  }

  .ai-helper-bubble span {
    width: 54px !important;
    height: 54px !important;
  }

  .ai-helper-bubble b {
    display: none !important;
  }
}

/* Last wordmark lock: Stone grey, Path white, app name orange italic, mobile-safe. */
.brand-name {
  display: inline-flex !important;
  grid-area: name !important;
  align-items: baseline !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

.brand-wordmark {
  grid-template-columns: max-content max-content !important;
  column-gap: 8px !important;
}

.brand-by,
.brand-by a {
  display: none !important;
}

.brand-start {
  color: #77716b !important;
  font-style: normal !important;
}

body:not([data-theme="dark"]) .brand-start,
body[data-theme="dark"] .brand-start {
  color: #77716b !important;
  font-style: normal !important;
}

.brand-path {
  color: #fff !important;
  font-style: normal !important;
}

.brand-app-name {
  color: #f36f21 !important;
  font-style: italic !important;
  font-weight: 800 !important;
  margin-left: .2em !important;
}

.version-badge {
  grid-area: version !important;
  width: auto !important;
  min-width: 44px !important;
  max-width: none !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  justify-content: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
  padding-inline: 7px !important;
}

@media (max-width: 560px) {
  .brand-block {
    max-width: calc(100% - 18px) !important;
  }

  .brand-name {
    font-size: clamp(21px, 5.9vw, 24px) !important;
    line-height: .96 !important;
  }
}

@media (min-width: 561px) and (max-width: 920px) {
  .brand-name {
    font-size: clamp(26px, 3.55vw, 30px) !important;
    line-height: .96 !important;
  }
}

/* Mobile tagline reset: align under the wordmark, close to the name. */
@media (max-width: 560px) {
  .subhead,
  body[data-theme="dark"] .subhead {
    left: 62px !important;
    right: 112px !important;
    top: 40px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    text-align: left !important;
    font-size: 10px !important;
    line-height: 1.18 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
}

/* Mobile sticky stage rail lock: keep the stage bar pinned while the header scrolls away. */
@media (max-width: 560px) {
  html {
    overflow-y: visible !important;
  }

  body {
    overflow-x: clip !important;
    overflow-y: visible !important;
  }

  .stage-strip,
  body[data-theme="dark"] .stage-strip {
    position: sticky !important;
    top: 0 !important;
    z-index: 80 !important;
    margin-top: 0 !important;
    transform: none !important;
  }
}

/* Shared ONE modal lock: Groundwork, Passage, and Bridge use the same window language. */
.one-card:not(.pricing-card),
body[data-theme="dark"] .one-card:not(.pricing-card) {
  position: relative !important;
  display: grid !important;
  width: min(680px, calc(100vw - 28px)) !important;
  max-height: min(86vh, 860px) !important;
  gap: 18px !important;
  overflow: auto !important;
  padding: 22px !important;
  border: 2px solid #ff781e !important;
  border-radius: 14px !important;
  background: #fffaf4 !important;
  color: #171612 !important;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .34) !important;
}

.one-card:not(.pricing-card) .help-close,
body[data-theme="dark"] .one-card:not(.pricing-card) .help-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 34px !important;
  height: 34px !important;
  border: 1px solid rgba(255, 120, 30, .58) !important;
  border-radius: 10px !important;
  background: #fffaf4 !important;
  color: #171612 !important;
  font-size: 18px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

.one-card:not(.pricing-card) h2 {
  margin: 0 44px 0 0 !important;
  color: #171612 !important;
  font-size: 24px !important;
  line-height: 1.14 !important;
}

.one-card:not(.pricing-card) > p {
  margin: 0 !important;
  color: #171612 !important;
  font-size: 15px !important;
  line-height: 1.42 !important;
}

.one-card:not(.pricing-card) .one-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(210px, .75fr) !important;
  gap: 12px !important;
}

.one-card:not(.pricing-card) .one-grid > section,
.one-card:not(.pricing-card) .one-grid > div {
  display: grid !important;
  gap: 6px !important;
  padding: 12px !important;
  border: 1px solid rgba(31, 27, 22, .16) !important;
  border-radius: 12px !important;
  background: #fffaf4 !important;
}

.one-card:not(.pricing-card) .one-kicker,
.one-card:not(.pricing-card) .one-grid span {
  color: #ad4200 !important;
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  letter-spacing: .1em !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
}

.one-card:not(.pricing-card) .one-grid strong,
.one-card:not(.pricing-card) .one-grid b {
  color: #171612 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

.one-card:not(.pricing-card) .one-grid p {
  margin: 0 !important;
  color: #5f5962 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

.one-card:not(.pricing-card) .one-merge-note {
  grid-column: 1 / -1 !important;
  border-color: rgba(255, 120, 30, .28) !important;
  background: rgba(255, 120, 30, .08) !important;
}

.one-card:not(.pricing-card) .one-note {
  margin: 0 !important;
  padding: 12px !important;
  border: 1px solid #d8e3e9 !important;
  border-radius: 8px !important;
  background: #eef3f5 !important;
  color: #171612 !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

.one-card:not(.pricing-card) .one-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

.one-card:not(.pricing-card) .one-action-primary,
.one-card:not(.pricing-card) .one-action-secondary {
  min-height: 44px !important;
  padding: 10px 16px !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

.one-card:not(.pricing-card) .one-action-primary {
  border: 0 !important;
  background: #ff781e !important;
  color: #fff !important;
}

.one-card:not(.pricing-card) .one-action-secondary {
  border: 1px solid rgba(31, 27, 22, .18) !important;
  background: #fffaf4 !important;
  color: #171612 !important;
}

@media (max-width: 560px) {
  .one-card:not(.pricing-card),
  body[data-theme="dark"] .one-card:not(.pricing-card) {
    width: min(346px, calc(100vw - 28px)) !important;
    max-height: min(82vh, 760px) !important;
    gap: 16px !important;
    padding: 20px !important;
  }

  .one-card:not(.pricing-card) h2 {
    font-size: 24px !important;
    line-height: 1.18 !important;
  }

  .one-card:not(.pricing-card) .one-grid {
    grid-template-columns: 1fr !important;
  }

  .one-card:not(.pricing-card) .one-merge-note {
    grid-column: auto !important;
  }

  .one-card:not(.pricing-card) .one-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}

/* View-specific header rulebook: each view owns its tagline placement. */
@media (min-width: 921px) {
  .subhead,
  body[data-theme="dark"] .subhead {
    left: max(62px, calc((100vw - 1120px) / 2 + 62px)) !important;
    right: max(160px, calc((100vw - 1120px) / 2 + 160px)) !important;
    top: 76px !important;
    max-width: 600px !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
  }
}

@media (min-width: 561px) and (max-width: 920px) {
  .subhead,
  body[data-theme="dark"] .subhead {
    left: calc((100vw - min(920px, calc(100vw - 96px))) / 2 + 62px) !important;
    right: auto !important;
    top: 54px !important;
    width: max-content !important;
    max-width: min(420px, calc(100vw - 300px)) !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
  }
}

@media (max-width: 560px) {
  .subhead,
  body[data-theme="dark"] .subhead {
    left: 62px !important;
    right: 112px !important;
    top: 40px !important;
    max-width: none !important;
    font-size: 10px !important;
    line-height: 1.18 !important;
    white-space: nowrap !important;
  }
}

/* Groundwork header lock: the tagline starts exactly under the wordmark, not the viewport. */
.subhead,
body[data-theme="dark"] .subhead {
  left: var(--groundwork-subhead-left, 62px) !important;
  right: auto !important;
  top: var(--groundwork-subhead-top, 76px) !important;
  width: max-content !important;
  max-width: var(--groundwork-subhead-max-width, min(600px, calc(100vw - 220px))) !important;
  transform: none !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

/* Groundwork mobile tagline: keep the phrase on one line. */
@media (max-width: 560px) {
  .subhead,
  body[data-theme="dark"] .subhead {
    max-width: calc(100vw - 158px) !important;
    white-space: nowrap !important;
    overflow: visible !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    font-size: clamp(8px, 2.55vw, 10px) !important;
  }
}

/* Paid helper depth: stage and section-specific Groundwork assistant notes. */
.help-modal[data-ai-mode="true"] .help-card {
  width: min(760px, calc(100vw - 32px)) !important;
  max-height: min(84vh, 860px) !important;
  overflow: auto !important;
}

.assistant-help-shell {
  display: grid !important;
  gap: 14px !important;
}

.assistant-note-card,
.assistant-stage-facts,
.assistant-section-grid,
.assistant-question-box {
  display: grid !important;
  gap: 8px !important;
  padding: 12px !important;
  border: 1px solid rgba(177, 83, 15, .22) !important;
  border-radius: 10px !important;
  background: #fffaf4 !important;
}

.assistant-note-card.primary {
  border-color: rgba(24, 117, 77, .36) !important;
  background: #edf8f0 !important;
}

.assistant-note-card.warning {
  border-color: rgba(215, 25, 32, .26) !important;
  background: #fff3ee !important;
}

.assistant-note-card strong,
.assistant-stage-facts strong,
.assistant-section-grid > strong,
.assistant-question-box strong {
  color: #171612 !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  line-height: 1.15 !important;
}

.assistant-note-card p,
.assistant-stage-facts li,
.assistant-question-box p {
  margin: 0 !important;
  color: #524a43 !important;
  font-size: 14px !important;
  line-height: 1.42 !important;
}

.assistant-stage-facts ul {
  display: grid !important;
  gap: 5px !important;
  margin: 0 !important;
  padding-left: 18px !important;
}

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

.assistant-section-grid > strong {
  grid-column: 1 / -1 !important;
}

.assistant-question-box textarea {
  width: 100% !important;
  min-height: 82px !important;
  resize: vertical !important;
  box-sizing: border-box !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(31, 27, 22, .18) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #171612 !important;
  font: inherit !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

.assistant-question-actions,
.assistant-question-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.assistant-question-actions button,
.assistant-question-chips button {
  min-height: 34px !important;
  padding: 8px 11px !important;
  border: 1px solid rgba(255, 113, 24, .34) !important;
  border-radius: 999px !important;
  background: #fffaf4 !important;
  color: #a54100 !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  cursor: pointer !important;
}

.assistant-question-actions button {
  border-color: transparent !important;
  background: var(--sp-orange) !important;
  color: #fff !important;
}

.assistant-response {
  padding: 11px 12px !important;
  border: 1px solid rgba(24, 117, 77, .28) !important;
  border-radius: 10px !important;
  background: #f3fbf4 !important;
}

.assistant-live-note {
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(31, 27, 22, .12) !important;
  border-radius: 10px !important;
  background: #f6f1e8 !important;
  color: #5e5148 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

body[data-theme="dark"] .assistant-note-card,
body[data-theme="dark"] .assistant-stage-facts,
body[data-theme="dark"] .assistant-section-grid,
body[data-theme="dark"] .assistant-question-box,
body[data-theme="dark"] .assistant-live-note {
  background: #fffaf4 !important;
  color: #171612 !important;
}

@media (max-width: 700px) {
  .help-modal[data-ai-mode="true"] .help-card {
    width: min(94vw, 560px) !important;
  }

  .assistant-section-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Final app-header art stage: centered app-width canvas, not a full webpage banner. */
:root {
  --groundwork-header-art-x: 88%;
  --groundwork-header-art-y: 120%;
  --groundwork-header-art-size: 445px;
  --groundwork-header-art-opacity: 1;
}

.topbar,
body[data-theme="dark"] .topbar {
  background: transparent !important;
  border-bottom-color: transparent !important;
  overflow: hidden !important;
  isolation: isolate !important;
}

.topbar::before,
body[data-theme="dark"] .topbar::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: min(1168px, calc(100% - 48px)) !important;
  margin-inline: auto !important;
  background:
    linear-gradient(90deg, rgba(5, 5, 7, .88) 0%, rgba(5, 5, 7, .44) 28%, rgba(5, 5, 7, .28) 68%, rgba(5, 5, 7, .78) 100%),
    url("assets/stonepath-hero-groundwork.png") var(--groundwork-header-art-x) var(--groundwork-header-art-y) / var(--groundwork-header-art-size) auto no-repeat,
    linear-gradient(#050507, #050507) !important;
  opacity: var(--groundwork-header-art-opacity) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

.topbar-row {
  position: relative !important;
  z-index: 1 !important;
}

.subhead {
  z-index: 1 !important;
}

.top-actions {
  position: absolute !important;
  z-index: 2 !important;
}

@media (min-width: 561px) and (max-width: 920px) {
  :root {
    --groundwork-header-art-x: 57%;
    --groundwork-header-art-y: 120%;
    --groundwork-header-art-size: 400px;
    --groundwork-header-art-opacity: 1;
  }

  .topbar::before,
  body[data-theme="dark"] .topbar::before {
    right: auto !important;
    width: calc(100% - 48px) !important;
    margin-left: 48px !important;
    margin-right: 0 !important;
  }
}

@media (max-width: 560px) {
  :root {
    --groundwork-header-art-x: 48%;
    --groundwork-header-art-y: 120%;
    --groundwork-header-art-size: 315px;
    --groundwork-header-art-opacity: 1;
  }

  .topbar::before,
  body[data-theme="dark"] .topbar::before {
    width: min(430px, calc(100% - 18px)) !important;
  }
}

/* Groundwork mobile seam lock: header and stage rail must touch as one unit. */
@media (max-width: 560px) {
  .topbar,
  body[data-theme="dark"] .topbar {
    margin-bottom: 0 !important;
  }

  .stage-strip,
  body[data-theme="dark"] .stage-strip {
    margin-top: -1px !important;
    border-top-width: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
  }

  .stage-strip-inner,
  body[data-theme="dark"] .stage-strip-inner {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
  }
}

.groundwork-header-art-tool {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 50000;
  width: min(320px, calc(100vw - 36px));
  padding: 14px;
  border: 1px solid rgba(255, 120, 30, .42);
  border-radius: 10px;
  background: rgba(5, 5, 7, .90);
  color: #fffaf3;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  backdrop-filter: blur(16px);
  font-family: inherit;
}

.groundwork-header-art-tool h2 {
  margin: 0 0 10px;
  color: #fffaf3;
  font-size: 14px;
  line-height: 1.2;
}

.groundwork-header-art-tool label {
  display: grid;
  grid-template-columns: 78px 1fr 48px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  color: rgba(255, 250, 243, .82);
  font-size: 12px;
  font-weight: 800;
}

.groundwork-header-art-tool input[type="range"] {
  width: 100%;
  accent-color: #ff781e;
}

.groundwork-header-art-tool output {
  color: #ffb36a;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.groundwork-header-art-tool-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.groundwork-header-art-tool button {
  min-height: 34px;
  border: 1px solid rgba(255, 120, 30, .45);
  border-radius: 8px;
  background: rgba(255, 120, 30, .14);
  color: #fffaf3;
  font-weight: 900;
  cursor: pointer;
}

.groundwork-header-art-tool button:hover,
.groundwork-header-art-tool button:focus-visible {
  background: rgba(255, 120, 30, .24);
  outline: none;
}

.groundwork-header-art-tool-note {
  margin: 10px 0 0;
  color: rgba(255, 250, 243, .66);
  font-size: 11px;
  line-height: 1.35;
}

/* Responsive header edge rule: tablet and mobile use full-bleed header canvases. */
@media (max-width: 920px) {
  .shell > .topbar,
  body[data-theme="dark"] .shell > .topbar,
  .topbar,
  body[data-theme="dark"] .topbar,
  .shell > .topbar::before,
  body[data-theme="dark"] .shell > .topbar::before,
  .topbar::before,
  body[data-theme="dark"] .topbar::before {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-inline: 0 !important;
  }

  .shell > .topbar,
  body[data-theme="dark"] .shell > .topbar,
  .topbar,
  body[data-theme="dark"] .topbar {
    border-left-width: 0 !important;
    border-right-width: 0 !important;
    border-top-width: 0 !important;
    box-sizing: border-box !important;
  }
}

@media (min-width: 561px) and (max-width: 920px) {
  .shell > .topbar,
  body[data-theme="dark"] .shell > .topbar,
  .topbar,
  body[data-theme="dark"] .topbar {
    width: calc(100% + 48px) !important;
    margin-left: -24px !important;
    margin-right: -24px !important;
    margin-inline: -24px !important;
  }
}

/* Groundwork tablet: ONE aligns to the outer right edge of the stage rail. */
@media (min-width: 561px) and (max-width: 920px) {
  .top-actions {
    right: 0 !important;
  }
}

/* Groundwork walkthrough rail: let the brand header scroll away, keep stages reachable. */
html {
  overflow-y: visible !important;
  scrollbar-gutter: stable;
}

body {
  overflow-x: clip !important;
  overflow-y: visible !important;
}

.topbar,
body[data-theme="dark"] .topbar {
  position: relative !important;
  top: auto !important;
  z-index: 1 !important;
}

.stage-strip,
body[data-theme="dark"] .stage-strip {
  position: sticky !important;
  top: 0 !important;
  z-index: 80 !important;
  margin-top: 0 !important;
  transform: none !important;
  background: rgba(255, 253, 249, .96) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: 0 8px 22px rgba(33, 25, 18, .08) !important;
}

body[data-theme="dark"] .stage-strip {
  background: rgba(24, 18, 15, .94) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .24) !important;
}

/* SolidOATH Core logo refresh: the supplied image is the full badge. */
.header-stax,
body[data-theme="dark"] .header-stax {
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.header-stax > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 102px !important;
  max-height: 102px !important;
  flex: 0 0 auto !important;
  object-fit: contain !important;
  border-radius: 18px !important;
  filter: drop-shadow(0 12px 22px rgba(255, 106, 0, .2)) !important;
}

.header-stax > span {
  display: none !important;
}

@media (max-width: 560px) {
  .header-stax > img {
    max-width: 76px !important;
    max-height: 76px !important;
    border-radius: 14px !important;
  }
}
