.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 194px;
  display: block;
  padding: 14px 18px 24px;
  border-bottom: 0.5px solid var(--sp-border);
  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("../public/stonepath-hero-passage.png") 82% 56% / min(1120px, 72vw) auto no-repeat;
  backdrop-filter: blur(14px);
  overflow: visible;
}

.topbar-row,
.top-actions,
.tagline,
.header-workspace-chip,
.header-theme {
  position: relative;
  z-index: 1;
}

.topbar-row {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: grid;
  grid-template-columns: 58px minmax(0, auto);
  align-items: start;
  column-gap: 12px;
  text-decoration: none;
  color: var(--sp-text);
  min-width: 0;
  max-width: calc(100% - 340px);
}

.logo-mark {
  width: 58px;
  height: auto;
  flex: 0 0 58px;
  display: block;
  border-radius: 10px;
}

.title-lockup {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 9px;
  row-gap: 2px;
  line-height: 1;
  min-width: 0;
  padding-top: 2px;
}

.product {
  font-weight: 800;
  font-size: 48px;
  line-height: 0.92;
}

.product span { color: rgba(255,255,255,0.54); }
.product strong { color: var(--sp-orange); }

.byline {
  align-self: baseline;
  padding-bottom: 0;
  font-size: 16px;
  line-height: 1;
  color: rgba(255,255,255,0.78);
  font-weight: 800;
  white-space: nowrap;
}

.version {
  align-self: baseline;
  transform: translateY(-2px);
  border: 0.5px solid var(--sp-border);
  border-radius: 999px;
  padding: 2px 6px;
  color: rgba(255,255,255,0.78);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.12);
}

.tagline {
  position: absolute;
  left: 50%;
  right: auto;
  top: 50%;
  width: min(720px, calc(100% - 360px));
  transform: translate(-50%, -50%);
  margin: 0;
  min-width: 0;
  color: var(--sp-orange);
  font-family: var(--sp-mono);
  font-size: clamp(14px, 1.55vw, 21px);
  line-height: 1.35;
  font-weight: 800;
  text-align: center;
}

.tagline::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--sp-orange);
  animation: blink 900ms steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.top-actions {
  position: absolute;
  top: 0;
  right: 0;
  width: 128px;
  height: 166px;
  display: block;
  align-items: flex-start;
}

.header-account {
  position: absolute;
  right: 0;
  bottom: 1px;
  z-index: 60;
  display: inline-grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 6px 10px;
  border: 2px solid var(--sp-orange);
  border-radius: 10px;
  background: #fff;
  color: #171612;
  box-shadow:
    0 0 0 1px rgba(255,120,30,0.14),
    0 0 14px rgba(255,120,30,0.28),
    0 10px 24px rgba(8,7,15,0.14);
}

.header-account span {
  color: #ad4200;
  font-family: var(--sp-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.header-account strong {
  display: grid;
  gap: 2px;
  color: #171612;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.header-account strong b,
.header-account strong em {
  font: inherit;
  font-style: normal;
}

.header-account strong em {
  color: #ad4200;
  font-size: 12px;
}

.header-account:hover,
.header-account:focus-visible {
  outline: 2px solid rgba(255,120,30,0.35);
  outline-offset: 2px;
}

.header-account[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  display: block;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, calc(100vw - 28px));
  padding: 10px 12px;
  border: 1px solid rgba(255,120,30,0.58);
  border-radius: var(--radius);
  background: #fffdf9;
  color: #171612;
  font-family: var(--sp-font);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  visibility: hidden;
  opacity: 0;
  z-index: 10050;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  box-shadow:
    0 0 0 9999px rgba(8,7,15,0),
    0 18px 46px rgba(8,7,15,0.28);
}

/* Launch polish: desktop/tablet header breathing room and account entry. */
@media (min-width: 769px) {
  .topbar {
    min-height: 184px !important;
    padding-top: 12px !important;
    padding-bottom: 20px !important;
  }

  .topbar-row {
    width: min(1120px, calc(100% - 56px)) !important;
  }

  .brand {
    max-width: calc(100% - 300px) !important;
  }

  .logo-mark {
    width: 52px !important;
    flex-basis: 52px !important;
  }

  .product {
    font-size: clamp(38px, 4.4vw, 46px) !important;
  }

  .tagline {
    top: 76px !important;
    width: min(620px, calc(100% - 360px)) !important;
    font-size: clamp(13px, 1.35vw, 18px) !important;
  }

  .top-actions {
    top: 8px !important;
    right: 0 !important;
    width: 108px !important;
    height: 108px !important;
  }

  .header-stax {
    width: 108px !important;
    height: 108px !important;
    padding: 7px !important;
  }

  .header-stax img {
    width: 64px !important;
    height: 64px !important;
    flex-basis: 64px !important;
  }

  .header-stax span {
    transform: none !important;
    line-height: 0.96 !important;
  }

  .header-workspace-chip {
    bottom: 14px !important;
    width: min(360px, calc(100% - 420px)) !important;
    min-height: 40px !important;
  }

  .header-theme {
    bottom: 18px !important;
  }
}

.account-create-section {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 120, 30, 0.34);
  border-radius: 12px;
  background: rgba(255, 120, 30, 0.08);
}

.account-create-section strong {
  color: var(--sp-text);
  font-size: 15px;
}

.account-create-section p {
  margin: 0 !important;
  font-size: 13px;
  line-height: 1.38;
}

.account-modal-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.one-launch-chip {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100% !important;
  min-height: 42px;
  margin-top: 8px;
}

.launch-project-section {
  background: rgba(255, 120, 30, 0.11);
}

@media (max-width: 560px) {
  .account-modal-actions {
    grid-template-columns: 1fr;
  }
}

/* True final shared app shell lock - 2026-06-28 */
.topbar {
  min-height: 194px !important;
  padding: 18px 28px !important;
}

.topbar-row,
.guide-inner {
  width: min(1120px, calc(100% - 56px)) !important;
  margin-inline: auto !important;
}

.brand {
  max-width: calc(100% - 300px) !important;
}

.logo-mark {
  width: 58px !important;
  flex-basis: 58px !important;
  border-radius: 10px !important;
}

.product {
  font-size: 48px !important;
  line-height: .94 !important;
  font-weight: 700 !important;
}

.product > span {
  color: rgba(255, 255, 255, .58) !important;
}

.byline {
  color: rgba(255, 255, 255, .82) !important;
  font-size: 16px !important;
}

.version {
  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;
}

.tagline,
:root[data-theme="dark"] .tagline {
  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;
  width: 108px !important;
  height: 108px !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;
  flex-basis: 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;
}

.guide-strip {
  top: 194px !important;
}

select,
option,
input,
textarea,
:root[data-theme="dark"] select,
:root[data-theme="dark"] option,
:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea {
  color: #171612 !important;
}

select,
option,
:root[data-theme="dark"] select,
:root[data-theme="dark"] option {
  background: #fffaf4 !important;
}

.account-modal-card,
:root[data-theme="dark"] .account-modal-card {
  background: #fffaf4 !important;
  color: #171612 !important;
}

.account-modal-card *,
:root[data-theme="dark"] .account-modal-card * {
  color: #171612 !important;
}

.account-modal-kicker,
.account-create-section > span,
:root[data-theme="dark"] .account-modal-kicker,
:root[data-theme="dark"] .account-create-section > span {
  color: #ad4200 !important;
}

@media (max-width: 560px) {
  .topbar {
    min-height: 178px !important;
    padding: 10px 12px 18px !important;
  }

  .topbar-row,
  .guide-inner {
    width: min(430px, calc(100% - 18px)) !important;
  }

  .brand {
    max-width: calc(100% - 116px) !important;
  }

  .logo-mark {
    width: 42px !important;
    flex-basis: 42px !important;
  }

  .product {
    font-size: 32px !important;
  }

  .byline {
    font-size: 13px !important;
  }

  .tagline,
  :root[data-theme="dark"] .tagline {
    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;
    width: 96px !important;
    height: 78px !important;
  }

  .header-stax {
    width: 96px !important;
    height: 78px !important;
  }

  .header-stax img {
    width: 46px !important;
    height: 46px !important;
    flex-basis: 46px !important;
  }

  .guide-strip {
    position: sticky !important;
    top: 0 !important;
  }

  .topbar {
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  .guide-strip {
    margin-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 {
  max-width: calc(100% - 300px) !important;
  margin-left: 0 !important;
}

.product,
.byline {
  font-family: var(--font-sans, "Space Grotesk", system-ui, sans-serif) !important;
  font-weight: 700 !important;
}

.product {
  font-size: 48px !important;
  line-height: .94 !important;
}

.product > span {
  color: rgba(255, 255, 255, .58) !important;
}

.byline {
  color: rgba(255, 255, 255, .82) !important;
  font-size: 16px !important;
}

.version {
  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;
}

.tagline {
  left: max(116px, calc((100vw - 1120px) / 2 + 116px)) !important;
  right: max(160px, calc((100vw - 1120px) / 2 + 160px)) !important;
  top: 72px !important;
  bottom: auto !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;
  flex-basis: 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;
}

.guide-strip {
  top: 194px !important;
}

.guide-inner {
  width: min(1120px, calc(100% - 56px)) !important;
}

select,
option,
input,
textarea,
body.theme-dark select,
body.theme-dark option,
body.theme-dark input,
body.theme-dark textarea,
:root[data-theme="dark"] select,
:root[data-theme="dark"] option,
:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea {
  color: #171612 !important;
}

select,
option,
body.theme-dark select,
body.theme-dark option,
:root[data-theme="dark"] select,
:root[data-theme="dark"] option {
  background: #fffaf4 !important;
}

.account-modal-card {
  color: #171612 !important;
  background: #fffaf4 !important;
}

.account-modal-card *,
body.theme-dark .account-modal-card *,
body.theme-dark .account-create-section *,
body.theme-dark .account-modal-note,
:root[data-theme="dark"] .account-modal-card *,
:root[data-theme="dark"] .account-create-section *,
:root[data-theme="dark"] .account-modal-note {
  color: #171612 !important;
}

.account-modal-kicker,
.account-create-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.theme-dark .app-footer,
:root[data-theme="dark"] .app-footer,
body.theme-dark .app-footer b,
:root[data-theme="dark"] .app-footer b {
  color: #fffaf4 !important;
}

@media (max-width: 560px) {
  .topbar {
    min-height: 178px !important;
    padding: 10px 12px 18px !important;
  }

  .topbar-row {
    width: 100% !important;
  }

  .brand {
    max-width: calc(100% - 116px) !important;
  }

  .product {
    font-size: 32px !important;
  }

  .tagline {
    left: 62px !important;
    right: 112px !important;
    top: 70px !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !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;
    flex-basis: 46px !important;
  }

  .guide-strip {
    position: sticky !important;
    top: 0 !important;
  }

  .guide-inner {
    width: min(430px, calc(100% - 18px)) !important;
  }
}

/* Shared tagline placement: match Bridge under-name sizing and placement. */
@media (min-width: 769px) {
  .tagline {
    top: 74px !important;
    left: max(118px, calc((100vw - 1120px) / 2 + 118px)) !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;
  }
}

/* Unified StonePath Apps header + ONE treatment, matched to Bridge. */
.byline {
  color: rgba(255, 250, 243, 0.9) !important;
  font-size: clamp(15px, 1.25vw, 18px) !important;
  font-weight: 850 !important;
}

.tagline {
  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;
}

@media (min-width: 769px) {
  .tagline {
    top: 72px !important;
    left: max(118px, calc((100vw - 1120px) / 2 + 118px)) !important;
    right: 188px !important;
    max-width: min(520px, calc(100vw - 330px)) !important;
  }

  .top-actions {
    top: 24px !important;
    right: 0 !important;
    width: 112px !important;
    height: 112px !important;
  }

  .header-stax {
    display: inline-flex !important;
    flex-direction: column !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;
    flex-basis: 68px !important;
  }

  .header-stax span {
    display: grid !important;
    gap: 1px !important;
    transform: none !important;
    text-align: center !important;
    line-height: 1.05 !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;
}

.account-modal-card {
  width: min(680px, calc(100vw - 28px)) !important;
}

.account-modal-kicker,
.account-one-grid section > span {
  color: #a94607;
  font-family: var(--sp-mono);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.account-one-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, .75fr);
  gap: 12px;
}

.account-create-section {
  background: #fffaf4 !important;
}

.account-create-section p {
  color: #68606a;
}

.one-merge-note {
  grid-column: 1 / -1;
  border-color: rgba(255, 120, 30, 0.28) !important;
  background: rgba(255, 120, 30, 0.06) !important;
}

.account-modal-note {
  border: 1px solid #d8e3e9 !important;
  border-radius: 8px !important;
  padding: 12px !important;
  background: #eef3f5 !important;
  color: #625d69 !important;
}

.account-modal-actions {
  display: flex !important;
  justify-content: flex-end;
  gap: 10px;
}

.account-modal-actions button {
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 10px;
  font-weight: 900;
}

@media (max-width: 768px) {
  .byline {
    font-size: 12px !important;
  }

  .tagline {
    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;
    width: 96px !important;
    height: 78px !important;
  }

  .header-stax {
    width: 96px !important;
    min-width: 96px !important;
    min-height: 78px !important;
    height: 78px !important;
    padding: 6px !important;
  }

  .header-stax img {
    width: 46px !important;
    height: 46px !important;
    flex-basis: 46px !important;
  }

  .header-stax strong {
    font-size: 11px !important;
  }

  .header-stax em {
    font-size: 7px !important;
  }

  .account-one-grid {
    grid-template-columns: 1fr;
  }

  .account-modal-actions {
    flex-direction: column;
  }
}

/* True final tagline lock: keep product copy directly under the name and wrapped. */
.tagline {
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

@media (min-width: 769px) {
  .tagline {
    top: 70px !important;
    left: max(118px, calc((100vw - 1120px) / 2 + 118px)) !important;
    right: max(160px, calc((100vw - 1120px) / 2 + 160px)) !important;
    width: auto !important;
    max-width: 520px !important;
    transform: none !important;
    text-align: left !important;
    line-height: 1.22 !important;
  }
}

@media (max-width: 768px) {
  .tagline {
    top: 78px !important;
    left: 74px !important;
    right: 112px !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    transform: none !important;
    text-align: left !important;
    line-height: 1.22 !important;
  }
}

@media (max-width: 390px) {
  .tagline {
    top: 74px !important;
    left: 58px !important;
    right: 102px !important;
    font-size: 10.8px !important;
  }
}

/* Final final: align Passage tagline directly under the brand name, not page center. */
.tagline {
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

@media (min-width: 769px) {
  .tagline {
    top: 70px !important;
    left: max(118px, calc((100vw - 1120px) / 2 + 118px)) !important;
    right: max(160px, calc((100vw - 1120px) / 2 + 160px)) !important;
    width: auto !important;
    max-width: 520px !important;
    transform: none !important;
    text-align: left !important;
    line-height: 1.22 !important;
  }
}

@media (max-width: 768px) {
  .tagline {
    top: 78px !important;
    left: 74px !important;
    right: 112px !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    transform: none !important;
    text-align: left !important;
    line-height: 1.22 !important;
  }
}

@media (max-width: 390px) {
  .tagline {
    top: 74px !important;
    left: 58px !important;
    right: 102px !important;
    font-size: 10.8px !important;
  }
}

/* Final shared header tagline lock: keep the line under the product name and wrap cleanly. */
.tagline {
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

@media (min-width: 769px) {
  .tagline {
    top: 64px !important;
    left: max(82px, calc((100vw - 1120px) / 2 + 82px)) !important;
    right: max(140px, calc((100vw - 1120px) / 2 + 140px)) !important;
    width: auto !important;
    max-width: 620px !important;
    transform: none !important;
    text-align: left !important;
    line-height: 1.25 !important;
  }
}

@media (max-width: 768px) {
  .tagline {
    top: 78px !important;
    left: 74px !important;
    right: 112px !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    transform: none !important;
    text-align: left !important;
    line-height: 1.22 !important;
  }
}

@media (max-width: 390px) {
  .tagline {
    top: 74px !important;
    left: 58px !important;
    right: 102px !important;
    font-size: 10.8px !important;
  }
}

/* Final tagline placement: keep the line attached to the Passage name. */
@media (min-width: 769px) {
  .tagline {
    top: 64px !important;
  }
}

@media (max-width: 768px) {
  .tagline {
    top: 78px !important;
    bottom: auto !important;
    left: 74px !important;
    right: 112px !important;
    width: auto !important;
    transform: none !important;
    text-align: left !important;
  }
}

@media (max-width: 390px) {
  .tagline {
    top: 74px !important;
    left: 58px !important;
    right: 102px !important;
  }
}

.header-account:hover::after,
.header-account:focus-visible::after,
.header-account.tip-open::after {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.header-stax {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  min-width: 0;
  height: 108px;
  padding: 10px;
  border: 3px solid var(--sp-orange);
  border-radius: 10px;
  background: #fff;
  color: #171612;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1;
  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: 82px;
  height: 82px;
  border-radius: 0;
  object-fit: contain;
  flex: 0 0 82px;
  box-shadow: none;
}

.header-stax span {
  display: inline-flex;
  align-items: center;
  flex-direction: column;
  gap: 1px;
  text-align: center;
  transform: translateY(2px);
}

.header-stax strong,
.header-stax em {
  font: inherit;
  font-style: normal;
}

.header-stax:hover,
.header-stax:focus-visible {
  border-color: var(--sp-orange);
  outline: 2px solid rgba(255,120,30,0.35);
  outline-offset: 2px;
}

.header-stax[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  display: block;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, calc(100vw - 28px));
  padding: 10px 12px;
  border: 1px solid rgba(255,120,30,0.58);
  border-radius: var(--radius);
  background: #fffdf9;
  color: #171612;
  font-family: var(--sp-font);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  white-space: normal;
  visibility: hidden;
  opacity: 0;
  z-index: 10050;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  box-shadow: 0 18px 46px rgba(8,7,15,0.28);
}

.header-stax:hover::after,
.header-stax:focus-visible::after,
.header-stax.tip-open::after {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  min-height: 34px;
  padding: 3px;
  border: 0.5px solid var(--sp-border);
  border-radius: 999px;
  background: var(--sp-surface);
}

.header-theme {
  position: absolute;
  left: max(18px, calc((100vw - 1120px) / 2 + 18px));
  bottom: 14px;
}

.theme-switcher button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sp-muted);
  font-size: 10px;
  font-weight: 900;
  padding: 0;
}

.theme-switcher button.active {
  background: var(--sp-orange);
  color: #fff;
}

:root[data-theme="dark"] .theme-switcher {
  border-color: rgba(255, 120, 30, 0.98);
  background: #fffaf4;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.42),
    0 0 18px rgba(255, 120, 30, 0.68),
    0 10px 24px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .theme-switcher button {
  color: #171612;
}

:root[data-theme="dark"] .theme-switcher button:not(.active) {
  background: rgba(255, 255, 255, 0.76);
}

:root[data-theme="dark"] .theme-switcher button.active {
  background: var(--sp-orange);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 120, 30, 0.62);
}

:root[data-theme="dark"] .header-stax {
  border-color: var(--sp-orange);
  background: #fff;
  color: #171612;
  box-shadow:
    0 0 0 1px rgba(255,120,30,0.24),
    0 0 20px rgba(255,120,30,0.82),
    0 0 44px rgba(255,120,30,0.42),
    0 12px 28px rgba(0,0,0,0.3);
}

:root[data-theme="dark"] .header-account {
  border-color: var(--sp-orange);
  background: #fff;
  color: #171612;
  box-shadow:
    0 0 0 1px rgba(255,120,30,0.22),
    0 0 18px rgba(255,120,30,0.44),
    0 12px 28px rgba(0,0,0,0.3);
}

:root[data-theme="dark"] .header-account[data-tip]::after {
  border-color: rgba(255,120,30,0.8);
  background: #17121a;
  color: #fffaf4;
  box-shadow:
    0 0 0 1px rgba(255,120,30,0.18),
    0 18px 46px rgba(0,0,0,0.72);
}

:root[data-theme="dark"] .header-stax[data-tip]::after {
  border-color: rgba(255,120,30,0.8);
  background: #17121a;
  color: #fffaf4;
  box-shadow:
    0 0 0 1px rgba(255,120,30,0.18),
    0 18px 46px rgba(0,0,0,0.72);
}

.count {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--sp-orange);
  color: #fff;
  font-size: 11px;
}

.guide-strip {
  position: sticky;
  top: 194px;
  z-index: 24;
  width: min(1168px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 16px 10px;
  border: 1px solid rgba(31,27,22,0.12);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 18px 40px rgba(31,27,22,0.1);
  backdrop-filter: blur(12px);
}

.guide-inner {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  display: block;
}

.current-launch-chip {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid var(--sp-orange);
  border-radius: 9px;
  background: rgba(255,255,255,0.95);
}

.header-workspace-chip {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 14px;
  width: min(380px, calc(100% - 520px));
  transform: translateX(-50%);
  padding: 6px 12px;
}

.current-launch-chip span {
  color: #ad4200;
  font-family: var(--sp-mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.current-launch-chip strong {
  color: #171612;
  font-size: 14px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-edit {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--sp-orange);
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  color: #ad4200;
  font-family: var(--sp-mono);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.current-launch-chip em,
.workspace-note {
  color: #7a6f78;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.1;
}

.progress-rail {
  min-height: 86px;
  display: grid;
  align-items: center;
  gap: 0;
  margin-bottom: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
}

.progress-rail::before {
  content: none;
}

.stage-tabs {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}

.stage-link {
  display: inline-grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 56px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1a1928;
  padding: 15px 10px 12px;
  white-space: normal;
  position: relative;
  z-index: 1;
}

.overall-progress-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.overall-progress-row strong {
  color: #171612;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.overall-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(31,27,22,0.12);
  overflow: hidden;
}

.overall-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sp-orange), var(--sp-green));
  transition: width 180ms ease;
}

.stage-link[disabled] {
  cursor: not-allowed;
  opacity: 0.68;
}

.stage-circle {
  display: none;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(26,25,40,0.18);
  color: rgba(26,25,40,0.48);
  font-weight: 800;
  font-size: 12px;
}

.stage-link.done .stage-circle {
  background: var(--sp-green);
  color: #fff;
  border-color: var(--sp-green);
}

.stage-link.active .stage-circle {
  border-color: rgba(255,255,255,0.8);
  color: #fff;
}

.stage-link.done.active .stage-circle {
  background: var(--sp-green);
  border-color: var(--sp-green);
  color: #fff;
}

.stage-link.active .stage-label {
  color: inherit;
  font-weight: 700;
}

.stage-label {
  color: #463b33;
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
  white-space: nowrap;
}

.stage-link.active:not(.done) {
  background: transparent;
  color: var(--sp-orange);
}

.stage-link.active:not(.done)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--sp-orange);
}

.stage-link.done::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: rgba(39,190,117,0.82);
}

.stage-link.done.active::after {
  left: 0;
  right: 0;
}

.stage-link.done .stage-label {
  color: #4f5f49;
}

:root[data-theme="dark"] .stage-link,
:root[data-theme="dark"] .stage-link.active {
  border-color: transparent;
  background: transparent;
  color: #f5efe7;
}

:root[data-theme="dark"] .stage-link.active {
  background: transparent;
  color: var(--sp-orange);
}

:root[data-theme="dark"] .stage-link:not(.active) {
  background: transparent;
  color: #f5efe7;
}

:root[data-theme="dark"] .stage-circle {
  border-color: var(--sp-green);
  background: var(--sp-green);
  color: #ffffff;
}

:root[data-theme="dark"] .stage-link.active .stage-circle {
  border-color: var(--sp-green);
  background: var(--sp-green);
  color: #ffffff;
}

.stage-link.done:not(.active) {
  border-color: transparent;
}

:root[data-theme="dark"] .stage-link.done:not(.active),
:root[data-theme="dark"] .stage-link.active {
  border-color: transparent;
}

.connector {
  display: none;
}

.connector.done { background: rgba(39,190,117,0.65); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100vh - 182px);
  background: var(--sp-dark);
}

:root[data-theme="dark"] .guide-strip {
  border-color: rgba(255,255,255,0.12);
  background:
    linear-gradient(180deg, rgba(8,7,15,0.96), rgba(18,15,19,0.92));
  box-shadow: 0 14px 32px rgba(0,0,0,0.28);
}

:root[data-theme="dark"] .progress-rail::before {
  background: rgba(255,255,255,0.14);
}

:root[data-theme="dark"] .overall-progress {
  background: rgba(255,255,255,0.16);
}

:root[data-theme="dark"] .overall-progress-row strong {
  color: #fffaf4;
}

:root[data-theme="dark"] .current-launch-chip {
  border-color: #ff781e;
  background: #fff1e4;
}

:root[data-theme="dark"] .current-launch-chip strong {
  color: #171612;
}

.project-modal[hidden] {
  display: none;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 10, 9, 0.52);
}

.lifecycle-modal[hidden] {
  display: none;
}

.lifecycle-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 10, 9, 0.56);
}

.project-modal-card {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  padding: 22px;
  border: 2px solid var(--sp-orange);
  border-radius: 14px;
  background: var(--sp-surface);
  box-shadow: 0 22px 60px rgba(0,0,0,0.28);
}

.account-modal-card {
  display: grid;
  gap: 14px;
  padding: 26px 22px 24px;
}

.lifecycle-modal-card {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(480px, calc(100vw - 32px));
  padding: 22px;
  border: 2px solid var(--sp-orange);
  border-radius: 14px;
  background: var(--sp-surface);
  color: var(--sp-text);
  box-shadow: 0 22px 60px rgba(0,0,0,0.28);
}

.project-modal-card h2 {
  margin: 0 34px 8px 0;
  font-size: 24px;
}

.lifecycle-modal-card h2 {
  margin: 0 34px 0 0;
  color: var(--sp-text);
  font-size: 24px;
  line-height: 1.12;
}

.project-modal-card p {
  margin: 0 0 14px;
  color: var(--sp-muted);
}

.lifecycle-modal-card p {
  margin: 0;
  color: var(--sp-muted);
  line-height: 1.42;
}

.project-modal-card label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.lifecycle-modal-field {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.lifecycle-modal-field[hidden] {
  display: none;
}

.project-modal-card input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid rgba(31,27,22,0.18);
  border-radius: 9px;
  background: #fff;
  color: #171612;
  font: inherit;
}

.lifecycle-modal-field textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  padding: 12px 13px;
  border: 1px solid rgba(31,27,22,0.18);
  border-radius: 9px;
  background: #fff;
  color: #171612;
  font: inherit;
  line-height: 1.35;
}

.account-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-modal-actions .primary,
.account-modal-actions .secondary {
  min-height: 44px;
  padding: 10px 12px;
}

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

.pricing-expectation-note {
  display: grid;
  gap: 5px;
  margin: 0;
  border: 1px solid rgba(35, 95, 147, .18);
  border-radius: 8px;
  background: rgba(35, 95, 147, .055);
  padding: 12px;
}

.pricing-expectation-note strong {
  color: #235f93;
  font-size: 14px;
  line-height: 1.2;
}

.pricing-expectation-note p {
  margin: 0;
  color: #4f5d67;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.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(--sp-orange);
  color: #fff;
  font-size: .64rem;
  font-weight: 950;
  line-height: 1;
  padding: 5px 8px;
}

.pricing-plan-card span {
  color: #ad4200;
  font-family: var(--sp-mono);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.pricing-plan-card strong {
  display: block;
  margin-top: 4px;
  color: #171612;
  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(--sp-muted);
}

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

.pricing-phase-list b {
  color: #171612;
}

.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(--sp-muted);
  line-height: 1.35;
}

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

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

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

:root[data-theme="dark"] .pricing-expectation-note {
  border-color: rgba(143, 199, 255, .28);
  background: rgba(143, 199, 255, .09);
}

:root[data-theme="dark"] .pricing-expectation-note strong {
  color: #cae8ff;
}

:root[data-theme="dark"] .pricing-expectation-note p {
  color: rgba(245, 250, 255, .84);
}

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

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

.account-modal-note {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid rgba(255,59,48,0.42);
  border-radius: 10px;
  background: #fff0ee;
  color: #171612;
  font-size: 12px;
  line-height: 1.35;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--sp-orange);
  border-radius: 999px;
  background: #fff;
  color: #171612;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.modal-actions,
.lifecycle-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.lifecycle-modal-actions {
  margin-top: 2px;
}

.danger-light {
  margin-right: auto;
  border: 1px solid #ff2f25;
  border-radius: 999px;
  background: #fff;
  color: #ff2f25;
  font-family: var(--sp-mono);
  font-size: 12px;
  font-weight: 900;
}

.lifecycle-modal-actions .danger-light {
  margin-right: 0;
  min-height: 42px;
  padding: 11px 16px;
  border-radius: var(--radius);
  font-family: var(--sp-font);
  font-size: inherit;
}

:root[data-theme="dark"] .project-modal-card,
:root[data-theme="dark"] .lifecycle-modal-card {
  background: #fffaf4;
  color: #171612;
}

:root[data-theme="dark"] .project-modal-card h2,
:root[data-theme="dark"] .lifecycle-modal-card h2 {
  color: #171612;
}

:root[data-theme="dark"] .project-modal-card p,
:root[data-theme="dark"] .lifecycle-modal-card p {
  color: rgba(35,31,26,0.74);
}

:root[data-theme="dark"] .layout {
  background:
    radial-gradient(circle at 82% 16%, rgba(255,120,30,0.13), transparent 30%),
    linear-gradient(180deg, #120f14 0%, #19130f 46%, #0b0a10 100%);
}

.main {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  max-width: 1168px;
  margin: 0 auto;
  padding: 28px 24px 48px;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.main:focus,
.main:focus-visible,
#app:focus,
#app:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.screen-head {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.screen-head h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
}

.screen-head p {
  margin: 0;
  max-width: 780px;
  color: var(--sp-muted);
  font-size: 17px;
}

.screen-head .stage-note {
  display: block;
  max-width: 720px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--sp-muted);
}

:root[data-theme="dark"] .screen-head h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3 {
  color: var(--sp-orange);
}

:root[data-theme="dark"] .cockpit-card h2 {
  color: #fffaf4;
}

:root[data-theme="dark"] .screen-head p {
  color: rgba(255,255,255,0.9);
}

:root[data-theme="dark"] .screen-head .stage-note {
  color: rgba(255,255,255,0.72);
}

:root[data-theme="dark"] .main {
  color: #fffaf4;
}

:root[data-theme="dark"] .task-box,
:root[data-theme="dark"] .task-body,
:root[data-theme="dark"] .task-box .card,
:root[data-theme="dark"] .task-box .selectable,
:root[data-theme="dark"] .task-box .route-box,
:root[data-theme="dark"] .task-box .next-step-box,
:root[data-theme="dark"] .task-box .stage-checkline,
:root[data-theme="dark"] .task-box .drop-zone,
:root[data-theme="dark"] .task-box .preflight-card,
:root[data-theme="dark"] .task-box .tracker-step,
:root[data-theme="dark"] .task-box .result-row,
:root[data-theme="dark"] .task-box .task-row,
:root[data-theme="dark"] .task-box .table-row,
:root[data-theme="dark"] .task-box .check-option,
:root[data-theme="dark"] .task-box .warning-block {
  color: #171612;
}

:root[data-theme="dark"] .task-box p,
:root[data-theme="dark"] .task-box small,
:root[data-theme="dark"] .task-box .muted,
:root[data-theme="dark"] .task-box .card p,
:root[data-theme="dark"] .task-box .selectable p,
:root[data-theme="dark"] .task-box .route-box,
:root[data-theme="dark"] .task-box .route-box span,
:root[data-theme="dark"] .task-box .next-step-box span,
:root[data-theme="dark"] .task-box .task-guide span,
:root[data-theme="dark"] .task-box .stage-checkline span,
:root[data-theme="dark"] .task-box .drop-zone p,
:root[data-theme="dark"] .task-box .tracker-step p,
:root[data-theme="dark"] .task-box .preflight-card p,
:root[data-theme="dark"] .task-box .result-row p,
:root[data-theme="dark"] .task-box .task-row p,
:root[data-theme="dark"] .task-box .table-row p,
:root[data-theme="dark"] .task-box .check-option span {
  color: rgba(35,31,26,0.74);
}

:root[data-theme="dark"] .task-box h2,
:root[data-theme="dark"] .task-box h3,
:root[data-theme="dark"] .task-box .card h3,
:root[data-theme="dark"] .task-box .selectable h3,
:root[data-theme="dark"] .task-box .route-box strong,
:root[data-theme="dark"] .task-box .next-step-box strong,
:root[data-theme="dark"] .task-box .task-guide strong,
:root[data-theme="dark"] .task-box .warning-block strong {
  color: #d45200;
}

:root[data-theme="dark"] .task-box .code-block,
:root[data-theme="dark"] .task-box .code-block * {
  color: #fffaf4;
}

:root[data-theme="dark"] .task-box .route-box,
:root[data-theme="dark"] .task-box .next-step-box,
:root[data-theme="dark"] .task-box .task-guide,
:root[data-theme="dark"] .task-box .stage-checkline {
  background: #fff1e4;
  border-color: rgba(255,120,30,0.82);
  color: #171612 !important;
}

:root[data-theme="dark"] .task-box .route-box *,
:root[data-theme="dark"] .task-box .next-step-box *,
:root[data-theme="dark"] .task-box .task-guide *,
:root[data-theme="dark"] .task-box .stage-checkline * {
  color: #171612 !important;
}

:root[data-theme="dark"] .task-box .route-box strong,
:root[data-theme="dark"] .task-box .next-step-box strong,
:root[data-theme="dark"] .task-box .task-guide strong,
:root[data-theme="dark"] .task-box .stage-checkline strong {
  color: #d45200 !important;
}

:root[data-theme="dark"] .task-box .check-option {
  background: #fffaf4;
  border-color: rgba(255,120,30,0.46);
  color: #171612 !important;
}

:root[data-theme="dark"] .task-box .check-option *,
:root[data-theme="dark"] .task-box .check-option span {
  color: #171612 !important;
}

:root[data-theme="dark"] .task-box .check-option input {
  background: #fff;
  border: 1.5px solid #ff781e;
  accent-color: #27be75;
  opacity: 1;
}

:root[data-theme="dark"] .task-box .check-option:has(input:checked) {
  background: #e8fff1;
  border-color: #27be75;
}

:root[data-theme="dark"] .task-box .card:not(.selected),
:root[data-theme="dark"] .task-box .selectable:not(.selected),
:root[data-theme="dark"] .task-box .result-row:not(.selected),
:root[data-theme="dark"] .task-box .option:not(.selected),
:root[data-theme="dark"] .task-box .preflight-card,
:root[data-theme="dark"] .task-box .tracker-step,
:root[data-theme="dark"] .task-box .drop-zone,
:root[data-theme="dark"] .task-box .task-row,
:root[data-theme="dark"] .task-box .table-row,
:root[data-theme="dark"] .task-box .warning-block {
  background: #fffaf4;
  border-color: rgba(255,120,30,0.58);
  color: #171612 !important;
}

:root[data-theme="dark"] .task-box .card:not(.selected) *,
:root[data-theme="dark"] .task-box .selectable:not(.selected) *,
:root[data-theme="dark"] .task-box .result-row:not(.selected) *,
:root[data-theme="dark"] .task-box .option:not(.selected) *,
:root[data-theme="dark"] .task-box .preflight-card *,
:root[data-theme="dark"] .task-box .tracker-step *,
:root[data-theme="dark"] .task-box .drop-zone *,
:root[data-theme="dark"] .task-box .task-row *,
:root[data-theme="dark"] .task-box .table-row *,
:root[data-theme="dark"] .task-box .warning-block * {
  color: #171612 !important;
}

:root[data-theme="dark"] .task-box .card:not(.selected) .muted,
:root[data-theme="dark"] .task-box .selectable:not(.selected) .muted,
:root[data-theme="dark"] .task-box .result-row:not(.selected) .muted,
:root[data-theme="dark"] .task-box .option:not(.selected) .muted,
:root[data-theme="dark"] .task-box .preflight-card .muted,
:root[data-theme="dark"] .task-box .tracker-step .muted,
:root[data-theme="dark"] .task-box .drop-zone .muted,
:root[data-theme="dark"] .task-box .task-row .muted,
:root[data-theme="dark"] .task-box .table-row .muted,
:root[data-theme="dark"] .task-box .warning-block .muted {
  color: rgba(35,31,26,0.76) !important;
}

:root[data-theme="dark"] .task-box .card:not(.selected) h3,
:root[data-theme="dark"] .task-box .selectable:not(.selected) h3,
:root[data-theme="dark"] .task-box .result-row:not(.selected) strong,
:root[data-theme="dark"] .task-box .option:not(.selected) strong,
:root[data-theme="dark"] .task-box .preflight-card strong,
:root[data-theme="dark"] .task-box .tracker-step strong,
:root[data-theme="dark"] .task-box .drop-zone strong,
:root[data-theme="dark"] .task-box .task-row strong,
:root[data-theme="dark"] .task-box .table-row strong,
:root[data-theme="dark"] .task-box .warning-block strong {
  color: #d45200 !important;
}

:root[data-theme="dark"] .task-box .check-option:has(input:disabled) {
  background: #fff1e4;
  opacity: 1;
}

:root[data-theme="dark"] .task-box .check-option input:disabled {
  opacity: 1;
}

:root[data-theme="dark"] .task-box .code-block,
:root[data-theme="dark"] .task-box .code-block * {
  color: #fffaf4 !important;
}

.assistant-panel {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(130%);
  width: min(680px, calc(100vw - 24px));
  max-height: 72vh;
  overflow-y: auto;
  border: 0.5px solid rgba(255,120,30,0.45);
  border-radius: 16px;
  background: var(--sp-surface);
  padding: 18px;
  transition: transform 240ms ease;
}

.assistant-panel.open {
  transform: translateX(-50%) translateY(0);
}

body.ai-panel-open .main {
  padding-bottom: min(420px, 48vh);
}

.ai-helper-bubble {
  position: fixed;
  right: max(18px, calc((100vw - 1120px) / 2 + 18px));
  bottom: 18px;
  z-index: 59;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 2px solid var(--sp-orange);
  border-radius: 999px;
  background: #fffaf4;
  color: #ad4200;
  box-shadow:
    0 0 0 3px rgba(255,120,30,0.18),
    0 16px 36px rgba(8,7,15,0.22),
    0 0 26px rgba(255,120,30,0.3);
  font-family: var(--sp-mono);
  font-size: 15px;
  font-weight: 900;
}

.ai-helper-bubble:hover,
.ai-helper-bubble:focus-visible {
  outline: 3px solid rgba(255,120,30,0.28);
  outline-offset: 3px;
}

.assistant-panel.open + .ai-helper-bubble {
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 1280px) {
  .ai-helper-bubble {
    right: max(18px, calc((100vw - 1120px) / 2 - 76px));
  }
}

:root[data-theme="dark"] .ai-helper-bubble {
  background: #fff1e4;
  color: #171612;
  box-shadow:
    0 0 0 3px rgba(255,157,0,0.24),
    0 16px 36px rgba(0,0,0,0.42),
    0 0 28px rgba(255,157,0,0.36);
}

@media (min-width: 769px) {
  .tagline {
    right: auto;
  }
}

@media (max-width: 768px) {
  body {
    background: #f5f1ea;
  }

  .topbar {
    position: relative;
    min-height: 136px;
    margin: 10px auto 0;
    width: min(430px, calc(100% - 18px));
    padding: 10px 10px 12px;
    border: 1px solid rgba(31,27,22,0.12);
    border-radius: 14px 14px 0 0;
    background: color-mix(in srgb, var(--sp-surface) 94%, transparent);
    box-shadow: 0 14px 34px rgba(31,27,22,0.08);
  }

  .topbar::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(90deg, rgba(255,253,249,0.9), rgba(255,253,249,0.82)),
      url("../public/stonepath-hero-passage.png") 82% 56% / min(1120px, 72vw) auto no-repeat;
    opacity: 0.34;
    pointer-events: none;
  }

  :root[data-theme="dark"] .topbar {
    border-color: rgba(255,255,255,0.12);
    background: #111018;
  }

  :root[data-theme="dark"] .topbar::before {
    background:
      linear-gradient(90deg, rgba(17,16,24,0.9), rgba(17,16,24,0.78)),
      url("../public/stonepath-hero-passage.png") 82% 56% / min(1120px, 72vw) auto no-repeat;
    opacity: 0.28;
  }

  .topbar-row { width: auto; margin: 0; }
  .brand { max-width: calc(100% - 190px); }
  .logo-mark {
    width: 40px;
    flex-basis: 40px;
    border-radius: 8px;
  }
  .brand {
    grid-template-columns: 40px minmax(0, auto);
    column-gap: 8px;
    max-width: calc(100% - 120px);
  }
  .product {
    font-size: 30px;
  }
  .byline {
    font-size: 11px;
  }
  .version {
    font-size: 9px;
  }
  .product span { color: #6f6a62; }
  .product strong { color: var(--sp-orange); }
  .byline { color: #6f6a62; }
  .version {
    color: #5d5851;
    border-color: rgba(31,27,22,0.18);
    background: rgba(255,255,255,0.72);
  }
  :root[data-theme="dark"] .product span { color: rgba(255,255,255,0.68); }
  :root[data-theme="dark"] .byline { color: rgba(255,255,255,0.78); }
  :root[data-theme="dark"] .version {
    color: rgba(255,255,255,0.82);
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.1);
  }
  .tagline {
    left: 12px;
    right: 116px;
    top: 82px;
    width: auto;
    transform: none;
    font-size: 10.5px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    max-height: 16px;
  }
  .top-actions {
    top: 10px;
    right: 12px;
    width: 86px;
    height: auto;
    display: grid;
    gap: 4px;
    align-items: stretch;
    flex-direction: column;
  }
  .header-account {
    position: relative;
    right: auto;
    bottom: auto;
    min-width: 0;
    width: 100%;
    min-height: 30px;
    height: 30px;
    padding: 3px 7px;
    border-width: 1.5px;
    border-radius: 8px;
  }
  .header-account span {
    display: none;
  }
  .header-account strong {
    gap: 1px;
    font-size: 12px;
  }
  .header-account strong em {
    font-size: 9.5px;
  }
  .header-account[data-tip]::after {
    position: fixed !important;
    top: 148px !important;
    left: 50% !important;
    right: auto !important;
    z-index: 9999 !important;
    transform: translateX(-50%) translateY(-4px);
    width: min(320px, calc(100vw - 22px));
  }

  .header-account:hover::after,
  .header-account:focus-visible::after {
    transform: translateX(-50%) translateY(0);
  }
  .header-theme {
    left: 12px;
    bottom: 14px;
  }
  .header-stax {
    position: relative;
    top: auto;
    right: auto;
    height: 56px;
    width: 100%;
    min-width: 0;
    padding: 4px 5px 5px;
    gap: 2px;
    font-size: 9px;
    border-radius: 7px;
    letter-spacing: 0.055em;
  }
  .header-stax img {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 7px;
  }
  .header-stax[data-tip]::after {
    position: fixed !important;
    top: 148px !important;
    left: 50% !important;
    right: auto !important;
    z-index: 9999 !important;
    transform: translateX(-50%) translateY(-4px);
    width: min(320px, calc(100vw - 22px));
  }

  .header-stax:hover::after,
  .header-stax:focus-visible::after {
    transform: translateX(-50%) translateY(0);
  }
  .theme-switcher { min-height: 31px; padding: 2px; }
  .theme-switcher button { width: 27px; height: 27px; font-size: 9px; }

  .guide-strip {
    position: sticky;
    top: 0;
    width: min(430px, calc(100% - 18px));
    margin: 0 auto;
    padding: 0 10px 9px;
    border: 1px solid rgba(31,27,22,0.12);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: color-mix(in srgb, var(--sp-surface) 96%, transparent);
    box-shadow: 0 14px 34px rgba(31,27,22,0.08);
  }

  :root[data-theme="dark"] .guide-strip {
    border-color: rgba(255,255,255,0.12);
    background: #111018;
  }

  .guide-inner {
    display: block;
    padding: 0;
  }
  .current-launch-chip {
    padding: 6px 9px;
  }
  .header-workspace-chip {
    left: 76px;
    right: 106px;
    bottom: 11px;
    width: auto;
    transform: none;
    min-height: 32px;
    padding: 3px 8px;
  }
  .progress-rail {
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    min-height: 96px;
    gap: 4px;
    padding: 0;
    margin-bottom: 0;
    overflow: visible;
  }
  .progress-rail::before { top: 5px; }
  .stage-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 72px;
    gap: 4px;
    align-items: center;
  }
  .overall-progress-row {
    margin-top: 6px;
    gap: 8px;
  }
  .overall-progress-row strong {
    font-size: 12px;
  }
  .connector { display: none; }
  .stage-link {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 36px;
    justify-content: center;
    gap: 5px;
    padding: 11px 5px 7px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .stage-circle {
    width: 17px;
    height: 17px;
    font-size: 9px;
  }
  .stage-label {
    font-size: 10.5px;
    line-height: 1.1;
    text-align: center;
  }
  .layout { grid-template-columns: 1fr; }
  .main {
    width: min(430px, 100%);
    padding: 10px 9px 42px;
  }
  .ai-helper-bubble {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
  }
}

@media (max-width: 480px) {
  .topbar { gap: 4px; min-height: 176px; padding: 8px 10px 12px; }
  .topbar-row { gap: 10px; }
  .brand { grid-template-columns: 34px minmax(0, auto); column-gap: 7px; max-width: calc(100% - 104px); }
  .logo-mark { width: 34px; height: auto; flex-basis: 34px; border-radius: 7px; }
  .product { font-size: 22px; }
  .title-lockup { display: grid; grid-template-columns: auto auto; column-gap: 6px; row-gap: 1px; align-items: end; padding-top: 1px; }
  .product { grid-column: 1 / -1; }
  .byline { font-size: 8.5px; padding-bottom: 0; }
  .version { font-size: 7.5px; padding: 1px 4px; transform: none; }
  .tagline {
    left: 16px;
    right: 92px;
    top: 82px;
    font-size: 11.6px;
    line-height: 1.28;
    text-align: left;
    max-height: 30px;
    white-space: normal;
    overflow: hidden;
  }
  .top-actions {
    top: 8px;
    right: 8px;
    width: 76px;
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
  }
  .header-account {
    min-width: 76px;
    width: 100%;
    min-height: 28px;
    height: 28px;
    padding: 3px 5px;
    z-index: 65;
  }
  .header-account strong {
    font-size: 10px;
  }
  .header-account strong em {
    font-size: 7.4px;
  }
  .header-stax {
    width: 100%;
    min-width: 76px;
    height: 64px;
    padding: 4px 5px 5px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }
  .header-stax img {
    width: 41px;
    height: 41px;
    flex-basis: 41px;
    border-radius: 8px;
  }
  .header-stax span {
    display: inline;
    max-width: none;
    font-size: 8.5px;
    line-height: 1;
    white-space: normal;
    text-align: center;
  }
  .header-stax em { display: none; }
  .theme-switcher {
    min-height: 30px;
    padding: 1px;
    opacity: 0.96;
  }
  .header-theme { left: 10px; bottom: 17px; }
  .header-workspace-chip {
    left: auto;
    right: 8px;
    width: min(270px, calc(100% - 88px));
    bottom: 10px;
    transform: none;
    min-height: 26px;
    padding: 2px 6px;
  }
  .header-workspace-chip span { font-size: 8px; letter-spacing: 0.1em; }
  .header-workspace-chip strong { font-size: 11px; }
  .header-workspace-chip em { display: none; }
  .workspace-edit {
    min-height: 24px;
    padding: 3px 7px;
    font-size: 8px;
  }
  .theme-switcher button { width: 28px; height: 28px; font-size: 9px; }
  .guide-strip { top: 0; }
  .progress-rail { min-height: 96px; gap: 4px; }
  .stage-tabs { min-height: 70px; gap: 4px; }
  .overall-progress-row { margin-top: 7px; }
  .stage-link { min-width: 0; max-width: none; min-height: 34px; gap: 3px; padding: 10px 4px 7px; }
  .stage-circle { width: 15px; height: 15px; font-size: 8px; flex: 0 0 15px; }
  .stage-label {
    display: inline;
    font-size: 8.5px;
    line-height: 1.02;
    overflow-wrap: normal;
    word-break: normal;
  }
  .screen-head h1 { font-size: 32px; }
}

:root[data-theme="dark"] .task-box .task-body,
:root[data-theme="dark"] .task-box .route-box,
:root[data-theme="dark"] .task-box .next-step-box,
:root[data-theme="dark"] .task-box .task-guide,
:root[data-theme="dark"] .task-box .warning-block,
:root[data-theme="dark"] .task-box .sensitive-warning,
:root[data-theme="dark"] .task-box .stage-checkline,
:root[data-theme="dark"] .task-box .stonepath-signal,
:root[data-theme="dark"] .task-box .drop-zone,
:root[data-theme="dark"] .task-box .table-row,
:root[data-theme="dark"] .task-box .task-row,
:root[data-theme="dark"] .task-box .check-option,
:root[data-theme="dark"] .task-box .card,
:root[data-theme="dark"] .task-box .option,
:root[data-theme="dark"] .task-box .selectable,
:root[data-theme="dark"] .task-box .result-row,
:root[data-theme="dark"] .task-box .preflight-card,
:root[data-theme="dark"] .task-box .tracker-step {
  background-color: #fff1e4;
  color: #171612 !important;
}

:root[data-theme="dark"] .task-box .task-body :where(p, span, small, label, strong, h2, h3, h4, li, div) {
  color: #171612 !important;
}

:root[data-theme="dark"] .task-box .task-body :where(.muted, small, p) {
  color: rgba(35, 31, 26, 0.76) !important;
}

:root[data-theme="dark"] .task-box .task-guide strong,
:root[data-theme="dark"] .task-box .next-step-box strong,
:root[data-theme="dark"] .task-box .warning-block strong,
:root[data-theme="dark"] .task-box .route-box strong,
:root[data-theme="dark"] .task-box .stage-checkline strong,
:root[data-theme="dark"] .task-box .card h3,
:root[data-theme="dark"] .task-box .option strong,
:root[data-theme="dark"] .task-box .selectable strong,
:root[data-theme="dark"] .task-box .result-row strong {
  color: #d45200 !important;
}

:root[data-theme="dark"] .task-box .check-option {
  background: #fffaf4 !important;
  border-color: rgba(255, 120, 30, 0.66) !important;
}

:root[data-theme="dark"] .task-box .check-option:has(input:checked) {
  background: #e8fff1 !important;
  border-color: #27be75 !important;
}

:root[data-theme="dark"] .task-box input:not([type="checkbox"]),
:root[data-theme="dark"] .task-box textarea,
:root[data-theme="dark"] .task-box select {
  background: #fffaf4;
  color: #171612 !important;
  border-color: rgba(255, 120, 30, 0.52);
}

:root[data-theme="dark"] .task-box .code-block,
:root[data-theme="dark"] .task-box .code-block * {
  background: #090812 !important;
  color: #fffaf4 !important;
}

:root[data-theme="dark"] .task-box button.primary,
:root[data-theme="dark"] .task-box .primary {
  color: #fff !important;
}

:root[data-theme="dark"] .task-box .task-state {
  color: #c84b00 !important;
}

:root[data-theme="dark"] .task-box.done .task-state {
  color: #119a55 !important;
}

/* Final Passage dark pass: pale work boxes should always read as pale boxes. */
:root[data-theme="dark"] .stage-work-card :where(
  .route-box,
  .next-step-box,
  .stage-checkline,
  .task-guide,
  .warning-block,
  .sensitive-warning,
  .table-row,
  .task-row,
  .drop-zone,
  .preflight-card,
  .tracker-step,
  .result-row,
  .check-option
) {
  background-color: #fff1e4 !important;
  color: #171612 !important;
}

:root[data-theme="dark"] .stage-work-card :where(
  .route-box,
  .next-step-box,
  .stage-checkline,
  .task-guide,
  .warning-block,
  .sensitive-warning,
  .table-row,
  .task-row,
  .drop-zone,
  .preflight-card,
  .tracker-step,
  .result-row,
  .check-option
) :where(p, span, small, label, li, div) {
  color: rgba(35, 31, 26, 0.78) !important;
}

:root[data-theme="dark"] .stage-work-card :where(
  .route-box,
  .next-step-box,
  .stage-checkline,
  .task-guide,
  .warning-block,
  .sensitive-warning,
  .table-row,
  .task-row,
  .drop-zone,
  .preflight-card,
  .tracker-step,
  .result-row,
  .check-option
) :where(strong, h2, h3, h4) {
  color: #d45200 !important;
}

:root[data-theme="dark"] .stage-work-card :where(.warning-block, .sensitive-warning) {
  background-color: #fff5f3 !important;
  border-color: #ff2f25 !important;
}

:root[data-theme="dark"] .stage-work-card :where(.warning-block, .sensitive-warning) > span:first-child {
  color: #ff2f25 !important;
}

:root[data-theme="dark"] .stage-work-card .task-body > .button-row,
:root[data-theme="dark"] .stage-work-card .task-body > .button-row span,
:root[data-theme="dark"] .stage-work-card .task-body > .button-row p {
  color: #171612 !important;
}

:root[data-theme="dark"] .stage-work-card button.primary,
:root[data-theme="dark"] .stage-work-card .primary {
  color: #fff !important;
}

/* Cleanup pass: keep dark mode readable while preserving the pale StonePath work boxes. */
.stage-label {
  font-size: 14px;
}

:root[data-theme="dark"] .theme-switcher {
  background: rgba(255, 255, 255, 0.94) !important;
  border-color: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 112, 24, 0.35) !important;
}

:root[data-theme="dark"] .theme-switcher button {
  color: #2d2925 !important;
}

:root[data-theme="dark"] .theme-switcher button.active {
  background: var(--sp-orange) !important;
  color: #fff !important;
}

:root[data-theme="dark"] .screen-head h1 {
  color: var(--sp-orange) !important;
}

:root[data-theme="dark"] .screen-head p {
  color: #fff !important;
}

:root[data-theme="dark"] #app .stage-work-card :where(
  .task-box,
  .task-body,
  .route-box,
  .next-step-box,
  .stage-checkline,
  .task-guide,
  .warning-block,
  .table-row,
  .task-row,
  .drop-zone,
  .preflight-card,
  .tracker-step,
  .result-row,
  .check-option,
  .choice-card,
  .option-card,
  .provider-card,
  .card,
  .option,
  .selectable
) {
  background-color: #fff1e4 !important;
  color: #171612 !important;
}

:root[data-theme="dark"] #app .stage-work-card :where(
  .task-box,
  .task-body,
  .route-box,
  .next-step-box,
  .stage-checkline,
  .task-guide,
  .warning-block,
  .table-row,
  .task-row,
  .drop-zone,
  .preflight-card,
  .tracker-step,
  .result-row,
  .check-option,
  .choice-card,
  .option-card,
  .provider-card,
  .card,
  .option,
  .selectable
) :where(p, span, small, label, li, div) {
  color: rgba(35, 31, 26, 0.82) !important;
}

:root[data-theme="dark"] #app .stage-work-card :where(
  .task-box,
  .task-body,
  .route-box,
  .next-step-box,
  .stage-checkline,
  .task-guide,
  .warning-block,
  .table-row,
  .task-row,
  .drop-zone,
  .preflight-card,
  .tracker-step,
  .result-row,
  .check-option,
  .choice-card,
  .option-card,
  .provider-card,
  .card,
  .option,
  .selectable
) :where(strong, h2, h3, h4) {
  color: #171612 !important;
}

:root[data-theme="dark"] #app .stage-work-card :where(.task-guide, .next-step-box, .stage-checkline, .route-box) > strong:first-child {
  color: #d45200 !important;
}

:root[data-theme="dark"] #app .stage-work-card .task-box.done,
:root[data-theme="dark"] #app .stage-work-card .task-box.done .task-body,
:root[data-theme="dark"] #app .stage-work-card .stage-checkline.done {
  background-color: #eefaf0 !important;
  color: #102015 !important;
}

:root[data-theme="dark"] #app .stage-work-card .task-box.done :where(p, span, small, label, li, div, strong, h2, h3, h4) {
  color: #102015 !important;
}

:root[data-theme="dark"] #app .stage-work-card .code-block,
:root[data-theme="dark"] #app .stage-work-card .code-block * {
  background: #090812 !important;
  color: #fffaf4 !important;
}

:root[data-theme="dark"] #app .stage-work-card .sensitive-warning,
:root[data-theme="dark"] #app .stage-work-card .sensitive-warning * {
  color: #ff2f25 !important;
}

@media (max-width: 700px) {
  .stage-label {
    font-size: 11px;
  }

  .account-modal-card {
    width: min(420px, calc(100vw - 28px));
    padding: 24px 18px 22px;
    gap: 12px;
  }

  .account-modal-card h2 {
    margin-bottom: 0;
    font-size: 23px;
  }

  .account-modal-card p {
    margin-bottom: 0;
    line-height: 1.42;
  }

  .account-modal-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .account-modal-actions .primary,
  .account-modal-actions .secondary {
    min-height: 42px;
    width: 100%;
  }
}

@media (max-width: 768px) {
  :root[data-theme="dark"] body {
    background: #08070f;
    color: #fffaf4;
  }

  :root[data-theme="dark"] .layout {
    background:
      radial-gradient(circle at 82% 16%, rgba(255,120,30,0.13), transparent 30%),
      linear-gradient(180deg, #120f14 0%, #19130f 46%, #0b0a10 100%);
    color: #fffaf4;
  }

  :root[data-theme="dark"] .main,
  :root[data-theme="dark"] #app,
  :root[data-theme="dark"] .screen-head {
    color: #fffaf4;
  }
}

/* 2026-06-20 final dark readability pass: keep work panels readable. */
:root[data-theme="dark"] #app .stage-work-card :where(
  .task-box,
  .task-body,
  .route-box,
  .task-guide,
  .warning-block,
  .table-row,
  .task-row,
  .drop-zone,
  .preflight-card,
  .tracker-step,
  .result-row,
  .check-option,
  .choice-card,
  .option-card,
  .provider-card,
  .card,
  .option,
  .selectable,
  .metric-card,
  .field-card,
  .copy-card
) {
  background: #fff1e4 !important;
  color: #171612 !important;
  text-shadow: none !important;
}

:root[data-theme="dark"] #app .stage-work-card :where(
  .task-box,
  .task-body,
  .route-box,
  .task-guide,
  .warning-block,
  .table-row,
  .task-row,
  .drop-zone,
  .preflight-card,
  .tracker-step,
  .result-row,
  .check-option,
  .choice-card,
  .option-card,
  .provider-card,
  .card,
  .option,
  .selectable,
  .metric-card,
  .field-card,
  .copy-card
) :where(p, span, small, label, li, div) {
  color: #4d4038 !important;
  text-shadow: none !important;
}

:root[data-theme="dark"] #app .stage-work-card :where(
  .task-box,
  .task-body,
  .route-box,
  .task-guide,
  .warning-block,
  .table-row,
  .task-row,
  .drop-zone,
  .preflight-card,
  .tracker-step,
  .result-row,
  .check-option,
  .choice-card,
  .option-card,
  .provider-card,
  .card,
  .option,
  .selectable,
  .metric-card,
  .field-card,
  .copy-card
) :where(strong, b, h2, h3, h4) {
  color: #171612 !important;
  text-shadow: none !important;
}

:root[data-theme="dark"] #app .stage-work-card :where(.route-box, .task-guide, .warning-block) > strong:first-child {
  color: #d45200 !important;
}

:root[data-theme="dark"] #app .stage-work-card .check-option,
:root[data-theme="dark"] #app .stage-work-card .check-option:has(input:disabled),
:root[data-theme="dark"] #app .stage-work-card .check-option span {
  background: #fff1e4 !important;
  color: #171612 !important;
  opacity: 1 !important;
}

:root[data-theme="dark"] #app .stage-work-card .task-box.done,
:root[data-theme="dark"] #app .stage-work-card .task-box.done .task-body {
  background: #eefaf0 !important;
  color: #102015 !important;
}

:root[data-theme="dark"] #app .stage-work-card .task-box.done :where(p, span, small, label, li, div, strong, b, h2, h3, h4) {
  color: #102015 !important;
  text-shadow: none !important;
}

/* Final dark readability pass: open work cards stay pale, readable, and non-glitchy. */
:root[data-theme="dark"] .stage-work-card :where(
  .task-guide,
  .route-box,
  .next-step-box,
  .warning-block,
  .stage-checkline,
  .choice-card,
  .option-card,
  .provider-card,
  .card,
  .option,
  .selectable,
  .field,
  .field-card,
  .check-option,
  .copy-card,
  .result-row,
  .preflight-card
) {
  background-color: #fff1e4 !important;
  color: #171612 !important;
  text-shadow: none !important;
}

:root[data-theme="dark"] .stage-work-card :where(
  .task-guide,
  .route-box,
  .next-step-box,
  .warning-block,
  .stage-checkline,
  .choice-card,
  .option-card,
  .provider-card,
  .card,
  .option,
  .selectable,
  .field,
  .field-card,
  .check-option,
  .copy-card,
  .result-row,
  .preflight-card
) :where(p, span, small, label, li, div) {
  color: #4d4038 !important;
  text-shadow: none !important;
}

:root[data-theme="dark"] .stage-work-card :where(
  .task-guide,
  .route-box,
  .next-step-box,
  .warning-block,
  .stage-checkline,
  .choice-card,
  .option-card,
  .provider-card,
  .card,
  .option,
  .selectable,
  .field,
  .field-card,
  .check-option,
  .copy-card,
  .result-row,
  .preflight-card
) :where(strong, b, h3, h4) {
  color: #171612 !important;
}

:root[data-theme="dark"] .stage-work-card :where(.task-guide, .next-step-box, .warning-block) > strong:first-child {
  color: #d45200 !important;
}

:root[data-theme="dark"] .stage-work-card :where(input, textarea, select) {
  background-color: #fffaf3 !important;
  color: #171612 !important;
}

:root[data-theme="dark"] .stage-work-card :where(input[type="checkbox"]) {
  background-color: #ffffff !important;
  border-color: #ff6b16 !important;
}

/* 2026-06-20 final readability pass: dark mode keeps pale work cards readable. */
.stage-label {
  font-size: 15px;
}

:root[data-theme="dark"] .theme-switcher {
  background: #fffaf4 !important;
  border-color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 112, 24, 0.7) !important;
}

:root[data-theme="dark"] .theme-switcher button {
  color: #26211d !important;
}

:root[data-theme="dark"] .theme-switcher button.active {
  background: var(--sp-orange) !important;
  color: #ffffff !important;
}

:root[data-theme="dark"] .screen-head h1 {
  color: var(--sp-orange) !important;
}

:root[data-theme="dark"] .stage-work-card :where(
  .task-box,
  .task-body,
  .route-box,
  .next-step-box,
  .stage-checkline,
  .task-guide,
  .warning-block,
  .table-row,
  .task-row,
  .drop-zone,
  .preflight-card,
  .tracker-step,
  .result-row,
  .check-option,
  .choice-card,
  .option-card,
  .provider-card,
  .card,
  .option,
  .selectable,
  .metric-card,
  .field-card,
  .copy-card
) {
  background-color: #fff1e4 !important;
  color: #171612 !important;
}

:root[data-theme="dark"] .stage-work-card :where(
  .task-box,
  .task-body,
  .route-box,
  .next-step-box,
  .stage-checkline,
  .task-guide,
  .warning-block,
  .table-row,
  .task-row,
  .drop-zone,
  .preflight-card,
  .tracker-step,
  .result-row,
  .check-option,
  .choice-card,
  .option-card,
  .provider-card,
  .card,
  .option,
  .selectable,
  .metric-card,
  .field-card,
  .copy-card
) :where(p, span, small, label, li, div) {
  color: #5b4d44 !important;
}

:root[data-theme="dark"] .stage-work-card :where(
  .task-box,
  .task-body,
  .route-box,
  .next-step-box,
  .stage-checkline,
  .task-guide,
  .warning-block,
  .table-row,
  .task-row,
  .drop-zone,
  .preflight-card,
  .tracker-step,
  .result-row,
  .check-option,
  .choice-card,
  .option-card,
  .provider-card,
  .card,
  .option,
  .selectable,
  .metric-card,
  .field-card,
  .copy-card
) :where(strong, b, h2, h3, h4) {
  color: #171612 !important;
}

:root[data-theme="dark"] .stage-work-card :where(.task-guide, .next-step-box, .stage-checkline, .route-box) > strong:first-child {
  color: #d45200 !important;
}

:root[data-theme="dark"] .stage-work-card .check-option,
:root[data-theme="dark"] .stage-work-card .check-option span {
  color: #171612 !important;
}

:root[data-theme="dark"] .stage-work-card input[type="checkbox"] {
  background-color: #ffffff !important;
  border-color: #ff7018 !important;
}

:root[data-theme="dark"] .stage-work-card .task-box.done,
:root[data-theme="dark"] .stage-work-card .task-box.done .task-body,
:root[data-theme="dark"] .stage-work-card .stage-checkline.done {
  background-color: #eefaf0 !important;
  color: #102015 !important;
}

:root[data-theme="dark"] .stage-work-card .task-box.done :where(p, span, small, label, li, div, strong, b, h2, h3, h4),
:root[data-theme="dark"] .stage-work-card .stage-checkline.done :where(p, span, small, label, li, div, strong, b, h2, h3, h4) {
  color: #102015 !important;
}

:root[data-theme="dark"] .production-bottom-rule,
:root[data-theme="dark"] .production-bottom-rule * {
  color: #171612 !important;
}

.header-account:is(:hover, :focus-visible, .tip-open)::after,
.header-stax:is(:hover, :focus-visible, .tip-open)::after {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 10080 !important;
}

.header-tip-popover {
  position: fixed;
  z-index: 20000;
  display: block;
  pointer-events: none;
  padding: 10px 12px;
  border: 1px solid rgba(255,120,30,0.78);
  border-radius: var(--radius);
  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,0.28);
}

.header-tip-popover[hidden] {
  display: none;
}

:root[data-theme="dark"] .header-tip-popover {
  border-color: rgba(255,120,30,0.9);
  background: #fff1e4;
  color: #171612;
  box-shadow:
    0 0 0 2px rgba(255,120,30,0.26),
    0 18px 46px rgba(0,0,0,0.62);
}

.header-account[data-tip]::after,
.header-stax[data-tip]::after,
.header-account:is(:hover, :focus-visible, .tip-open)::after,
.header-stax:is(:hover, :focus-visible, .tip-open)::after {
  content: none !important;
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

@media (max-width: 700px) {
  .stage-label {
    font-size: 11px;
  }
}

@media (max-width: 520px) {
  .top-actions {
    gap: 7px;
  }

  .header-stax {
    height: 56px;
    overflow: hidden;
  }

  .header-stax img {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .header-stax span {
    font-size: 8px;
  }

  .header-account {
    margin-top: 0;
  }
}

@media (max-width: 520px) {
  .topbar {
    min-height: 170px;
    padding: 10px 10px 11px;
  }

  .brand {
    grid-template-columns: 34px minmax(0, 1fr);
    max-width: calc(100% - 96px);
  }

  .logo-mark {
    width: 34px;
    flex-basis: 34px;
  }

  .product {
    font-size: 24px;
  }

  .tagline {
    top: 69px;
    left: 12px;
    right: 96px;
    font-size: 10.6px;
    line-height: 1.35;
    max-height: none;
    overflow: visible;
    padding-bottom: 2px;
  }

  .top-actions {
    top: 0;
    right: 0;
    width: 74px;
    gap: 5px;
  }

  .header-stax {
    height: 54px;
    min-width: 74px;
    padding: 3px 5px 4px;
  }

  .header-stax img {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .header-stax span {
    font-size: 8px;
  }

  .header-account {
    min-width: 74px;
    height: 32px;
    min-height: 32px;
    padding: 3px 5px;
  }

  .header-account strong {
    font-size: 10px;
    line-height: 1.02;
  }

  .header-account strong em {
    font-size: 7.2px;
  }

  .header-theme {
    left: 10px;
    bottom: 9px;
  }

  .theme-switcher {
    min-height: 28px;
  }

  .theme-switcher button {
    width: 26px;
    height: 26px;
  }

  .header-workspace-chip {
    left: 102px;
    right: 10px;
    bottom: 9px;
    width: auto;
    min-height: 30px;
    padding: 3px 7px;
  }

  .header-workspace-chip strong {
    font-size: 11.5px;
  }

  .workspace-edit {
    min-height: 24px;
    padding: 3px 8px;
  }

  .guide-strip {
    padding-bottom: 8px;
  }

  .progress-rail {
    min-height: 82px;
  }

  .stage-tabs {
    min-height: 58px;
  }

  .stage-link {
    min-height: 28px;
    padding: 8px 4px 5px;
  }

  .stage-label {
    font-size: 9px;
  }

  .overall-progress-row {
    margin-top: 3px;
  }

  .screen-head h1 {
    font-size: 28px;
    line-height: 1.08;
  }
}

@media (orientation: landscape) and (max-height: 520px) and (max-width: 960px) {
  .topbar {
    min-height: 244px;
  }

  .header-theme {
    bottom: 11px;
  }

  .header-workspace-chip {
    bottom: 11px;
  }
}

/* Mobile header system shared with the other SolidOATH apps. */
@media (min-width: 769px) and (max-width: 1040px) {
  .topbar {
    min-height: 178px !important;
    padding: 14px 18px 20px !important;
  }

  .topbar-row {
    width: min(100%, 920px) !important;
  }

  .brand {
    grid-template-columns: 52px minmax(0, auto) !important;
    max-width: calc(100% - 260px) !important;
  }

  .logo-mark {
    width: 52px !important;
    flex-basis: 52px !important;
  }

  .product {
    font-size: clamp(38px, 5.2vw, 46px) !important;
  }

  .byline {
    font-size: 15px !important;
  }

  .version {
    font-size: 10px !important;
  }

  .tagline {
    width: min(520px, calc(100% - 280px)) !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
  }

  .top-actions {
    top: 14px !important;
    right: max(18px, calc((100vw - 920px) / 2 + 18px)) !important;
    width: 100px !important;
    height: 94px !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;
    flex-basis: 58px !important;
  }

  .header-theme {
    left: max(18px, calc((100vw - 920px) / 2 + 18px)) !important;
  }

  .header-workspace-chip {
    right: max(18px, calc((100vw - 920px) / 2 + 18px)) !important;
    width: min(260px, calc(100% - 320px)) !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 {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    column-gap: 8px !important;
    max-width: calc(100% - 116px) !important;
  }

  .logo-mark {
    width: 42px !important;
    flex-basis: 42px !important;
    border-radius: 8px !important;
  }

  .title-lockup {
    align-items: flex-start !important;
    gap: 3px 5px !important;
  }

  .product {
    font-size: 32px !important;
    line-height: .94 !important;
  }

  .byline {
    font-size: 13px !important;
  }

  .version {
    font-size: 9px !important;
    padding: 2px 5px !important;
  }

  .tagline {
    left: 62px !important;
    right: 112px !important;
    top: auto !important;
    bottom: 50px !important;
    width: auto !important;
    transform: none !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;
    width: 96px !important;
    height: 78px !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;
    flex-basis: 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;
  }

  .header-workspace-chip {
    right: 12px !important;
    bottom: 12px !important;
    width: min(210px, calc(100% - 126px)) !important;
    min-height: 34px !important;
  }
}

@media (max-width: 390px) {
  .topbar {
    min-height: 190px !important;
  }

  .brand {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    max-width: calc(100% - 106px) !important;
  }

  .logo-mark {
    width: 38px !important;
    flex-basis: 38px !important;
  }

  .product {
    font-size: 28px !important;
  }

  .byline {
    font-size: 12px !important;
  }

  .top-actions,
  .header-stax {
    width: 88px !important;
    height: 72px !important;
  }

  .tagline {
    top: 74px !important;
    bottom: auto !important;
    left: 58px !important;
    right: 102px !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    transform: none !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere;
    text-align: left !important;
    font-size: 10.8px !important;
    line-height: 1.22 !important;
  }
}

/* Final launch polish override: desktop/tablet header breathing room and account entry. */
@media (min-width: 769px) {
  .topbar {
    min-height: 184px !important;
    padding-top: 12px !important;
    padding-bottom: 20px !important;
  }

  .topbar-row {
    width: min(1120px, calc(100% - 56px)) !important;
  }

  .brand {
    max-width: calc(100% - 300px) !important;
  }

  .logo-mark {
    width: 52px !important;
    flex-basis: 52px !important;
  }

  .product {
    font-size: clamp(38px, 4.4vw, 46px) !important;
  }

  .tagline {
    top: 70px !important;
    left: max(118px, calc((100vw - 1120px) / 2 + 118px)) !important;
    right: max(160px, calc((100vw - 1120px) / 2 + 160px)) !important;
    width: auto !important;
    max-width: 520px !important;
    transform: none !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere;
    text-align: left !important;
    line-height: 1.22 !important;
    font-size: clamp(13px, 1.25vw, 16px) !important;
  }

  .top-actions {
    top: 8px !important;
    right: 0 !important;
    width: 108px !important;
    height: 108px !important;
  }

  .header-stax {
    width: 108px !important;
    height: 108px !important;
    padding: 7px !important;
  }

  .header-stax img {
    width: 64px !important;
    height: 64px !important;
    flex-basis: 64px !important;
  }

  .header-stax span {
    transform: none !important;
    line-height: 0.96 !important;
  }

  .header-workspace-chip {
    bottom: 14px !important;
    width: min(360px, calc(100% - 420px)) !important;
    min-height: 40px !important;
  }

  .header-theme {
    bottom: 18px !important;
  }
}

.account-create-section {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 120, 30, 0.34);
  border-radius: 12px;
  background: rgba(255, 120, 30, 0.08);
}

.account-create-section strong {
  color: var(--sp-text);
  font-size: 15px;
}

.account-create-section p {
  margin: 0 !important;
  font-size: 13px;
  line-height: 1.38;
}

.account-modal-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 560px) {
  .account-modal-actions {
    grid-template-columns: 1fr;
  }
}

/* Absolute EOF shared app shell lock - 2026-06-28 */
.topbar { min-height: 194px !important; padding: 18px 28px !important; }
.topbar-row, .guide-inner { width: min(1120px, calc(100% - 56px)) !important; margin-inline: auto !important; }
.brand { max-width: calc(100% - 300px) !important; }
.logo-mark { width: 58px !important; flex-basis: 58px !important; border-radius: 10px !important; }
.product { font-size: 48px !important; line-height: .94 !important; font-weight: 700 !important; }
.product > span { color: rgba(255, 255, 255, .58) !important; }
.byline { color: rgba(255, 255, 255, .82) !important; font-size: 16px !important; }
.version { 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; }
.tagline, :root[data-theme="dark"] .tagline { 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; width: 108px !important; height: 108px !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; flex-basis: 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; }
.guide-strip { top: 194px !important; }
select, option, input, textarea, :root[data-theme="dark"] select, :root[data-theme="dark"] option, :root[data-theme="dark"] input, :root[data-theme="dark"] textarea { color: #171612 !important; }
select, option, :root[data-theme="dark"] select, :root[data-theme="dark"] option { background: #fffaf4 !important; }
.account-modal-card, :root[data-theme="dark"] .account-modal-card { background: #fffaf4 !important; color: #171612 !important; }
.account-modal-card *, :root[data-theme="dark"] .account-modal-card * { color: #171612 !important; }
.account-modal-kicker, .account-create-section > span, :root[data-theme="dark"] .account-modal-kicker, :root[data-theme="dark"] .account-create-section > span { color: #ad4200 !important; }
@media (max-width: 560px) { .topbar { min-height: 178px !important; padding: 10px 12px 18px !important; } .topbar-row, .guide-inner { width: min(430px, calc(100% - 18px)) !important; } .brand { max-width: calc(100% - 116px) !important; } .logo-mark { width: 42px !important; flex-basis: 42px !important; } .product { font-size: 32px !important; } .byline { font-size: 13px !important; } .tagline, :root[data-theme="dark"] .tagline { 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; width: 96px !important; height: 78px !important; } .header-stax { width: 96px !important; height: 78px !important; } .header-stax img { width: 46px !important; height: 46px !important; flex-basis: 46px !important; } .guide-strip { position: sticky !important; top: 0 !important; } }

/* True EOF alignment lock - 2026-06-28 */
.top-actions { right: 0 !important; }
.tagline, :root[data-theme="dark"] .tagline {
  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; }
  .tagline, :root[data-theme="dark"] .tagline {
    left: 81px !important;
    right: 112px !important;
    top: 70px !important;
  }
}

/* Micro alignment: tagline begins under app name, not logo/byline. */
.tagline, :root[data-theme="dark"] .tagline {
  left: max(63px, calc((100vw - 1120px) / 2 + 63px)) !important;
}
@media (max-width: 560px) {
  .tagline, :root[data-theme="dark"] .tagline { left: 72px !important; }
}

/* Header and ONE final punch-list lock - 2026-06-28 */
.topbar {
  min-height: 194px !important;
  height: 194px !important;
}

.topbar-row,
.guide-inner {
  width: min(1120px, calc(100% - 56px)) !important;
  margin-inline: auto !important;
}

.logo-mark {
  width: 58px !important;
  flex-basis: 58px !important;
  border-radius: 10px !important;
}

.tagline,
:root[data-theme="dark"] .tagline {
  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;
}

.guide-strip {
  top: 194px !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,
  .guide-inner {
    width: min(430px, calc(100% - 18px)) !important;
  }

  .logo-mark {
    width: 42px !important;
    flex-basis: 42px !important;
  }

  .tagline,
  :root[data-theme="dark"] .tagline {
    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;
  }

  .guide-strip {
    position: sticky !important;
    top: 0 !important;
  }
}

/* Light-theme header contrast correction - 2026-06-28 */
:root:not([data-theme="dark"]) .product > span {
  color: rgba(148, 143, 135, .96) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .58) !important;
}

:root:not([data-theme="dark"]) .byline,
:root:not([data-theme="dark"]) .version {
  color: rgba(148, 143, 135, .96) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .58) !important;
}

:root[data-theme="dark"] .product > span {
  color: rgba(255, 255, 255, .58) !important;
}

:root[data-theme="dark"] .byline,
:root[data-theme="dark"] .version {
  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 {
    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;
  }

  .logo-mark {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    flex: 0 0 58px !important;
  }

  .title-lockup {
    min-width: 0 !important;
  }

  .product {
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
  }

  .product > span {
    color: rgba(255, 255, 255, .72) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .62) !important;
  }

  .byline,
  .version {
    color: rgba(255, 255, 255, .86) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .62) !important;
  }

  .tagline,
  :root[data-theme="dark"] .tagline {
    top: 60px !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;
  }

  .guide-strip {
    margin-top: 0 !important;
    top: 0 !important;
  }

  .guide-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;
}

/* 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,
  .guide-inner {
    width: min(430px, calc(100% - 18px)) !important;
  }

  .brand {
    max-width: calc(100% - 88px) !important;
    gap: 7px !important;
  }

  .logo-mark {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    flex-basis: 36px !important;
  }

  .product {
    font-size: 28px !important;
    line-height: .94 !important;
  }

  .byline {
    font-size: 10px !important;
    line-height: 1.05 !important;
  }

  .version {
    font-size: 8px !important;
    padding: 1px 4px !important;
  }

  .tagline,
  :root[data-theme="dark"] .tagline {
    top: 50px !important;
    bottom: auto !important;
    left: 45px !important;
    right: 112px !important;
    max-width: none !important;
    width: auto !important;
    transform: none !important;
    font-size: 10px !important;
    line-height: 1.12 !important;
    text-align: left !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 {
    display: block !important;
    font-size: 9px !important;
    line-height: 1 !important;
  }

  .header-theme {
    left: 10px !important;
    bottom: 12px !important;
  }
}

@media (max-width: 390px) {
  .product {
    font-size: 25px !important;
  }

  .byline {
    font-size: 9px !important;
  }

  .tagline,
  :root[data-theme="dark"] .tagline {
    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: keep version beside the Passage name. */
@media (max-width: 560px) {
  .title-lockup {
    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;
  }

  .product {
    grid-area: name !important;
    font-size: 28px !important;
    line-height: .92 !important;
  }

  .version {
    grid-area: version !important;
    align-self: center !important;
    margin: 0 !important;
    font-size: 8px !important;
    line-height: 1 !important;
    padding: 2px 5px !important;
  }

  .byline {
    grid-area: by !important;
    font-size: 10px !important;
    line-height: 1.05 !important;
  }
}

@media (max-width: 390px) {
  .product {
    font-size: 25px !important;
  }

  .byline {
    font-size: 9px !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 {
    position: absolute !important;
    top: 10px !important;
    left: 2px !important;
    max-width: calc(100% - 98px) !important;
    gap: 7px !important;
  }

  .logo-mark {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    flex-basis: 36px !important;
  }

  .product {
    font-size: 25px !important;
    line-height: 23px !important;
  }

  .version {
    font-size: 8px !important;
    line-height: 1 !important;
    padding: 2px 5px !important;
  }

  .byline {
    font-size: 10px !important;
    line-height: 1.05 !important;
  }

  .tagline,
  :root[data-theme="dark"] .tagline {
    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;
  }
}

/* Mobile final numeric alignment: match shared top offsets and ONE right edge. */
@media (max-width: 560px) {
  .brand {
    top: 8px !important;
  }

  .logo-mark {
    position: relative !important;
    top: 1px !important;
  }

  .top-actions {
    right: -10px !important;
  }
}

/* Mobile source-of-truth lock: match Bridge header geometry and keep Launch tab centering. */
@media (max-width: 560px) {
  .brand {
    top: 9px !important;
    left: 1px !important;
    gap: 7px !important;
  }

  .logo-mark {
    width: 34px !important;
    height: 34px !important;
    min-width: 0 !important;
    flex-basis: auto !important;
    padding: 1px !important;
    box-sizing: content-box !important;
    position: relative !important;
    top: 0 !important;
    object-fit: contain !important;
    transform: none !important;
  }

  .title-lockup {
    position: relative !important;
    left: -2px !important;
  }

  .top-actions {
    top: 10px !important;
    right: -10px !important;
    width: 78px !important;
    height: 72px !important;
  }

  .product {
    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-link {
    place-items: center !important;
    justify-content: center !important;
    align-content: center !important;
  }

  .ai-helper-bubble {
    right: max(16px, env(safe-area-inset-right)) !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
    z-index: 90 !important;
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !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 {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 15px !important;
    padding: 2px 7px !important;
    border-radius: 999px !important;
    font-size: 8.5px !important;
    line-height: 1 !important;
  }
}

/* Mobile hero tint: bring LAUNCH closer to BASE's darker forest treatment. */
@media (max-width: 768px) {
  .topbar::before {
    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, .80) 0%, rgba(8, 7, 15, .70) 45%, rgba(8, 7, 15, .34) 100%),
      linear-gradient(180deg, rgba(8, 7, 15, .22) 0%, rgba(8, 7, 15, .08) 50%, rgba(8, 7, 15, .46) 100%),
      url("../public/stonepath-hero-passage.png") 82% 58% / min(1120px, 112vw) auto no-repeat !important;
    opacity: 1 !important;
  }

  :root[data-theme="dark"] .topbar::before {
    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, .81) 0%, rgba(8, 7, 15, .71) 45%, rgba(8, 7, 15, .31) 100%),
      linear-gradient(180deg, rgba(8, 7, 15, .22) 0%, rgba(8, 7, 15, .07) 50%, rgba(8, 7, 15, .48) 100%),
      url("../public/stonepath-hero-passage.png") 82% 58% / min(1120px, 112vw) auto no-repeat !important;
    opacity: 1 !important;
  }
}

/* Final mobile version pill lock: match START's white filled pill in both themes. */
@media (max-width: 560px) {
  .version,
  :root:not([data-theme="dark"]) .version,
  :root[data-theme="dark"] .version {
    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) {
  :root[data-theme="dark"] .guide-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;
  }

  :root[data-theme="dark"] .overall-progress {
    background: rgba(255, 176, 106, .16) !important;
  }
}

/* Desktop/mobile version pill lock: match START's filled white badge in both themes. */
.version,
:root:not([data-theme="dark"]) .version,
:root[data-theme="dark"] .version {
  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;
}

@media (max-width: 560px) {
  .version,
  :root:not([data-theme="dark"]) .version,
  :root[data-theme="dark"] .version {
    min-height: 15px !important;
    padding: 2px 7px !important;
    font-size: 8.5px !important;
  }
}

/* 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;
  }

  .guide-strip {
    position: sticky !important;
    top: 0 !important;
    z-index: 60 !important;
    margin-top: 0 !important;
    min-height: 105px !important;
    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;
  }

  .progress-rail {
    min-height: 96px !important;
    gap: 4px !important;
  }

  .stage-tabs {
    min-height: 72px !important;
  }

  :root[data-theme="dark"] .guide-strip {
    top: 0 !important;
    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;
  }

  .top-actions {
    top: auto !important;
    right: -10px !important;
    bottom: 14px !important;
    width: 78px !important;
    height: 72px !important;
  }
}

/* Mobile ONE button lock: match START placement and size exactly. */
@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: center ONE button and match START's SolidOATH Core modal. */
@media (min-width: 901px) {
  .top-actions {
    top: calc(50% - 2px) !important;
    transform: translateY(-50%) !important;
  }

  .account-modal-card {
    position: relative !important;
    display: grid !important;
    width: min(620px, calc(100vw - 28px)) !important;
    gap: 18px !important;
    padding: 22px !important;
    border: 1px solid rgb(60, 65, 56) !important;
    border-radius: 8px !important;
    background: #fffaf4 !important;
    color: #171612 !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .28) !important;
  }

  .account-modal-card .help-close {
    position: absolute !important;
    top: 18px !important;
    right: 18px !important;
    display: inline-grid !important;
    place-items: center !important;
    width: 34px !important;
    height: 34px !important;
    padding: 1px 6px !important;
    border: 1px solid rgba(255, 120, 30, .55) !important;
    border-radius: 9px !important;
    background: #fffaf4 !important;
    color: #171612 !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 18px !important;
    cursor: pointer !important;
  }

  .account-modal-card h2 {
    margin: 0 34px 8px 0 !important;
    color: #171612 !important;
    font-size: 16.8px !important;
    line-height: 21px !important;
    font-weight: 700 !important;
  }

  .account-modal-card > p {
    margin: 0 !important;
    color: #171612 !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.42 !important;
  }

  .account-modal-card .one-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(210px, .75fr) !important;
    gap: 12px !important;
  }

  .account-modal-card .one-grid > section {
    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;
  }

  .account-modal-card .one-kicker,
  .account-modal-card .one-grid span {
    color: #ad4200 !important;
    font-family: var(--sp-mono) !important;
    font-size: 11px !important;
    font-weight: 950 !important;
    letter-spacing: .1em !important;
    line-height: 1.1 !important;
    text-transform: uppercase !important;
  }

  .account-modal-card .one-grid strong {
    color: #171612 !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
  }

  .account-modal-card .one-grid p {
    margin: 0 !important;
    color: #68606a !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
  }

  .account-modal-card .one-merge-note {
    grid-column: 1 / -1 !important;
    border-color: rgba(255, 120, 30, .28) !important;
    background: rgba(255, 120, 30, .06) !important;
  }

  .account-modal-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;
    font-weight: 400 !important;
    line-height: 1.35 !important;
  }

  .account-modal-card .one-actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
  }

  .account-modal-card .one-action-primary,
  .account-modal-card .one-action-secondary {
    min-height: 40px !important;
    padding: 8px 14px !important;
    border-radius: 999px !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
  }

  .account-modal-card .one-action-primary {
    border: 0 !important;
    background: var(--sp-orange) !important;
    color: #171612 !important;
  }

  .account-modal-card .one-action-secondary {
    border: 1px solid rgba(31, 27, 22, .16) !important;
    background: #fffaf4 !important;
    color: #171612 !important;
  }
}

/* Tablet-only header rail: keep theme pill and tagline inside the app margins. */
@media (min-width: 561px) and (max-width: 1040px) {
  .topbar {
    width: 100% !important;
    max-width: none !important;
    min-height: 194px !important;
    height: 194px !important;
    padding-inline: 0 !important;
  }

  .topbar-row,
  .guide-inner {
    width: min(920px, calc(100% - 96px)) !important;
    margin-inline: auto !important;
  }

  .brand {
    max-width: calc(100% - 170px) !important;
    grid-template-columns: 58px minmax(0, auto) !important;
  }

  .title-lockup {
    display: grid !important;
    grid-template-columns: auto auto !important;
    grid-template-areas:
      "product version"
      "byline byline" !important;
    align-items: center !important;
    justify-content: start !important;
    column-gap: 6px !important;
    row-gap: 1px !important;
    min-width: 0 !important;
    white-space: nowrap !important;
  }

  .logo-mark {
    width: 58px !important;
    flex-basis: 58px !important;
  }

  .product {
    grid-area: product !important;
    font-size: clamp(38px, 5vw, 46px) !important;
    line-height: .94 !important;
  }

  .byline {
    grid-area: byline !important;
    font-size: 13px !important;
    line-height: 1.05 !important;
  }

  .version {
    grid-area: version !important;
    align-self: center !important;
    margin: 0 !important;
    font-size: 9px !important;
    line-height: 1 !important;
    padding: 2px 6px !important;
  }

  .tagline,
  :root[data-theme="dark"] .tagline {
    left: calc((100vw - min(920px, calc(100vw - 96px))) / 2 + 70px) !important;
    right: calc((100vw - min(920px, calc(100vw - 96px))) / 2 + 132px) !important;
    top: 84px !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  .header-theme {
    left: calc((100vw - min(920px, calc(100vw - 96px))) / 2) !important;
    bottom: 18px !important;
  }

  .top-actions {
    right: calc((100vw - min(920px, calc(100vw - 96px))) / 2) !important;
  }
}

.stage-link.active:not(.done) .stage-label {
  color: #944000 !important;
}

/* Passive guidance lock: non-clickable notes should not look like controls. */
#app .stage-work-card .task-guide,
:root[data-theme="dark"] #app .stage-work-card .task-guide {
  position: relative !important;
  display: block !important;
  min-width: 0 !important;
  padding: 2px 0 2px 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #5f5046 !important;
}

#app .stage-work-card .task-guide::before {
  content: "•";
  position: absolute;
  left: 2px;
  top: 1px;
  color: #ad4200;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

#app .stage-work-card .task-guide strong,
:root[data-theme="dark"] #app .stage-work-card .task-guide strong {
  display: inline !important;
  color: #ad4200 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
}

#app .stage-work-card .task-guide span,
:root[data-theme="dark"] #app .stage-work-card .task-guide span {
  display: inline !important;
  color: #5f5046 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

#app .stage-work-card .route-box,
#app .stage-work-card .next-step-box,
#app .stage-work-card .stage-checkline,
#app .stage-work-card .stonepath-signal,
:root[data-theme="dark"] #app .stage-work-card .route-box,
:root[data-theme="dark"] #app .stage-work-card .next-step-box,
:root[data-theme="dark"] #app .stage-work-card .stage-checkline,
:root[data-theme="dark"] #app .stage-work-card .stonepath-signal {
  position: relative !important;
  display: block !important;
  min-width: 0 !important;
  padding: 2px 0 2px 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #5f5046 !important;
  line-height: 1.42 !important;
}

#app .stage-work-card .route-box::before,
#app .stage-work-card .next-step-box::before,
#app .stage-work-card .stage-checkline::before,
#app .stage-work-card .stonepath-signal::before {
  content: "*";
  position: absolute;
  left: 2px;
  top: 1px;
  color: #ad4200;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

#app .stage-work-card :where(.route-box, .next-step-box, .stage-checkline, .stonepath-signal) strong,
#app .stage-work-card :where(.route-box, .next-step-box, .stage-checkline, .stonepath-signal) b,
:root[data-theme="dark"] #app .stage-work-card :where(.route-box, .next-step-box, .stage-checkline, .stonepath-signal) strong,
:root[data-theme="dark"] #app .stage-work-card :where(.route-box, .next-step-box, .stage-checkline, .stonepath-signal) b {
  color: #171612 !important;
  font-weight: 900 !important;
}

#app .stage-work-card :where(.route-box, .next-step-box, .stage-checkline, .stonepath-signal) span,
#app .stage-work-card :where(.route-box, .next-step-box, .stage-checkline, .stonepath-signal) small,
:root[data-theme="dark"] #app .stage-work-card :where(.route-box, .next-step-box, .stage-checkline, .stonepath-signal) span,
:root[data-theme="dark"] #app .stage-work-card :where(.route-box, .next-step-box, .stage-checkline, .stonepath-signal) small {
  color: #5f5046 !important;
}

#app .stage-work-card .warning-block,
#app .stage-work-card .sensitive-warning,
:root[data-theme="dark"] #app .stage-work-card .warning-block,
:root[data-theme="dark"] #app .stage-work-card .sensitive-warning {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  padding: 3px 0 3px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #5f5046 !important;
}

#app .stage-work-card .warning-block > span:first-child,
#app .stage-work-card .sensitive-warning > span:first-child,
:root[data-theme="dark"] #app .stage-work-card .warning-block > span:first-child,
:root[data-theme="dark"] #app .stage-work-card .sensitive-warning > span:first-child {
  flex: 0 0 auto !important;
  color: #ad4200 !important;
  font-weight: 900 !important;
}

#app .production-bottom-rule,
:root[data-theme="dark"] #app .production-bottom-rule {
  position: relative !important;
  padding: 4px 0 4px 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #5f5046 !important;
}

#app .production-bottom-rule {
  color: #5f5046 !important;
}

:root[data-theme="dark"] #app .production-bottom-rule {
  color: #fff0e6 !important;
}

#app .production-bottom-rule::before {
  content: "!";
  position: absolute;
  left: 2px;
  top: 3px;
  color: #ff6b5f;
  font-weight: 900;
  line-height: 1;
}

#app .production-bottom-rule strong,
:root[data-theme="dark"] #app .production-bottom-rule strong {
  color: inherit !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.assistant-panel[aria-hidden="true"] {
  display: none !important;
}

/* Dark stage rail contrast: keep navigation readable without making locked steps look active. */
:root[data-theme="dark"] .progress-rail .stage-link {
  opacity: 1 !important;
  color: #d9ccc0 !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .46);
}

:root[data-theme="dark"] .progress-rail .stage-label {
  color: inherit !important;
  font-weight: 900 !important;
}

:root[data-theme="dark"] .progress-rail .stage-link[disabled],
:root[data-theme="dark"] .progress-rail .stage-link.locked {
  color: #b8a99d !important;
}

:root[data-theme="dark"] .progress-rail .stage-link.active,
:root[data-theme="dark"] .progress-rail .stage-link.active .stage-label,
:root[data-theme="dark"] .progress-rail .stage-link.done.active .stage-label {
  color: #ff8a2a !important;
  text-shadow: 0 0 14px rgba(255, 120, 30, .22);
}

:root[data-theme="dark"] .progress-rail .stage-link.active.done,
:root[data-theme="dark"] .progress-rail .stage-link.active.done .stage-label {
  color: #d9ccc0 !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .46);
}

:root[data-theme="dark"] .progress-rail .stage-link.done:not(.active),
:root[data-theme="dark"] .progress-rail .stage-link.done:not(.active) .stage-label {
  color: #d9ccc0 !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .46);
}

:root[data-theme="dark"] .progress-rail .stage-link.done:not(.active)::after {
  background: rgba(39,190,117,0.86) !important;
}

:root[data-theme="dark"] .progress-rail .overall-progress-row strong {
  color: #fffaf4 !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}

/* 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: var(--sp-mono) !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;
    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;
    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;
  }
}

/* Paid helper depth: stage and section-specific Passage assistant notes. */
.assistant-rich-shell {
  display: grid;
  gap: 12px;
}

.assistant-note-card,
.assistant-stage-facts,
.assistant-section-grid article,
.assistant-question-box,
.assistant-live-note {
  border: 1px solid rgba(255, 113, 24, .22);
  border-radius: 12px;
  background: rgba(255, 250, 244, .92);
  padding: 12px;
}

.assistant-note-card.primary {
  border-color: rgba(38, 188, 116, .34);
  background: rgba(38, 188, 116, .08);
}

.assistant-note-card strong,
.assistant-stage-facts strong,
.assistant-section-grid strong,
.assistant-question-box strong,
.assistant-live-note strong {
  display: block;
  margin-bottom: 5px;
  color: #201812;
  font-weight: 950;
}

.assistant-note-card p,
.assistant-section-grid p,
.assistant-question-box p,
.assistant-live-note {
  margin: 0;
  color: #665b52;
  font-size: 14px;
  line-height: 1.5;
}

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

.assistant-stage-facts ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: #665b52;
  font-size: 13px;
}

.assistant-question-box {
  display: grid;
  gap: 10px;
}

.assistant-question-box textarea {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  border: 1px solid rgba(104, 96, 113, .22);
  border-radius: 10px;
  background: #fffaf4;
  color: #201812;
  padding: 10px;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  box-sizing: border-box;
}

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

.assistant-question-chips button {
  border: 1px solid rgba(255, 113, 24, .28);
  border-radius: 999px;
  background: rgba(255, 113, 24, .08);
  color: #a64000;
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.assistant-response {
  border: 1px dashed rgba(104, 96, 113, .26);
  border-radius: 10px;
  background: rgba(104, 96, 113, .05);
  color: #554b43;
  padding: 10px;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
  white-space: pre-wrap;
}

.assistant-response.has-response {
  border-style: solid;
  border-color: rgba(38, 188, 116, .35);
  background: rgba(38, 188, 116, .08);
  color: #201812;
}

.assistant-live-note {
  border-color: rgba(255, 68, 36, .26);
  background: rgba(255, 68, 36, .07);
}

:root[data-theme="dark"] .assistant-note-card,
:root[data-theme="dark"] .assistant-stage-facts,
:root[data-theme="dark"] .assistant-section-grid article,
:root[data-theme="dark"] .assistant-question-box,
:root[data-theme="dark"] .assistant-response,
:root[data-theme="dark"] .assistant-live-note {
  background: rgba(255, 250, 244, .08);
  border-color: rgba(255, 250, 244, .18);
  color: #fffaf4;
}

:root[data-theme="dark"] .assistant-note-card strong,
:root[data-theme="dark"] .assistant-stage-facts strong,
:root[data-theme="dark"] .assistant-section-grid strong,
:root[data-theme="dark"] .assistant-question-box strong,
:root[data-theme="dark"] .assistant-live-note strong {
  color: #fffaf4;
}

:root[data-theme="dark"] .assistant-note-card p,
:root[data-theme="dark"] .assistant-section-grid p,
:root[data-theme="dark"] .assistant-question-box p,
:root[data-theme="dark"] .assistant-stage-facts ul,
:root[data-theme="dark"] .assistant-live-note {
  color: rgba(255, 250, 244, .78);
}

@media (max-width: 720px) {
  .assistant-panel {
    width: calc(100vw - 18px);
    max-height: 78vh;
    padding: 14px;
  }

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

  .assistant-question-box textarea {
    font-size: 13px;
  }
}

/* BASE-style clickable task affordance for LAUNCH collapsed rows. */
#app .task-box:not([open]) {
  cursor: pointer !important;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease !important;
}

#app .task-box:not([open]):hover,
#app .task-box:not([open]):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;
}

#app .task-box:not(.done) .task-num {
  border-color: rgba(255, 113, 24, .44) !important;
  background: #ff7118 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(255, 113, 24, .12) !important;
}

#app .task-box:not(.done):not([open]):hover .task-num,
#app .task-box:not(.done):not([open]):focus-within .task-num {
  border-color: #ff7118 !important;
  background: #ff7118 !important;
  color: #ffffff !important;
}

:root[data-theme="dark"] #app .task-box:not([open]):hover,
:root[data-theme="dark"] #app .task-box:not([open]):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;
}

.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(--sp-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(--sp-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;
}

.purchase-clarity-note {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid rgba(35, 95, 147, .18);
  border-radius: 8px;
  background: rgba(35, 95, 147, .055);
  color: #3f5365;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.42;
  padding: 10px 12px;
}

.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;
}

:root[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);
}

:root[data-theme="dark"] .app-pricing-copy strong {
  color: #fffaf4;
}

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

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

:root[data-theme="dark"] .purchase-clarity-note {
  border-color: rgba(143, 199, 255, .28);
  background: rgba(143, 199, 255, .09);
  color: rgba(245, 250, 255, .86);
}

:root[data-theme="dark"] .paid-mode-badge {
  background: rgba(39,190,117,.14);
  color: #d8f9e7;
}

@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;
  }
}

/* StonePath product lockup: Stone grey, Path white, app name orange italic. */
.product {
  display: inline-flex !important;
  grid-area: product !important;
  align-items: baseline !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

.byline {
  display: none !important;
}

.title-lockup {
  grid-template-columns: max-content max-content !important;
  grid-template-areas: "product version" !important;
  align-items: baseline !important;
  column-gap: 8px !important;
  row-gap: 0 !important;
}

.version {
  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;
}

.product .product-stone,
.product > span.product-stone {
  color: #77716b !important;
  font-style: normal !important;
}

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

.product .product-path,
.product > span.product-path {
  color: #fff !important;
  font-style: normal !important;
}

:root:not([data-theme="dark"]) .product .product-path,
:root[data-theme="dark"] .product .product-path {
  color: #fff !important;
  font-style: normal !important;
}

.product .product-app-name,
.product > strong.product-app-name {
  color: var(--sp-orange) !important;
  font-style: italic !important;
  font-weight: 800 !important;
  margin-left: .2em !important;
}

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

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

@media (min-width: 561px) and (max-width: 920px) {
  .product {
    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) {
  .tagline,
  :root[data-theme="dark"] .tagline {
    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;
    font-weight: 500 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
}

/* Tablet tagline lock: keep the copy tucked under the wordmark within logo height. */
@media (min-width: 561px) and (max-width: 920px) {
  .tagline,
  :root[data-theme="dark"] .tagline {
    top: 54px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
}

/* Dark hover contrast lock: selectable Passage rows and pills stay readable. */
:root[data-theme="dark"] #app .task-box:not(.done):not([open]):hover,
:root[data-theme="dark"] #app .task-box:not(.done):not([open]):focus-within {
  border-color: rgba(255, 113, 24, .78) !important;
  background: #fff1e4 !important;
  color: #171612 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .26), 0 0 0 1px rgba(255, 113, 24, .2) !important;
}

:root[data-theme="dark"] #app .task-box.done:not([open]):hover,
:root[data-theme="dark"] #app .task-box.done:not([open]):focus-within {
  border-color: rgba(39, 190, 117, .68) !important;
  background: #eefaf0 !important;
  color: #102015 !important;
}

:root[data-theme="dark"] #app .task-box:not([open]):hover :where(strong, b, h2, h3, h4),
:root[data-theme="dark"] #app .task-box:not([open]):focus-within :where(strong, b, h2, h3, h4) {
  color: #171612 !important;
  text-shadow: none !important;
}

:root[data-theme="dark"] #app .task-box:not(.done):not([open]):hover :where(p, span, small, label, li, div),
:root[data-theme="dark"] #app .task-box:not(.done):not([open]):focus-within :where(p, span, small, label, li, div) {
  color: #4d4038 !important;
  text-shadow: none !important;
}

:root[data-theme="dark"] #app .stage-work-card :where(.option, .selectable, .choice-card, .option-card, .check-option):is(:hover, :focus-visible, :focus-within) {
  border-color: rgba(255, 113, 24, .78) !important;
  background: #fffaf3 !important;
  color: #171612 !important;
  text-shadow: none !important;
}

:root[data-theme="dark"] #app .stage-work-card :where(.option, .selectable, .choice-card, .option-card, .check-option):is(:hover, :focus-visible, :focus-within) :where(p, span, small, label, li, div) {
  color: #4d4038 !important;
  text-shadow: none !important;
}

:root[data-theme="dark"] #app .stage-work-card :where(.option, .selectable, .choice-card, .option-card).selected:is(:hover, :focus-visible) {
  border-color: #ff9d00 !important;
  background: rgba(255, 120, 30, .92) !important;
  color: #ffffff !important;
}

:root[data-theme="dark"] #app .stage-work-card :where(.option, .selectable, .choice-card, .option-card).selected:is(:hover, :focus-visible) :where(p, span, small, label, li, div, strong, b) {
  color: #ffffff !important;
}

/* Shared ONE modal lock: Groundwork, Passage, and Bridge use the same window language. */
.account-modal-card.one-card:not(.pricing-card),
:root[data-theme="dark"] .account-modal-card.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;
}

.account-modal-card.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;
}

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

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

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

.account-modal-card.one-card:not(.pricing-card) .one-grid > section,
.account-modal-card.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;
}

.account-modal-card.one-card:not(.pricing-card) .one-kicker,
.account-modal-card.one-card:not(.pricing-card) .one-grid span {
  color: #ad4200 !important;
  font-family: var(--sp-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;
}

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

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

.account-modal-card.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;
}

.account-modal-card.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;
}

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

.account-modal-card.one-card:not(.pricing-card) .one-action-primary,
.account-modal-card.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;
}

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

.account-modal-card.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) {
  .account-modal-card.one-card:not(.pricing-card),
  :root[data-theme="dark"] .account-modal-card.one-card:not(.pricing-card) {
    width: min(346px, calc(100vw - 28px)) !important;
    max-height: min(82vh, 760px) !important;
    gap: 16px !important;
    padding: 20px !important;
  }

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

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

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

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

/* Passage walkthrough rail: let the brand header scroll away, keep stages reachable. */
.topbar {
  position: relative !important;
  top: auto !important;
  z-index: 1 !important;
}

.guide-strip {
  position: sticky !important;
  top: 0 !important;
  z-index: 80 !important;
  margin-top: 0 !important;
  background: rgba(255, 253, 249, .94) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: 0 8px 22px rgba(33, 25, 18, .08) !important;
}

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

/* View-specific header rulebook: each view owns its tagline placement. */
@media (min-width: 921px) {
  .tagline,
  :root[data-theme="dark"] .tagline {
    left: max(70px, calc((100vw - 1120px) / 2 + 70px)) !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) {
  .tagline,
  :root[data-theme="dark"] .tagline {
    left: calc((100vw - min(920px, calc(100vw - 96px))) / 2 + 70px) !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) {
  .tagline,
  :root[data-theme="dark"] .tagline {
    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;
  }
}

/* Final AI layer guard: signed-stage content must never block the helper. */
.assistant-panel {
  z-index: 20030 !important;
}

.ai-helper-bubble {
  z-index: 20020 !important;
  pointer-events: auto !important;
}

/* Final app-header art stage: centered app-width canvas, not a full webpage banner. */
:root {
  --passage-header-art-x: 79%;
  --passage-header-art-y: 57%;
  --passage-header-art-size: 415px;
  --passage-header-art-opacity: 1;
}

.forest {
  display: none !important;
}

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

.topbar::before,
:root[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("../public/stonepath-hero-passage.png") var(--passage-header-art-x) var(--passage-header-art-y) / var(--passage-header-art-size) auto no-repeat,
    linear-gradient(#050507, #050507) !important;
  opacity: var(--passage-header-art-opacity) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

.topbar-row,
.header-workspace-chip {
  position: relative !important;
  z-index: 1 !important;
}

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

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

.header-theme {
  position: absolute !important;
  z-index: 2 !important;
}

@media (min-width: 561px) and (max-width: 920px) {
  .topbar::before,
  :root[data-theme="dark"] .topbar::before {
    width: min(920px, calc(100% - 48px)) !important;
  }
}

@media (max-width: 560px) {
  :root {
    --passage-header-art-x: 58%;
    --passage-header-art-y: 78%;
    --passage-header-art-size: 200px;
    --passage-header-art-opacity: 1;
  }

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

.passage-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);
  -webkit-backdrop-filter: blur(16px);
  font-family: inherit;
}

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

.passage-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;
}

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

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

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

.passage-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;
}

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

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

@media (min-width: 561px) {
  .passage-header-art-tool {
    top: 18px;
    bottom: auto;
  }
}

/* Responsive header edge rule: tablet and mobile use full-bleed header canvases. */
@media (max-width: 920px) {
  body > .topbar,
  :root[data-theme="dark"] body > .topbar,
  .topbar,
  :root[data-theme="dark"] .topbar,
  body > .topbar::before,
  :root[data-theme="dark"] body > .topbar::before,
  .topbar::before,
  :root[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;
  }

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

/* Passage tablet header controls align to the visible stage rail edges. */
@media (min-width: 561px) and (max-width: 920px) {
  :root {
    --passage-header-art-x: 71%;
    --passage-header-art-y: 97%;
    --passage-header-art-size: 440px;
    --passage-header-art-opacity: 1;
  }

  .topbar {
    --passage-stage-edge: 24px;
  }

  .topbar-row {
    width: calc(100% - (var(--passage-stage-edge) * 2)) !important;
    max-width: none !important;
    margin-left: var(--passage-stage-edge) !important;
    margin-right: var(--passage-stage-edge) !important;
    margin-inline: var(--passage-stage-edge) !important;
  }

  .brand,
  .header-theme {
    left: var(--passage-stage-edge) !important;
  }

  .tagline,
  :root[data-theme="dark"] .tagline {
    left: calc(var(--passage-stage-edge) + 70px) !important;
    right: auto !important;
  }

  .top-actions {
    right: 0 !important;
  }
}

/* SolidOATH Core logo refresh: the supplied image is the full badge. */
.header-stax,
:root[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;
  }
}
