/* Ordo's docs (docs.html and docs/*.html, written by docs-src/build.mjs), on top of site.css: a page per topic, the
   menu of topics on the left, and on each page a title with its animated demo, Try it, How it works, Good to know. */

/* ---------- The page ---------- */
.docs-side > ul:first-child { margin-bottom: 4px; }
.docs-side a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.docs-menu a[aria-current="page"] { color: var(--accent-ink); font-weight: 600; }
.doc { min-width: 0; max-width: 820px; }
.doc .prose { max-width: 66ch; }
/* (the demo keeps its width; a long title wraps instead) */
.doc-hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(28px, 4vw, 48px); align-items: center; }
.doc-hero .eyebrow { margin-bottom: 12px; }
.doc-hero h1 { margin: 0; font-size: clamp(38px, 4.4vw, 54px); line-height: 1.02; letter-spacing: -.04em; font-weight: 700; text-wrap: balance; }
.doc-lede { margin: 14px 0 0; color: var(--muted-strong); font-size: 19px; line-height: 1.5; }
.demo-fig { margin: 0; }
.demo-fig figcaption { margin-top: 10px; text-align: center; color: var(--muted); font-size: 12.5px; text-wrap: balance; }
.doc-toc { margin: clamp(28px, 4vw, 40px) 0 0; border-block: 1px solid var(--line); }
.doc-toc summary { display: flex; align-items: center; gap: 10px; padding: 12px 2px; cursor: pointer; list-style: none; font-weight: 600; font-size: 14.5px; }
.doc-toc summary::-webkit-details-marker { display: none; }
.doc-toc summary::before { content: ""; width: 0; height: 0; border-block: 5px solid transparent; border-left: 7px solid currentColor; transition: transform .2s; }
.doc-toc[open] summary::before { transform: rotate(90deg); }
.doc-toc summary span { color: var(--muted); font-weight: 500; }
.doc-toc ul { list-style: none; margin: 0; padding: 0 0 12px 18px; display: grid; gap: 4px; }
.doc-toc a { color: var(--muted-strong); text-decoration: none; font-size: 14.5px; }
.doc-toc a:hover { color: var(--accent-ink); }
.doc .prose > p:first-child { margin-top: 28px; font-size: 17px; }
.doc .prose section { margin-top: 36px; padding-top: 0; border-top: 0; }
.doc .prose h2 { font-size: clamp(24px, 2.4vw, 28px); }
.doc .prose li strong:first-child { color: var(--text); }

/* Try it: where to click, as a dark strip like a command line */
.try { margin-top: 14px; overflow: hidden; border: 1px solid #1f2633; border-radius: 14px; background: #0f131a; color: #e9ebef; }
.try-h { display: flex; padding: 0 16px; border-bottom: 1px solid #1f2633; font-size: 12.5px; }
.try-h b { padding: 10px 0 9px; border-bottom: 2px solid #6d9bff; font-weight: 600; }
.try ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; padding: 16px; list-style: none; }
.try li { display: flex; align-items: center; gap: 10px; margin: 0; color: #e9ebef; }
.try li + li::before { content: "›"; color: #6b7689; font-size: 18px; line-height: 1; }
.try li span { padding: 4px 10px; border-radius: 8px; background: #1a2130; color: #cfdcff; font: 500 14px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; }

/* Keep going, and the docs home: cards that open a topic */
.doc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.doc-card { position: relative; display: block; padding: 16px 44px 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s var(--ease), box-shadow .15s; }
.doc-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.doc-card b { display: block; font-size: 15.5px; }
.doc-card span { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.doc-card .i { position: absolute; right: 16px; top: 18px; width: 16px; height: 16px; color: var(--muted); transition: transform .2s var(--ease), color .15s; }
.doc-card:hover .i { color: var(--accent-ink); transform: translateX(2px); }
.prose .doc-card, .prose .doc-card b { color: var(--text); }
.doc-next { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.doc-next a { display: grid; gap: 2px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; }
.doc-next a:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.doc-next span { color: var(--muted); font-size: 13px; }
.doc-next .next { grid-column: 2; text-align: right; }
.hub-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hub-sec { margin-top: clamp(40px, 5vw, 56px); }
.hub-sec h2 { font-size: clamp(22px, 2.2vw, 26px); letter-spacing: -.02em; }
.hub-p { margin: 8px 0 0; color: var(--muted-strong); }
.hub-jobs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.doc-card.job { padding-block: 20px; }
.doc-card.job b { font-size: 17px; }
.hub .note { margin-top: 48px; }

@media (max-width: 980px) {
  .doc-hero { grid-template-columns: 1fr; }
  .demo-fig { max-width: 440px; }
}
@media (max-width: 600px) {
  .doc-cards, .hub-jobs, .doc-next { grid-template-columns: 1fr; }
  .doc-next .next { grid-column: 1; }
}

/* ---------- The demos: small drawings of Ordo, stepped by site.js (.s1, .s2… stay on once added) ---------- */
.demo { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); color: var(--text); font-size: 12.5px; line-height: 1.35; text-align: left; user-select: none; }
.d-top { display: flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-bottom: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); font-size: 11.5px; }
.d-top i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.d-top b { margin-left: 6px; overflow: hidden; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.d-body { position: relative; min-height: 236px; padding: 14px; transition: opacity .3s; }
.demo.resetting .d-body { opacity: 0; }
.demo *, .demo *::before, .demo *::after { transition-duration: .4s; transition-timing-function: cubic-bezier(.2, .8, .2, 1); }
.d-m { color: var(--muted); font-size: 11.5px; }
.d-r { margin-left: auto; }
.d-link { color: var(--accent-ink); }
.d-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.d-row { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 7px 11px; border-top: 1px solid var(--line-2); }
.d-card > .d-row:first-child, .d-card > div:first-child > .d-row { border-top: 0; }
.d-head { min-height: 32px; background: var(--panel-2); font-size: 12px; }
.d-t { display: block; min-width: 0; font-weight: 500; }
.d-t em { display: block; font-style: normal; font-weight: 400; }
.d-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #d6336c; vertical-align: 1px; }
.d-dot.task { background: #9b59d0; }
.d-dot.mail { background: var(--accent); }
.d-dot.del { background: #dc2626; }
.d-cb { position: relative; flex: none; display: grid; place-items: center; width: 15px; height: 15px; border: 1.5px solid var(--field); border-radius: 4px; background: var(--panel); transition-property: background, border-color; }
.d-cb::after { content: ""; width: 7px; height: 4px; margin-top: -2px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) scale(0); transition-property: transform; }
.d-cb.is { background: var(--accent); border-color: var(--accent); }
.d-cb.is::after { transform: rotate(-45deg) scale(1); }
.d-btn { display: inline-flex; align-items: center; justify-content: center; height: 26px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.d-btn.pri { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.d-tag { flex: none; padding: 1px 6px; border-radius: 5px; background: var(--bg-2); color: var(--muted-strong); font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.d-tag.warn { background: color-mix(in srgb, #f59e0b 16%, transparent); color: #b45309; }
.d-tag.li { background: color-mix(in srgb, #0a66c2 14%, transparent); color: #0a66c2; }
.d-tag.ai { background: var(--accent-soft); color: var(--accent-ink); }
.d-av { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fde2e4; color: #9f1239; font-size: 10.5px; font-weight: 700; }
.d-ok { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); vertical-align: -2px; margin-right: 7px; -webkit-mask: radial-gradient(circle, #000 66%, transparent 67%); }
.d-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .d-tag.warn { color: #f5a524; } :root:not([data-theme="light"]) .d-tag.li { color: #6cb4ff; } :root:not([data-theme="light"]) .d-av { background: #4c1d2a; color: #fda4af; } }
:root[data-theme="dark"] .d-tag.warn { color: #f5a524; }
:root[data-theme="dark"] .d-tag.li { color: #6cb4ff; }
:root[data-theme="dark"] .d-av { background: #4c1d2a; color: #fda4af; }

/* the message at the bottom (as Ordo's toast) */
.d-toast { position: absolute; left: 50%; bottom: 12px; display: flex; gap: 16px; padding: 8px 14px; border-radius: 10px; background: #151a24; color: #fff; font-size: 12px; white-space: nowrap; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5); opacity: 0; transform: translate(-50%, 14px); transition-property: opacity, transform; }
.d-toast b { color: #8bb0ff; font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .d-toast { background: #2a3242; } }
:root[data-theme="dark"] .d-toast { background: #2a3242; }
.s1 .d-toast.at1, .s2 .d-toast.at2, .s3 .d-toast.at3, .s4 .d-toast.at4, .s5 .d-toast.at5, .s6 .d-toast.at6, .s7 .d-toast.at7 { opacity: 1; transform: translate(-50%, 0); }

/* things that appear at a step (.at2: from step 2 on) */
/* (the message has its own way in, centred: see .d-toast) */
.demo :is(.at1, .at2, .at3, .at4, .at5, .at6, .at7):not(.d-toast) { opacity: 0; transform: translateY(6px); transition-property: opacity, transform; }
:is(.s1 .at1, .s2 .at2, .s3 .at3, .s4 .at4, .s5 .at5, .s6 .at6, .s7 .at7):not(.d-toast) { opacity: 1; transform: none; }
/* one value becoming another (.sw2: at step 2) */
.sw { display: inline-grid; }
.sw > * { grid-area: 1 / 1; transition-property: opacity, transform; }
.sw > .b { opacity: 0; transform: translateY(5px); }
.s1 .sw1 > .a, .s2 .sw2 > .a, .s3 .sw3 > .a, .s4 .sw4 > .a, .s5 .sw5 > .a { opacity: 0; transform: translateY(-5px); }
.s1 .sw1 > .b, .s2 .sw2 > .b, .s3 .sw3 > .b, .s4 .sw4 > .b, .s5 .sw5 > .b { opacity: 1; transform: none; }
/* a click (.tap2: at step 2), a ring that spreads and fades */
.tap { position: relative; }
.tap::before { content: ""; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: var(--accent); opacity: 0; pointer-events: none; }
.s1 .tap1::before, .s2 .tap2::before, .s3 .tap3::before, .s4 .tap4::before, .s5 .tap5::before, .s6 .tap6::before, .s7 .tap7::before { animation: d-tap .7s ease-out; }
@keyframes d-tap { from { opacity: .4; transform: scale(.3); } to { opacity: 0; transform: scale(1.5); } }

/* ----- Getting started: the four records ----- */
.d-rec { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.d-rec > div { display: grid; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.d-rec b { font-size: 13px; }
.d-rec em { color: var(--muted); font-style: normal; font-size: 11.5px; }
.d-rec .x-acc { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--accent-soft); }

/* ----- Today's tasks: a task ticked ----- */
.d-count { display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.x-row, .x-t { transition-property: opacity; }
.x-t { position: relative; }
.x-t::after { content: ""; position: absolute; left: 13px; top: 8px; height: 1.5px; width: 0; background: var(--muted); transition-property: width; }
.s2 .x-cb { background: var(--accent); border-color: var(--accent); }
.s2 .x-cb::after { transform: rotate(-45deg) scale(1); }
.s2 .x-t::after { width: calc(100% - 13px); }
.s2 .x-row { opacity: .55; }

/* ----- Change in place: the amount ----- */
.d-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.d-fields.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 14px; }
.d-fields > div { display: grid; gap: 2px; padding: 4px 6px; margin: -4px -6px; border-radius: 7px; transition-property: box-shadow, background; }
.d-fields b { font-size: 13.5px; }
.s1:not(.s3) .x-amt { background: var(--panel); box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px var(--accent-soft); }
.d-stagebar { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; font-size: 11px; font-weight: 600; }
.d-stagebar span { position: relative; z-index: 1; padding: 8px 2px; text-align: center; color: var(--muted-strong); transition-property: color; }
.d-stagebar span + span { border-left: 1px solid var(--line-2); }
.d-stagebar.static .on { background: var(--accent); color: var(--on-accent); }
.d-stagebar .won { color: var(--ok); }

/* ----- Deals: Discovery to Proposal ----- */
.d-stagebar .hl { position: absolute; left: 0; top: 0; bottom: 0; width: 20%; background: var(--accent); transition-property: transform; transition-duration: .55s; }
.d-stagebar .st1 { color: var(--on-accent); }
.s2 .d-stagebar .hl { transform: translateX(100%); }
.s2 .d-stagebar .st1 { color: var(--muted-strong); }
.s2 .d-stagebar .st2 { color: var(--on-accent); }
.d-likely { margin: 8px 0 12px; text-align: right; }
.d-where .d-row { min-height: 34px; }
.d-where .d-m { width: 92px; }

/* ----- Pipeline board: a card dragged to Proposal ----- */
.d-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.d-col { display: grid; align-content: start; gap: 6px; min-height: 196px; padding: 7px; border-radius: 10px; background: var(--bg-2); }
.d-ch { display: flex; justify-content: space-between; gap: 4px; padding: 2px 3px 4px; font-size: 11px; }
.d-ch > span { color: var(--muted-strong); font-weight: 600; }
.d-kc { display: grid; gap: 1px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-weight: 600; transition-property: transform, box-shadow; transition-duration: .6s; }
.d-kc em { color: var(--muted); font-size: 10.5px; font-style: normal; font-weight: 400; }
.s1:not(.s2) .x-move { transform: rotate(2.5deg) scale(1.04); box-shadow: var(--shadow); }
/* (one column across: a card's width, the column's padding either side, and the gap) */
.s2 .x-move { transform: translateX(calc(100% + 22px)); box-shadow: none; }

/* ----- Email and calendar: an email lands on the timeline ----- */
.d-mail { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); transition-property: opacity, transform; }
.d-mail > span:nth-child(2) { display: grid; }
.s1 .x-mail { opacity: 0; transform: translateY(46px) scale(.94); }
/* (then the space it left closes, as the email shows on the timeline) */
.x-mailbox { display: grid; grid-template-rows: 1fr; transition-property: grid-template-rows; }
.x-mailbox > div { min-height: 0; }
.s2 .x-mailbox { grid-template-rows: 0fr; }
.x-new { display: grid; grid-template-rows: 0fr; transition-property: grid-template-rows, background; }
.x-new > div { overflow: hidden; }
.s2 .x-new { grid-template-rows: 1fr; }
.s2:not(.s3) .x-new { background: var(--accent-soft); }
.d-sync { margin: 10px 0 0; color: var(--muted-strong); font-size: 12px; }

/* ----- AI call notes: flagged, then ticked ----- */
.d-tx { padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.d-tx p { margin: 3px 0 0; padding: 1px 4px; border-radius: 4px; color: var(--muted-strong); font-size: 11.5px; transition-property: background; }
.s1:not(.s2) .l1, .s2:not(.s3) .l2, .s3:not(.s4) .l3 { background: color-mix(in srgb, #f59e0b 22%, transparent); }
.d-checks { margin-top: 10px; overflow: hidden; border: 1px solid color-mix(in srgb, #f59e0b 35%, var(--line)); border-radius: 10px; background: color-mix(in srgb, #f59e0b 6%, var(--panel)); }
.d-checks > b { display: block; padding: 7px 11px 2px; font-size: 11.5px; }
.d-warn { color: #b45309; }
.d-checks .d-row { min-height: 30px; padding: 5px 11px; border-top: 0; font-size: 11.5px; }
.s4 .x1, .s5 .x2, .s6 .x3 { background: var(--accent); border-color: var(--accent); }
.s4 .x1::after, .s5 .x2::after, .s6 .x3::after { transform: rotate(-45deg) scale(1); }
.d-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.x-save { opacity: .45; transition-property: opacity; }
.s7 .x-save { opacity: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .d-warn { color: #f5a524; } }
:root[data-theme="dark"] .d-warn { color: #f5a524; }

/* ----- Ask Ordo AI: question, answer, a task to confirm ----- */
.d-chat { display: grid; gap: 10px; }
.d-q { justify-self: end; max-width: 80%; margin: 0; padding: 8px 12px; border-radius: 12px 12px 4px 12px; background: var(--accent); color: var(--on-accent); }
.d-a { display: flex; gap: 8px; align-items: flex-start; }
.d-av.ai { background: var(--ink); -webkit-mask: radial-gradient(circle at 30% 30%, #000 30%, transparent 31%), radial-gradient(circle at 72% 32%, #000 22%, transparent 23%), radial-gradient(circle at 30% 72%, #000 22%, transparent 23%), radial-gradient(circle at 72% 72%, #000 18%, transparent 19%); }
.d-a > div { padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; background: var(--panel-2); }
.d-typing { display: none; color: var(--muted); font-style: italic; }
.s2:not(.s3) .d-typing { display: block; }
.s2:not(.s3) .d-msg { display: none; }
.d-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.d-chips span { padding: 3px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 600; }
.d-sug { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 8px 10px 8px 12px; border: 1px dashed var(--field); border-radius: 10px; }

/* ----- Company research ----- */
.d-k { width: 56px; flex: none; }
.s6 .x-k { background: var(--accent); border-color: var(--accent); }
.s6 .x-k::after { transform: rotate(-45deg) scale(1); }

/* ----- Planner: a meeting dragged to Wednesday ----- */
.d-week { font-size: 11px; }
.d-days { display: grid; grid-template-columns: 22px repeat(3, 1fr); gap: 0; margin-bottom: 4px; color: var(--muted-strong); font-weight: 600; text-align: center; }
.d-days .today { color: var(--accent-ink); }
.d-grid { display: grid; grid-template-columns: 22px 1fr; }
.d-hours { display: grid; grid-auto-rows: 30px; color: var(--muted); font-size: 10px; }
.d-cal { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); height: 180px; border-top: 1px solid var(--line-2); background: linear-gradient(transparent 29px, var(--line-2) 29px) 0 0 / 100% 30px; }
.d-cal > i { border-left: 1px solid var(--line-2); }
.d-cal .ev { --c: 0; --r: 0; position: absolute; left: calc(var(--c) * 33.333% + 3px); top: calc(var(--r) * 30px + 2px); width: calc(33.333% - 6px); height: 26px; padding: 4px 6px; overflow: hidden; border-left: 3px solid #d6336c; border-radius: 5px; background: color-mix(in srgb, #d6336c 12%, var(--panel)); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; transition-property: transform, box-shadow; transition-duration: .6s; }
.s1:not(.s2) .x-ev { transform: scale(1.05); box-shadow: var(--shadow); z-index: 2; }
.s2 .x-ev { transform: translate(calc(100% + 6px), 90px); }
.d-cal .now { position: absolute; left: 33.333%; width: 33.333%; top: 47px; height: 2px; background: #e5484d; }

/* ----- Dashboards: the month, then full screen ----- */
.d-dash { transition-property: transform; transform-origin: 50% 0; }
.d-tabs { display: flex; gap: 4px; align-items: center; font-weight: 600; }
.d-tabs > span { padding: 4px 9px; border-radius: 7px; color: var(--muted); }
.d-tabs .on { background: var(--bg-2); color: var(--text); }
.d-tabs .d-full { margin-left: auto; border: 1px solid var(--line); color: var(--muted-strong); }
.d-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.d-kpis > div { display: grid; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; }
.d-kpis b { font-size: 15px; letter-spacing: -.02em; }
.d-bars { position: relative; display: flex; align-items: flex-end; gap: 7px; height: 100px; margin-top: 12px; padding: 0 4px; border-bottom: 1px solid var(--line); }
.d-bars i { flex: 1; height: calc(var(--h) * 100%); border-radius: 4px 4px 0 0; background: #16a34a; transform: scaleY(0); transform-origin: 50% 100%; transition-property: transform; transition-duration: .6s; transition-delay: calc(var(--i) * 70ms); }
.d-bars i.fc { background: color-mix(in srgb, #16a34a 35%, var(--panel)); }
.s1 .d-bars i { transform: scaleY(1); }
.d-bars .target { position: absolute; left: 0; right: 0; bottom: 62%; border-top: 1.5px dashed var(--muted); }
.s4 .d-dash { transform: scale(1.04); }
.d-present { margin: 14px 0 0; text-align: center; color: var(--accent-ink); font-weight: 600; }

/* ----- Import ----- */
.d-file { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; }
.d-xls { padding: 3px 5px; border-radius: 4px; background: #15803d; color: #fff; font-size: 9px; font-weight: 800; }
.d-map { display: grid; gap: 6px; margin-top: 10px; }
.d-map > div { display: grid; grid-template-columns: 1fr 40px 1fr; align-items: center; padding: 6px 10px; border-radius: 8px; background: var(--panel-2); }
.d-map .arr { height: 1.5px; background: var(--accent); position: relative; }
.d-map .arr::after { content: ""; position: absolute; right: -1px; top: -3px; border-left: 6px solid var(--accent); border-block: 4px solid transparent; }
.d-map b { text-align: right; }
.d-status { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.d-status .ok { color: var(--ok); font-weight: 600; }

/* ----- Clean data: a duplicate spotted while typing ----- */
.d-form { display: grid; gap: 6px; }
.d-input { display: flex; align-items: center; height: 34px; padding: 0 10px; border: 1.5px solid var(--accent); border-radius: 8px; font-size: 13px; }
.d-input.empty { border: 1px solid var(--line); }
.d-input .typed { display: inline-block; white-space: nowrap; clip-path: inset(0 100% 0 0); transition: clip-path 1.1s steps(9); }
.s1 .d-input .typed { clip-path: inset(0); }
.d-input .caret { width: 1.5px; height: 16px; margin-left: 1px; background: var(--accent); }
.d-hint { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--text); font-size: 12px; }

/* ----- Backups and history: Restore ----- */
.x-del { transition-property: background; }
.s2 .x-del { background: color-mix(in srgb, var(--ok) 10%, transparent); }
.x-restore { transition-property: opacity; }
.s2 .x-restore { opacity: 0; }
.d-t s { color: var(--muted); }

/* ----- Team and roles ----- */
.d-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; border-radius: 10px; background: var(--bg-2); font-weight: 600; text-align: center; }
.d-roles span { padding: 6px; border-radius: 8px; color: var(--muted); transition-property: background, color, box-shadow; }
.d-roles .r1, .s1 .d-roles .r2, .s2 .d-roles .r3 { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }
.s1 .d-roles .r1, .s2 .d-roles .r2 { background: none; color: var(--muted); box-shadow: none; }
.d-dots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 16px 6px 0; }
.d-dots i { height: 26px; border-radius: 6px; background: var(--bg-2); transition-property: background; }
.d-dots .g1, .s1 .d-dots .g2, .s2 .d-dots .g3 { background: var(--accent); }
.d-cap { display: grid; margin: 14px 0 0; color: var(--muted-strong); text-align: center; }
.d-cap span { grid-area: 1 / 1; opacity: 0; transition-property: opacity; }
.d-cap .c1, .s1 .d-cap .c2, .s2 .d-cap .c3 { opacity: 1; }
.s1 .d-cap .c1, .s2 .d-cap .c2 { opacity: 0; }

/* ----- Plans ----- */
.d-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.d-plan { display: grid; align-content: start; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.d-plan.best { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--panel); }
.d-plan > b { font-size: 14px; }
.d-price { display: flex; align-items: baseline; gap: 6px; margin: 4px 0; font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.d-price em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 400; letter-spacing: 0; }
.d-switch { position: relative; width: 32px; height: 18px; border-radius: 99px; background: var(--accent); transition-property: background; }
.d-switch i { position: absolute; top: 2px; left: 16px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition-property: left; }
.s1 .d-switch { background: var(--field); }
.s1 .d-switch i { left: 2px; }

/* ----- Your own AI ----- */
.d-net { display: grid; grid-template-columns: 1fr 60px 1fr; align-items: center; margin-top: 18px; }
.d-node { display: grid; justify-items: center; gap: 3px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); text-align: center; }
.d-node em { color: var(--muted); font-size: 11px; font-style: normal; }
.d-mark { width: 26px; height: 26px; fill: var(--ink); }
.d-chip-ai { padding: 4px 8px; border-radius: 7px; background: var(--ink); color: var(--panel); font-size: 11px; font-weight: 700; }
.d-wire { position: relative; height: 0; border-top: 2px dashed var(--field); }
.d-wire .pk { position: absolute; top: -6px; width: 10px; height: 10px; border-radius: 50%; opacity: 0; transition-property: left, opacity; transition-duration: .8s; }
.d-wire .p1 { left: 0; background: var(--accent); }
.d-wire .p2 { left: calc(100% - 10px); background: var(--ok); }
.s1:not(.s2) .p1 { left: calc(100% - 10px); opacity: 1; }
.s2:not(.s3) .p2 { left: 0; opacity: 1; }
.d-lock { margin: 22px 0 0; text-align: center; color: var(--muted-strong); font-size: 12px; }

/* ----- With reduced motion: the end, as drawn, and nothing moving ----- */
@media (prefers-reduced-motion: reduce) {
  .demo *, .demo *::before, .demo *::after { transition: none !important; animation: none !important; }
}
