/* Analysis walkthrough prototype. Shares the stage, pointer, layouts and base product styles with
   ../operations-demo/demo.css; this file switches the product screens to the Analysis app's own palette (brief,
   section 9: violet accent, cyan charts) and adds the Analysis screens. */
body[data-page="analysis-demo"] { background: radial-gradient(60% 40% at 70% 0%, rgb(122 88 240 / .14), transparent 70%), var(--bg); }
.an-screen { --ac: #a48bf5; --ac2: #7a58f0; --chart: #37c1e0; --pos: #2fbf71; --neg: #ef5b5f; --warn: #f2a20c; --g0: #0a0911; --g1: #15161c; --g2: #1c1d24; --g3: #262732; }
.an-screen .mark { background: linear-gradient(135deg, #e6ddff, #a48bf5 50%, #6f4ee6); }
.an-screen .nav.is-on { background: rgb(122 88 240 / .16); box-shadow: inset 2px 0 0 var(--ac); }
.an-screen .nav.is-press { background: rgb(122 88 240 / .3); }
.is-compact .an-screen .nav.is-on { box-shadow: inset 0 -2px 0 var(--ac); }
.an-screen .btn-s--pri { color: #fff; background: var(--ac2); }
.an-screen .chip--on { box-shadow: inset 0 0 0 1px rgb(164 139 245 / .6); background: rgb(122 88 240 / .1); }
.an-screen .ok { color: var(--pos); } .an-screen .neg { color: var(--neg); }
.an-screen .ws { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tx2); padding: 6px 10px; border-radius: 8px; background: var(--g1); box-shadow: inset 0 0 0 1px var(--ln); }

/* data: the file, its column checks and the previewed fix */
.ds { display: flex; align-items: center; gap: 16px; }
.ds__ico { width: 46px; height: 54px; border-radius: 8px; background: linear-gradient(160deg, #3fcf8e, #1d7a4c); position: relative; flex: none; box-shadow: 0 10px 30px -10px #000; }
.ds__ico::after { content: "XLSX"; position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font: 700 10px/1 var(--text); color: #06210f; letter-spacing: .04em; }
.ds h3 { font: 500 18px/1.2 var(--text); } .ds p { color: var(--mu); font-size: 13.5px; margin-top: 3px; }
.ds .ver { margin-left: auto; }
.ver { font: 500 13px/1 var(--text); padding: 7px 10px; border-radius: 8px; color: var(--tx2); box-shadow: inset 0 0 0 1px var(--ln2); white-space: nowrap; }
.ver.is-new { color: var(--pos); box-shadow: inset 0 0 0 1px rgb(47 191 113 / .5); background: rgb(47 191 113 / .08); }
.cols { display: grid; }
.colr { display: grid; grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1.6fr) auto; gap: 12px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--ln); font-size: 14px; }
.colr:first-child { border-top: 0; }
.colr b { font-weight: 500; } .colr .ty { color: var(--mu); font-size: 13px; }
.colr .st { display: flex; align-items: center; gap: 8px; color: var(--tx2); font-size: 13.5px; min-width: 0; }
.colr .st span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.colr .st::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; background: var(--pos) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.2 4.7-4.8' fill='none' stroke='%2306210f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.colr.is-issue { background: rgb(242 162 12 / .07); box-shadow: inset 3px 0 0 var(--warn); }
.colr.is-issue .st { color: #ffd27a; }
.colr.is-issue .st::before { background: var(--warn) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 4.5v4.2M8 11.2h.01' fill='none' stroke='%23231400' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.colr.is-fixed { background: rgb(47 191 113 / .06); box-shadow: inset 3px 0 0 var(--pos); }
.fix { position: absolute; top: 14px; right: 14px; bottom: 14px; width: 400px; padding: 18px; border-radius: 14px; background: var(--g2); box-shadow: inset 0 0 0 1px var(--ln2), -30px 0 80px -30px #000; display: grid; gap: 14px; align-content: start; opacity: 0; visibility: hidden; }
.fix h3 { font: 500 17px/1.25 var(--display); }
.fix p { color: var(--tx2); font-size: 14px; }
.fix table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fix th { text-align: left; color: var(--mu); font: 500 12.5px/1 var(--text); padding: 0 8px 8px; }
.fix td { padding: 9px 8px; border-top: 1px solid var(--ln); font-family: var(--code); font-size: 13px; }
.fix td:first-child { color: #ffd27a; } .fix td:last-child { color: var(--pos); }
.fix .row { display: flex; gap: 10px; }
.toast { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 10px; background: #0f2a1d; box-shadow: inset 0 0 0 1px rgb(47 191 113 / .5), 0 20px 50px -15px #000; font-size: 14px; color: #c8f2da; white-space: nowrap; opacity: 0; }

/* ask: the question, how it was read, the answer and its working */
.askbox { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--g1); box-shadow: inset 0 0 0 1px var(--ln2); font-size: 16px; }
.askbox .typed { flex: 1; min-height: 22px; color: var(--tx); }
.askbox .typed:empty::before { content: "Ask a question about your data"; color: var(--mu); }
.askbox .typed.is-typing::after { content: ""; display: inline-block; width: 2px; height: 18px; margin-left: 1px; vertical-align: -3px; background: var(--ac); animation: od-caret 1s steps(1) infinite; }
.read { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--mu); opacity: 0; }
.read .chip { opacity: 0; }
.askgrid { display: grid; grid-template-columns: minmax(0, 1fr) 0; gap: 0; align-items: start; }
.answer { opacity: 0; display: grid; gap: 14px; }
.answer h3 { font: 400 23px/1.25 var(--display); letter-spacing: -.01em; }
.answer .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--mu); font-size: 13px; }
.answer .meta b { font-weight: 500; color: var(--tx2); }
.answer .unf { color: var(--warn); }
.hb { display: grid; gap: 9px; }
.hb__r { display: grid; grid-template-columns: 110px minmax(0, 1fr) 76px 64px; gap: 12px; align-items: center; font-size: 14px; }
.hb__r .lab { color: var(--tx2); }
.hb__r .trk { height: 22px; border-radius: 5px; background: rgb(255 255 255 / .04); overflow: hidden; }
.hb__r .trk i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, rgb(55 193 224 / .55), var(--chart)); transform-origin: left; transform: scaleX(var(--w, 0)); }
.hb__r.is-top .trk i { background: linear-gradient(90deg, rgb(164 139 245 / .7), #b9a4ff); }
.hb__r.is-hit .trk { box-shadow: 0 0 0 2px var(--ac); }
.hb__r .val { font-family: var(--code); font-size: 13.5px; text-align: right; }
.hb__r .chg { font-size: 13px; text-align: right; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.side2 { display: grid; gap: 12px; opacity: 0; visibility: hidden; min-width: 0; }
.wk dl { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 13.5px; }
.wk dt { color: var(--mu); } .wk dd { margin: 0; color: var(--tx); min-width: 0; }
.wk .q { font: 400 12.5px/1.5 var(--code); color: var(--tx2); background: var(--g0); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; box-shadow: inset 0 0 0 1px var(--ln); }
.wk .ai { display: flex; gap: 10px; padding: 10px 12px; border-radius: 9px; background: rgb(122 88 240 / .08); box-shadow: inset 0 0 0 1px rgb(164 139 245 / .3); font-size: 13px; color: var(--tx2); }
.ch, .pf { opacity: 0; visibility: hidden; }
.ch ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ch li { display: grid; grid-template-columns: 18px 110px minmax(0, 1fr); gap: 8px; font-size: 13.5px; color: var(--tx2); align-items: start; }
.ch li::before { content: ""; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; background: var(--pos) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.2 4.7-4.8' fill='none' stroke='%2306210f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.ch li b { font-weight: 500; color: var(--tx); }
.pf .lnk { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; background: var(--g0); box-shadow: inset 0 0 0 1px var(--ln2); font: 400 13px/1.3 var(--code); color: var(--ac); }
.pf .lnk span { margin-left: auto; font-family: var(--text); color: var(--mu); font-size: 12.5px; }
.verified { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 10px; border-radius: 99px; font: 500 13px/1 var(--text); color: var(--pos); background: rgb(47 191 113 / .1); box-shadow: inset 0 0 0 1px rgb(47 191 113 / .45); }
.verified::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* dashboard */
.dhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dhead h3 { font: 500 19px/1.2 var(--display); margin-right: auto; }
.dfilt { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--mu); min-height: 34px; }
.dfilt .chip { opacity: 0; }
.dfilt small { color: var(--mu); font-size: 12.5px; opacity: 0; }
.dk { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dk .card p { color: var(--mu); font-size: 13px; } .dk strong { display: block; font: 400 28px/1.15 var(--display); margin: 4px 0 2px; } .dk span { font-size: 12.5px; color: var(--tx2); }
.dg { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; }
.dtile { position: relative; }
.dtile.is-new::after { content: "Added just now"; position: absolute; top: 14px; right: 16px; font: 500 12.5px/1 var(--text); color: var(--ac); }
.mbars { display: flex; align-items: flex-end; gap: 16px; height: 150px; padding: 8px 6px 0; }
.mbars div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.mbars i { flex: none; }
.mbars i { display: block; width: 100%; max-width: 64px; border-radius: 6px 6px 0 0; background: linear-gradient(rgb(55 193 224 / .9), rgb(55 193 224 / .35)); height: calc((100% - 44px) * var(--hf, 0)); }   /* room kept for the value above and the month below */
.mbars .unf i { background: repeating-linear-gradient(135deg, rgb(242 162 12 / .45) 0 6px, rgb(242 162 12 / .15) 6px 12px); box-shadow: inset 0 0 0 1px rgb(242 162 12 / .6); }
.mbars span { font-size: 12.5px; color: var(--mu); } .mbars b { font: 500 12.5px/1 var(--code); color: var(--tx2); }
.mnote { margin-top: 10px; font-size: 12.5px; color: var(--warn); }
.dacts { display: flex; gap: 8px; flex-wrap: wrap; }

/* phones: stacked screens */
.is-compact .askgrid { grid-template-columns: 1fr !important; gap: 12px !important; }
.is-compact .hb__r { grid-template-columns: 78px minmax(0, 1fr) 58px 52px; gap: 8px; font-size: 13px; }
.is-compact .colr { grid-template-columns: minmax(0, 1fr) 76px auto; } .is-compact .colr .st span { display: none; }
.is-compact .colr.is-issue .st span { display: inline; }
.is-compact .colr.is-issue { grid-template-columns: minmax(0, 1fr) auto; } .is-compact .colr.is-issue .ty { display: none; }
.is-compact .colr.is-issue .st { grid-column: 1 / -1; order: 5; }
.is-compact .fix { left: 10px; right: 10px; width: auto; top: auto; bottom: 10px; }
.is-compact .ds .ver { display: none; }
.is-compact .dk { grid-template-columns: 1fr 1fr; } .is-compact .dk .card:last-child { display: none; }
.is-compact .dg { grid-template-columns: 1fr; }
.is-compact .dhead .dacts { display: none; }
.is-compact .answer h3 { font-size: 20px; }
.is-compact .wk dl { grid-template-columns: 82px minmax(0, 1fr); }
.is-compact .ch li { grid-template-columns: 18px minmax(0, 1fr); } .is-compact .ch li b, .is-compact .ch li span { grid-column: 2; }
.is-compact .toast { white-space: normal; width: 86%; }
.is-low .mbars { height: 110px; } .is-low .dk strong { font-size: 24px; }
.view__in { position: relative; display: grid; gap: inherit; align-content: start; }
.is-compact .topbar .hide-c { display: none; }
.is-compact .an-screen .nav[data-nav="home"], .is-compact .an-screen .nav[data-nav="explore"] { display: none; }

/* audit fixes: who can see the query; the answer keeps its width when the working opens */
.wk dt small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--mu); }
.answer > * { max-width: var(--aw, none); }
.wk .q { font-variant-ligatures: none; }   /* show >= and < as typed, not as joined symbols */
