/* Day one, start with the job (dayone.js): the floating setup card,
   repurposed. The stage, the card and its art come from obstage.css and
   brand-popups.css; this adds the progress bar, Nimbus's line, the reading
   state, the fact rows, the business brain tree, the job cards, the draft
   with its facts marked, and the receipt. Brand tokens, light and dark.
   Calm motion: things rise in, one after another, and nothing moves under
   the cursor. No inline style attributes (the live CSP): numbers ride on
   custom properties set through the style object. */

:root body .ob-stage .d1-card { --d1-ease: cubic-bezier(.2, .8, .2, 1); --d1-tint: rgba(21, 112, 239, .07); --d1-ok: rgba(18, 183, 106, .1); --d1-warn: rgba(255, 92, 0, .1); }
:root body .ob-stage .d1-card > .pv-pad { padding: 22px 28px 20px !important; }
:root body .ob-stage .d1-card:not(:has(.pv-art)) > .pv-pad { padding-top: 26px !important; }
:root body .ob-stage .d1-card .d1-h { margin: 0 40px 6px 0 !important; font: 700 22px/1.2 var(--bp-tight) !important; letter-spacing: -0.015em; color: var(--bp-ink) !important; }
:root body .ob-stage .d1-card .d1-lead { margin: 0 0 16px !important; font: 400 15px/1.5 var(--bp-sans) !important; color: var(--bp-soft) !important; }
:root body .ob-stage .d1-card .d1-fine, :root body .ob-stage .d1-card .pv-fine.d1-fine { margin: 10px 0 0; font: 400 13px/1.45 var(--bp-sans); color: var(--bp-lab); }
:root body .ob-stage .d1-card .d1-muted { color: var(--bp-lab) !important; }
:root body .ob-stage .d1-card .d1-body { display: flex; flex-direction: column; gap: 12px; }

/* The progress bar: four parts, the bar filling as you go. */
.ob-stage .d1-prog { margin: 0 44px 18px 0; }
.ob-stage .d1-bar { height: 4px; border-radius: 999px; background: var(--bp-line2); overflow: hidden; }
.ob-stage .d1-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--bp-blue), var(--bp-green)); transform-origin: left; transform: scaleX(var(--d1-p, 0)); transition: transform 700ms var(--d1-ease); }
.ob-stage .d1-phases { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; font: 500 12px/1 var(--bp-sans); color: var(--bp-lab); }
.ob-stage .d1-phases li { white-space: nowrap; transition: color 300ms ease; }
.ob-stage .d1-phases li.on { color: var(--bp-ink); font-weight: 600; }
.ob-stage .d1-phases li.done { color: var(--bp-green); }

/* Nimbus's line, beside the small cloud. */
.ob-stage .d1-says { display: flex; align-items: center; gap: 10px; margin: 4px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--d1-tint); animation: d1-rise 500ms var(--d1-ease) 300ms both; }
.ob-stage .d1-says p { margin: 0; font: 500 14px/1.4 var(--bp-sans); color: var(--bp-ink); }
.ob-stage .d1-says-c { flex: none; display: grid; place-items: center; width: 30px; height: 30px; }

/* Buttons. */
:root body .ob-stage .d1-card .d1-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--bp-line); }
:root body .ob-stage .d1-card .d1-foot .pv-primary { margin: 0 !important; width: auto !important; min-width: 120px; }
:root body .ob-stage .d1-card .sc-btn.d1-ghost { height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent !important; color: var(--bp-ink) !important; box-shadow: inset 0 0 0 1px var(--bp-line2); font: 600 14px/1 var(--bp-sans); cursor: pointer; transition: background 150ms ease; }
:root body .ob-stage .d1-card .sc-btn.d1-ghost:hover { background: var(--bp-hover) !important; }
:root body .ob-stage .d1-card .sc-btn.d1-small { height: 32px !important; min-height: 0; padding: 0 14px !important; font: 600 13px/1 var(--bp-sans) !important; border-radius: 999px; }
:root body .ob-stage .d1-card .sc-btn.d1-small:not(.d1-ghost) { border: 0; background: var(--bp-pill) !important; color: var(--bp-pilltx) !important; }
:root body .ob-stage .d1-card .sc-btn.d1-yes { background: var(--bp-green) !important; color: #fff !important; }
:root body .ob-stage .d1-card .sc-btn:disabled { opacity: .55; cursor: default; }
:root body .ob-stage .d1-card .sc-btn:focus-visible, .ob-stage .d1-link:focus-visible, .ob-stage .d1-job:focus-visible { outline: none; box-shadow: var(--bp-ring); }
.ob-stage .d1-link { border: 0; background: none; padding: 0; font: 600 13px var(--bp-sans); color: var(--bp-blue); cursor: pointer; }
.ob-stage .d1-note { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--d1-warn); font: 500 13px/1.4 var(--bp-sans); color: var(--bp-ink); animation: d1-rise 300ms var(--d1-ease) both; }
/* Datum's one more yes: its question and the owner's own tap. */
.ob-stage .d1-ask { display: grid; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--d1-warn); animation: d1-rise 300ms var(--d1-ease) both; }
.ob-stage .d1-ask p { margin: 0; font: 500 13px/1.4 var(--bp-sans); color: var(--bp-ink); }
.ob-stage .d1-ask-b { display: flex; gap: 8px; justify-content: flex-end; }
.ob-stage .d1-err { margin: 0; font: 600 13px/1.4 var(--bp-sans); color: var(--bp-red); }
:root body .ob-stage .d1-card .d1-input { width: 100%; box-sizing: border-box; height: 42px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--bp-card); color: var(--bp-ink); box-shadow: inset 0 0 0 1px var(--bp-line2); font: 500 15px var(--bp-sans); outline: none; transition: box-shadow 150ms ease; }
:root body .ob-stage .d1-card .d1-input:focus { box-shadow: inset 0 0 0 1.5px var(--bp-blue), var(--bp-ring); }

/* Reading and writing: the cloud thinking, a calm sweep, each step ticked. */
.ob-stage .d1-reading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 8px 0 4px; }
.ob-stage .d1-reading-c { display: grid; place-items: center; animation: d1-bob 2.4s ease-in-out infinite; }
.ob-stage .d1-scan { position: relative; width: 100%; height: 4px; border-radius: 999px; background: var(--bp-line2); overflow: hidden; }
.ob-stage .d1-scan i { position: absolute; inset: 0 auto 0 0; width: 35%; border-radius: inherit; background: linear-gradient(90deg, transparent, var(--bp-blue), transparent); animation: d1-sweep 1.6s ease-in-out infinite; }
.ob-stage .d1-lines { align-self: stretch; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ob-stage .d1-lines li { display: flex; align-items: center; gap: 10px; font: 500 14px/1.3 var(--bp-sans); color: var(--bp-lab); animation: d1-rise 400ms var(--d1-ease) both; }
.ob-stage .d1-lines li > span { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; font: 700 11px/1 var(--bp-sans); }
.ob-stage .d1-lines li.done > span { background: var(--bp-green); color: #fff; }
.ob-stage .d1-lines li.now { color: var(--bp-ink); }
.ob-stage .d1-lines li.now > span { box-shadow: inset 0 0 0 2px var(--bp-blue); animation: d1-pulse 1.2s ease-in-out infinite; }

/* Your business brain: the core facts. */
.ob-stage .d1-sec-h { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; }
.ob-stage .d1-sec-h b { font: 600 12px/1 var(--bp-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--bp-lab); }
.ob-stage .d1-count { padding: 3px 8px; border-radius: 999px; background: var(--bp-wash); box-shadow: inset 0 0 0 1px var(--bp-line); font: 600 12px/1 var(--bp-sans); color: var(--bp-soft); }
.ob-stage .d1-sec-h .d1-link { margin-left: auto; }
.ob-stage .d1-facts { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ob-stage .d1-fact { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 12px 14px; border-radius: 14px; background: var(--bp-card); box-shadow: inset 0 0 0 1px var(--bp-line2); animation: d1-rise 450ms var(--d1-ease) both; animation-delay: calc(var(--d1-i, 0) * 70ms); transition: background 250ms ease, box-shadow 250ms ease; }
.ob-stage .d1-fact.ok { background: var(--d1-ok); box-shadow: inset 0 0 0 1px rgba(18, 183, 106, .25); }
.ob-stage .d1-fact.fixing { grid-template-columns: 1fr; box-shadow: inset 0 0 0 1.5px var(--bp-blue); }
.ob-stage .d1-fact-h { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.ob-stage .d1-fact-h b { font: 600 12px/1 var(--bp-sans); color: var(--bp-lab); }
.ob-stage .d1-ok { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 999px; background: var(--bp-green); color: #fff; font: 700 11px/1 var(--bp-sans); animation: d1-pop 350ms var(--d1-ease) both; }
.ob-stage .d1-fact-t { margin: 0; min-width: 0; font: 400 15px/1.45 var(--bp-sans); color: var(--bp-ink); }
.ob-stage .d1-fact-b { display: flex; gap: 6px; }
.ob-stage .d1-q { margin: 0; font: 500 14px/1.4 var(--bp-sans); color: var(--bp-ink); }
.ob-stage .d1-fix { display: flex; gap: 8px; align-items: center; }
.ob-stage .d1-fix .d1-input { flex: 1; height: 36px !important; }
@media (max-width: 560px) { .ob-stage .d1-fact { grid-template-columns: 1fr; } .ob-stage .d1-fix { flex-wrap: wrap; } }

/* The business brain as a tree: shown, never asked about. */
.ob-stage .d1-tree { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.ob-stage .d1-node { padding: 12px 14px; border-radius: 14px; background: var(--bp-wash); box-shadow: inset 0 0 0 1px var(--bp-line); animation: d1-rise 500ms var(--d1-ease) both; animation-delay: calc(200ms + var(--d1-i, 0) * 90ms); }
.ob-stage .d1-node-h { display: flex; align-items: center; gap: 8px; }
.ob-stage .d1-node-h b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 14px/1.3 var(--bp-sans); color: var(--bp-ink); }
.ob-stage .d1-dot { flex: none; width: 8px; height: 8px; border-radius: 999px; background: var(--bp-blue); }
.ob-stage .d1-n { flex: none; font: 600 12px/1 var(--bp-sans); color: var(--bp-lab); }
.ob-stage .d1-node ul { margin: 8px 0 0 3px; padding: 0 0 0 12px; list-style: none; border-left: 1.5px solid var(--bp-line2); }
.ob-stage .d1-node ul li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font: 400 13px/1.3 var(--bp-sans); color: var(--bp-soft); }
.ob-stage .d1-later { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--bp-line2); border: 1px dashed transparent; }
.ob-stage .d1-later b { font: 600 14px/1.3 var(--bp-sans); color: var(--bp-ink); }
.ob-stage .d1-later span { font: 400 13px/1.4 var(--bp-sans); color: var(--bp-lab); }

/* Pick your first job. */
.ob-stage .d1-jobs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .ob-stage .d1-jobs { grid-template-columns: 1fr; } }
.ob-stage .d1-job { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 168px; padding: 16px; border: 0; border-radius: 16px; background: var(--bp-card); box-shadow: inset 0 0 0 1px var(--bp-line2); text-align: left; font: inherit; color: var(--bp-ink); animation: d1-rise 450ms var(--d1-ease) both; animation-delay: calc(var(--d1-i, 0) * 80ms); }
.ob-stage .d1-job b { font: 600 15px/1.3 var(--bp-sans); }
.ob-stage .d1-job-l { font: 400 13px/1.4 var(--bp-sans); color: var(--bp-soft); }
.ob-stage .d1-job-tag { padding: 4px 8px; border-radius: 999px; font: 600 11px/1 var(--bp-sans); letter-spacing: .02em; }
.ob-stage .d1-job.ready { cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--bp-ink); transition: transform 200ms var(--d1-ease), box-shadow 200ms ease; }
.ob-stage .d1-job.ready:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--bp-ink), var(--bp-shadow); }
.ob-stage .d1-job.ready .d1-job-tag { background: var(--d1-ok); color: var(--bp-green); }
.ob-stage .d1-job-go { margin-top: auto; font: 600 13px/1 var(--bp-sans); color: var(--bp-ink); }
.ob-stage .d1-job.soon { background: var(--bp-wash); }
.ob-stage .d1-job.soon b, .ob-stage .d1-job.soon .d1-job-l { color: var(--bp-lab); }
.ob-stage .d1-job.soon .d1-job-tag { background: var(--bp-hover); color: var(--bp-lab); }

/* The job's facts, rules and skill. */
.ob-stage .d1-field { display: flex; flex-direction: column; gap: 6px; }
.ob-stage .d1-field b { font: 600 13px/1.3 var(--bp-sans); color: var(--bp-ink); }
.ob-stage .d1-rules { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ob-stage .d1-rule { display: flex; align-items: flex-start; gap: 14px; padding: 14px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--bp-line2); transition: background 250ms ease; }
.ob-stage .d1-rule.on { background: var(--d1-tint); }
.ob-stage .d1-rule-t { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ob-stage .d1-rule-t b { font: 600 14px/1.3 var(--bp-sans); color: var(--bp-ink); }
.ob-stage .d1-rule-t span { font: 400 13px/1.4 var(--bp-sans); color: var(--bp-soft); }
:root body .ob-stage .d1-card .d1-words { margin-top: 6px; height: 36px; font-size: 14px; }
.ob-stage .d1-switch { flex: none; position: relative; width: 40px; height: 24px; padding: 0; border: 0; border-radius: 999px; background: var(--bp-line2); cursor: pointer; transition: background 200ms ease; }
.ob-stage .d1-switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(15, 17, 21, .25); transition: transform 250ms var(--d1-ease); }
.ob-stage .d1-switch.on { background: var(--bp-green); }
.ob-stage .d1-switch.on i { transform: translateX(16px); }
.ob-stage .d1-switch:focus-visible { outline: none; box-shadow: var(--bp-ring); }
.ob-stage .d1-steps { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ob-stage .d1-steps li { display: flex; gap: 12px; animation: d1-rise 450ms var(--d1-ease) both; animation-delay: calc(var(--d1-i, 0) * 70ms); }
.ob-stage .d1-step-n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--bp-pill); color: var(--bp-pilltx); font: 700 12px/1 var(--bp-sans); }
.ob-stage .d1-steps b { display: block; font: 600 14px/1.3 var(--bp-sans); color: var(--bp-ink); }
.ob-stage .d1-steps p { margin: 2px 0 0; font: 400 13px/1.45 var(--bp-sans); color: var(--bp-soft); }
.ob-stage .d1-tone { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bp-wash); box-shadow: inset 0 0 0 1px var(--bp-line); }
.ob-stage .d1-tone > b { font: 600 14px/1 var(--bp-sans); color: var(--bp-ink); }
.ob-stage .d1-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bp-hover); }
.ob-stage .d1-seg button { height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--bp-soft); font: 600 13px/1 var(--bp-sans); cursor: pointer; transition: background 200ms ease, color 200ms ease; }
.ob-stage .d1-seg button.on { background: var(--bp-card); color: var(--bp-ink); box-shadow: 0 1px 3px rgba(15, 17, 21, .12); }

/* The draft: facts marked where they were used, the rule check beneath. */
.ob-stage .d1-post, .ob-stage .d1-quote { margin: 0; padding: 16px 18px; border-radius: 14px; background: var(--bp-wash); box-shadow: inset 0 0 0 1px var(--bp-line); white-space: pre-wrap; font: 400 15px/1.6 var(--bp-sans); color: var(--bp-ink); animation: d1-rise 500ms var(--d1-ease) both; }
:root body .ob-stage .d1-card .d1-edit { width: 100%; box-sizing: border-box; min-height: 200px; padding: 16px 18px; border: 0; border-radius: 14px; background: var(--bp-card); color: var(--bp-ink); box-shadow: inset 0 0 0 1.5px var(--bp-blue); font: 400 15px/1.6 var(--bp-sans); resize: vertical; outline: none; }
:root body .ob-stage .d1-card .d1-edit.d1-small-edit { min-height: 76px; padding: 10px 14px; box-shadow: inset 0 0 0 1px var(--bp-line2); font-size: 14px; }
.ob-stage .d1-hl { padding: 1px 2px; border-radius: 4px; color: inherit; }
.ob-stage .d1-hl sup, .ob-stage .d1-used sup { margin-left: 2px; font: 700 10px/1 var(--bp-sans); color: var(--bp-soft); }
.ob-stage .d1-hl-0 { background: rgba(21, 112, 239, .14); } .ob-stage .d1-used .d1-hl-0 sup { color: var(--bp-blue); }
.ob-stage .d1-hl-1 { background: rgba(18, 183, 106, .16); }
.ob-stage .d1-hl-2 { background: rgba(255, 92, 0, .14); }
.ob-stage .d1-hl-3 { background: rgba(122, 90, 248, .14); }
.ob-stage .d1-hl-4 { background: rgba(240, 68, 56, .12); }
.ob-stage .d1-used { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ob-stage .d1-used li { padding: 6px 10px; border-radius: 10px; font: 400 13px/1.4 var(--bp-sans); color: var(--bp-soft); }
.ob-stage .d1-used li sup { margin: 0 6px 0 0; }
.ob-stage .d1-checks { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ob-stage .d1-checks li { display: flex; align-items: center; gap: 10px; font: 400 14px/1.35 var(--bp-sans); color: var(--bp-ink); }
.ob-stage .d1-checks li > span { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; font: 700 11px/1 var(--bp-sans); color: #fff; }
.ob-stage .d1-checks li.ok > span { background: var(--bp-green); }
.ob-stage .d1-checks li.flag > span { background: var(--bp-orange); }
.ob-stage .d1-checks li b { font-weight: 500; }
.ob-stage .d1-checks li em { margin-left: auto; font: 500 12px/1 var(--bp-sans); font-style: normal; color: var(--bp-lab); white-space: nowrap; }
.ob-stage .d1-checkbox { padding: 12px 14px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--bp-line2); }

/* The receipt: proof it was checked. */
.ob-stage .d1-receipt { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 16px; background: var(--bp-card); box-shadow: inset 0 0 0 1px var(--bp-line2), var(--bp-shadow); animation: d1-rise 550ms var(--d1-ease) both; }
.ob-stage .d1-receipt-h { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1.5px dashed var(--bp-line2); }
.ob-stage .d1-receipt-h b { display: block; font: 700 16px/1.25 var(--bp-tight); color: var(--bp-ink); }
.ob-stage .d1-receipt-h span:not(.d1-seal) { font: 500 12px/1.3 var(--bp-sans); color: var(--bp-lab); }
.ob-stage .d1-seal { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--bp-green); color: #fff; font: 700 18px/1 var(--bp-sans); box-shadow: 0 0 0 6px var(--d1-ok); animation: d1-pop 500ms var(--d1-ease) 250ms both; }
.ob-stage .d1-receipt.flag .d1-seal { background: var(--bp-orange); box-shadow: 0 0 0 6px var(--d1-warn); }
.ob-stage .d1-proof { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font: 400 13px/1.3 var(--bp-sans); color: var(--bp-soft); }
.ob-stage .d1-proof b { font-weight: 700; color: var(--bp-ink); }
.ob-stage .d1-what { flex-direction: column; gap: 8px; font-size: 14px; color: var(--bp-ink); }
.ob-stage .d1-flag { margin: 0; font: 500 13px/1.4 var(--bp-sans); color: var(--bp-ink); }
.ob-stage .d1-quote { max-height: 180px; overflow: auto; animation: none; }

/* Saving what an edit taught. */
.ob-stage .d1-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--bp-line2); }
.ob-stage .d1-opt > b { font: 600 14px/1.3 var(--bp-sans); color: var(--bp-ink); }
.ob-stage .d1-opt > span { font: 400 13px/1.4 var(--bp-sans); color: var(--bp-soft); }

/* Your AI, in the card's own tabs. */
.ob-stage .d1-tabs { margin: 0; }
.ob-stage .d1-howto { margin: 0; }

@keyframes d1-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes d1-pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes d1-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes d1-sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
@keyframes d1-pulse { 0%, 100% { box-shadow: inset 0 0 0 2px var(--bp-blue); } 50% { box-shadow: inset 0 0 0 2px var(--bp-blue), 0 0 0 4px rgba(21, 112, 239, .18); } }

@media (prefers-reduced-motion: reduce) {
  .ob-stage .d1-card *, .ob-stage .d1-card *::before { animation: none !important; transition: none !important; }
}
