/* Memoria demo 2: guided experience over the graph page. Acts are body classes x-act-0 … x-act-5. */
#toolbar, #workflow, #workflow-btn, #inbox, #panel, #style { display: none !important; }
/* The brain is a backdrop: no hover titles, no dragging, nothing to click behind the cards. */
#stage { pointer-events: none !important; }
#trace { opacity: 0 !important; pointer-events: none !important; position: fixed !important;
  left: 16px !important; top: 70px !important; right: auto !important; bottom: auto !important;
  width: min(420px, calc(100vw - 32px)) !important; height: 120px !important; overflow: hidden !important; }

:root { --x-accent: #63e6be; --x-pick: #b197fc; --x-blue: #74c0fc; --x-text: #e8f2fc; --x-muted: #8ea7be; --x-faint: #6b8499;
  --x-line: rgba(140, 186, 226, .2); --x-line-strong: rgba(140, 186, 226, .36); --x-surface: rgba(11, 22, 37, .93); --x-deck: 292px; }
.x-ui { font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--x-text); }
.x-ui button { font: inherit; color: inherit; cursor: pointer; }
.x-ui :focus-visible { outline: 2px solid var(--x-blue); outline-offset: 3px; }
.tone-orange { --tone: #ffa94d; } .tone-blue { --tone: #74c0fc; } .tone-violet { --tone: #b197fc; } .tone-mint { --tone: #63e6be; }

/* The brain stays visible; around a centred card it is softly veiled. */
body.x-act-0 #stage, body.x-act-1 #stage, body.x-act-4 #stage, body.x-act-5 #stage { filter: saturate(.85) brightness(.75); }
body.x-act-3:not(.x-asking) #stage { bottom: var(--x-deck) !important; }

.x-progress { position: fixed; z-index: 8; top: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.x-progress span { width: 34px; height: 4px; border-radius: 2px; background: #22364a; transition: background .3s; }
.x-progress span.done { background: #3f6b8c; }
.x-progress span.now { background: var(--x-accent); }
.x-skip { position: fixed; z-index: 8; top: 10px; right: 14px; padding: 6px 10px; color: var(--x-faint) !important; background: none; border: 0; font-size: 14px !important; }
.x-skip:hover { color: var(--x-text) !important; }

.x-stage { position: fixed; z-index: 6; inset: 0; pointer-events: none; }
.x-stage > * { pointer-events: auto; }
.x-card { background: var(--x-surface); border: 1px solid var(--x-line); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  backdrop-filter: blur(10px); padding: 30px 30px 26px; animation: x-in .45s ease-out; }
.x-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); text-align: center; }
.x-center.x-card { animation: x-in-center .45s ease-out; }
.x-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--x-muted); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.x-dot { width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #b2f2dd 0, var(--x-accent) 45%, #2f9e7c 100%); box-shadow: 0 0 14px rgba(99, 230, 190, .55); }
.x-card h1 { margin: 0 0 12px; font-size: clamp(26px, 4vw, 36px); line-height: 1.15; letter-spacing: -.02em; }
.x-card h2 { margin: 0 0 18px; font-size: clamp(22px, 3vw, 28px); line-height: 1.2; letter-spacing: -.015em; }
.x-card > p { margin: 0 0 22px; color: #b9cadb; }
.x-fine { margin: 16px 0 0 !important; color: var(--x-faint) !important; font-size: 13px; }
.x-primary { min-height: 50px; padding: 12px 26px; color: #062019 !important; background: var(--x-accent); border: 0; border-radius: 14px; font-weight: 700; font-size: 17px !important;
  box-shadow: 0 10px 30px rgba(99, 230, 190, .25); transition: transform .15s, box-shadow .15s; }
.x-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(99, 230, 190, .35); }
.x-ghost { min-height: 46px; padding: 10px 20px; background: rgba(116, 192, 252, .08); border: 1px solid var(--x-line-strong); border-radius: 14px; font-weight: 600; }

/* Act 1: the team's AI */
.x-ais { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.x-ai { position: relative; width: 170px; height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--x-line-strong); border-radius: 20px; transition: transform .2s, border-color .2s, background .2s; }
.x-ai:not([disabled]):hover { transform: translateY(-4px); border-color: var(--x-accent); background: rgba(99, 230, 190, .08); }
.x-ai[disabled] { opacity: .5; cursor: default; }
.x-ai img, .x-badge img { width: 46px; height: 46px; border-radius: 10px; }
/* Simple Icons' Claude mark is black: tint it to Claude's orange. The ChatGPT logo keeps its own colours. */
.x-ai img[src$="claude.svg"], .x-badge img[src$="claude.svg"] { border-radius: 0; filter: invert(70%) sepia(28%) saturate(900%) hue-rotate(330deg) brightness(95%); }
.x-ai-mark svg { width: 44px; height: 44px; fill: none; stroke: var(--x-text); stroke-width: 1.6; stroke-linecap: round; }
.x-ai-name { font-size: 19px; font-weight: 700; }
.x-soon { position: absolute; bottom: 10px; color: var(--x-faint); font-size: 12px; }
.x-ai.chosen { transform: scale(1.06); border-color: var(--x-accent); background: rgba(99, 230, 190, .14); }

/* Act 2: plugged in */
.x-badge { position: fixed; z-index: 7; top: 46px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 10px; background: var(--x-surface); border: 1px solid var(--x-accent); border-radius: 999px; font-weight: 700;
  box-shadow: 0 0 0 6px rgba(99, 230, 190, .08), 0 10px 30px rgba(0, 0, 0, .4); animation: x-drop .6s cubic-bezier(.2, .9, .3, 1.2); }
.x-badge img { width: 24px; height: 24px; }
.x-badge .x-ai-mark svg { width: 22px; height: 22px; }
.x-ok { display: inline-flex; align-items: center; gap: 5px; color: var(--x-accent); font-size: 13px; font-weight: 700; }
.x-ok svg { width: 20px; height: 20px; fill: none; stroke: var(--x-accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.x-ok circle { stroke-dasharray: 63; stroke-dashoffset: 63; animation: x-draw .5s ease-out .25s forwards; }
.x-ok path { stroke-dasharray: 16; stroke-dashoffset: 16; animation: x-draw .35s ease-out .7s forwards; }
@keyframes x-draw { to { stroke-dashoffset: 0; } }
.x-wire { position: fixed; z-index: 5; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.x-wire path { fill: none; stroke: #63e6be; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1400; stroke-dashoffset: 1400; opacity: 0;
  filter: drop-shadow(0 0 6px rgba(99, 230, 190, .7)); }
.x-wire.on path { opacity: .9; animation: x-wire 3.5s ease-in-out forwards, x-pulse 2.4s ease-in-out 3.5s infinite; }

.x-wire circle { fill: #63e6be; opacity: 0; transform-box: fill-box; transform-origin: center; }
.x-wire.on circle { animation: x-plug 2.4s ease-out 3.3s infinite; }
@keyframes x-plug { 0% { opacity: .9; transform: scale(.6); } 70% { opacity: 0; transform: scale(3.2); } 100% { opacity: 0; transform: scale(3.2); } }
body.x-asking .x-wire circle { display: none; }
.x-caption { position: absolute; left: 0; right: 0; bottom: 7vh; margin-inline: auto; width: min(560px, calc(100vw - 32px)); text-align: center; }
.x-caption h2 { margin-bottom: 8px; }
.x-caption p { margin: 0 !important; }

/* Act 3: questions */
.x-deck-wrap { position: absolute; left: 0; right: 0; bottom: 0; height: var(--x-deck); padding: 16px 0 14px;
  background: linear-gradient(to top, rgba(6, 13, 23, .98) 72%, rgba(6, 13, 23, 0)); animation: x-in .4s ease-out; }
.x-deck-title { margin: 0 20px 12px; font-size: 17px; text-align: center; }
.x-deck { display: flex; justify-content: center; gap: 14px; padding: 4px 20px 8px; overflow-x: auto; scroll-snap-type: x mandatory; }
.x-q { flex: 0 0 290px; scroll-snap-align: center; display: flex; flex-direction: column; gap: 12px; padding: 16px; text-align: left; min-height: 128px;
  background: var(--x-surface); border: 1px solid var(--x-line-strong); border-radius: 18px; transition: transform .2s, border-color .2s; }
.x-q:hover { transform: translateY(-4px); border-color: var(--tone); }
.x-q.seen { opacity: .7; }
.x-who { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--tone, var(--x-accent)); font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.x-avatar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--tone);
  background: color-mix(in srgb, var(--tone) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent); }
.x-avatar svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.x-check { margin-left: auto; color: #062019; background: var(--x-accent); border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; font-size: 11px; }
.x-ask { font-size: 17px; font-weight: 600; line-height: 1.35; margin: 0; }
.x-deck-wrap .x-ghost { display: block; margin: 4px auto 0; }


.x-short { margin: 12px 0 16px; font-size: clamp(19px, 2.4vw, 24px); font-weight: 700; line-height: 1.3; }
.x-proof { display: grid; gap: 12px; }
.x-doc { margin: 0; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--x-line); }
.x-doc figcaption { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--x-muted); font-size: 13px; font-weight: 600; }
.x-state { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.x-doc blockquote { margin: 10px 0 6px; font-size: 15px; line-height: 1.45; }
.x-file { margin: 0; color: var(--x-faint); font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.state-envigueur { border-color: rgba(99, 230, 190, .45); background: rgba(99, 230, 190, .06); }
.state-envigueur .x-state { color: #062019; background: var(--x-accent); }
.state-terrain .x-state { color: #fff3bf; background: rgba(255, 212, 59, .16); }
.x-full { margin-top: 14px; color: var(--x-muted); font-size: 14px; }
.x-full summary { cursor: pointer; font-weight: 600; }
.x-full p { margin: 8px 0 0; }
.x-md h4 { margin: 12px 0 4px; color: var(--x-text); font-size: 14px; }
.x-md ul, .x-md ol { margin: 6px 0 0; padding-left: 20px; }
.x-md li { margin: 3px 0; }
.x-md blockquote { margin: 8px 0 0; padding-left: 10px; border-left: 2px solid var(--x-line-strong); }
.x-md code { font-size: .92em; padding: 1px 5px; background: rgba(255,255,255,.06); border-radius: 5px; }
.x-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* One card from question to answer (desktop: top left, where the replay's path ends). */
.x-qa { position: absolute; left: 16px; top: 70px; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 86px); overflow-y: auto;
  padding: 18px; background: var(--x-surface); border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent); border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45); backdrop-filter: blur(10px); animation: x-in .35s ease-out; }
.x-qa .x-ask { margin: 10px 0 12px; font-size: 20px; transition: font-size .3s; }
.x-qa.answered .x-ask { font-size: 17px; }
.x-step { margin: 0; color: var(--x-accent); font-weight: 600; font-size: 15px; }
.x-reply { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--x-line); animation: x-in .45s ease-out; }
.x-reply .x-short { margin: 0 0 14px; font-size: 20px; }

/* Act 4: value */
.x-roi { text-align: left; }
.x-roi h2 { text-align: center; }
.x-roi label { display: block; margin: 0 0 14px; color: var(--x-muted); font-size: 14px; font-weight: 600; }
.x-roi output { float: right; color: var(--x-text); }
.x-roi input[type=range] { width: 100%; margin-top: 6px; accent-color: var(--x-accent); }
.x-result { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 4px; }
.x-result p { margin: 0; padding: 14px; text-align: center; border-radius: 14px; background: rgba(99, 230, 190, .07); border: 1px solid rgba(99, 230, 190, .25); }
.x-result strong { display: block; font-size: 34px; line-height: 1.1; color: var(--x-accent); }
.x-result span { color: var(--x-muted); font-size: 13px; }
.x-roi .x-primary { display: block; margin: 18px auto 0; }

/* Act 5: the end */
.x-end h2 span { color: var(--x-accent); }
.x-end .x-ghost { display: block; margin: 12px auto 0; }

@keyframes x-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes x-in-center { from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes x-drop { from { opacity: 0; transform: translate(-50%, -20px) scale(.9); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes x-wire { to { stroke-dashoffset: 0; } }
@keyframes x-pulse { 0%, 100% { opacity: .9; } 50% { opacity: .45; } }


/* The memory card behind an answer: a reading sheet on the right (bottom sheet on mobile). */
.x-badge { pointer-events: none; transition: opacity .3s; }
.x-badge[hidden] { display: none; }
body.x-beacon-under-badge .x-badge { opacity: .3; }
.x-beacon { position: fixed; z-index: 8; left: -22px; top: -22px; width: 44px; height: 44px; padding: 0; background: none; border: 0; border-radius: 50%; }
.x-beacon[hidden] { display: none; }
.x-beacon::before, .x-beacon::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--x-pick); box-shadow: 0 0 18px color-mix(in srgb, var(--x-pick) 50%, transparent); }
.x-beacon::after { animation: x-beacon 1.8s ease-out infinite; }
.x-beacon:hover::before, .x-beacon:focus-visible::before { background: color-mix(in srgb, var(--x-pick) 18%, transparent); }
@keyframes x-beacon { from { transform: scale(1); opacity: .9; } to { transform: scale(2.1); opacity: 0; } }
.x-beacon-tag { position: absolute; left: 52px; top: 7px; white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: var(--x-pick);
  color: #1b1236; font-size: 13px; font-weight: 700; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.x-beacon.x-pinned::before, .x-beacon.x-pinned::after, .x-beacon.x-pinned .x-beacon-tag::before { display: none; }
.x-beacon.x-pinned .x-beacon-tag { left: 50%; top: 7px; transform: translateX(-50%); animation: x-tag 1.8s ease-in-out infinite; }
@keyframes x-tag { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--x-pick) 20%, transparent), 0 4px 14px rgba(0, 0, 0, .35); } }
.x-beacon.x-tag-left:not(.x-pinned) .x-beacon-tag { left: auto; right: 52px; }
.x-beacon.x-tag-left:not(.x-pinned) .x-beacon-tag::before { left: auto; right: -5px; border-right: 0; border-left: 5px solid var(--x-pick); }
.x-beacon-tag::before { content: ""; position: absolute; left: -5px; top: 50%; margin-top: -5px; border: 5px solid transparent; border-left: 0; border-right-color: var(--x-pick); }
/* The card kept for the answer, in the colour of the question that asked for it (--x-pick, set per answer):
   on its node, in the last step and on the passage used. */
.x-pick-dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--x-pick); box-shadow: 0 0 10px color-mix(in srgb, var(--x-pick) 70%, transparent); }
.x-step .x-pick-name { color: var(--x-pick); }
.x-sheet { position: fixed; z-index: 9; top: 0; right: 0; bottom: 0; width: min(520px, 44vw); overflow-y: auto; padding: 22px 24px 28px;
  background: var(--x-surface); border-left: 1px solid var(--x-line-strong); box-shadow: -18px 0 50px rgba(0, 0, 0, .45);
  backdrop-filter: blur(10px); animation: x-sheet-in .25s ease-out; }
.x-sheet[hidden] { display: none; }
@keyframes x-sheet-in { from { transform: translateX(30px); opacity: 0; } }
.x-sheet .x-close { float: right; margin: -6px -8px 0 8px; width: 40px; height: 40px; padding: 0; background: none; border: 0; color: var(--x-muted); font-size: 26px; line-height: 1; }
.x-sheet .x-close:hover { color: var(--x-text); }
.x-sheet h2 { margin: 8px 0 4px; font-size: 22px; line-height: 1.25; }
.x-sheet .x-md { color: var(--x-muted); font-size: 15px; line-height: 1.5; }
.x-sheet .x-md h4 { margin-top: 18px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--x-faint); }
.x-sheet .x-md strong { color: var(--x-text); }
.x-sheet .x-md blockquote { font-size: 13px; }
.x-sheet .x-mark { color: var(--x-text); padding: 8px 10px; margin: 6px 0; border-radius: 6px; background-color: color-mix(in srgb, var(--x-pick) 9%, transparent);
  /* a dashed outline that runs around the passage, like a selection */
  background-image: linear-gradient(90deg, var(--x-pick) 50%, transparent 50%), linear-gradient(90deg, var(--x-pick) 50%, transparent 50%),
    linear-gradient(0deg, var(--x-pick) 50%, transparent 50%), linear-gradient(0deg, var(--x-pick) 50%, transparent 50%);
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y; background-size: 12px 2px, 12px 2px, 2px 12px, 2px 12px;
  background-position: 0 0, 100% 100%, 0 100%, 100% 0; animation: x-ants 1s linear infinite; }
@keyframes x-ants { to { background-position: 12px 0, calc(100% - 12px) 100%, 0 calc(100% - 12px), 100% 12px; } }
.x-sheet li.x-mark { margin-left: -10px; }
.x-sheet .x-hint { display: inline-block; padding: 0 6px; border-radius: 4px; color: var(--x-text); background: color-mix(in srgb, var(--x-pick) 16%, transparent); outline: 1px dashed var(--x-pick); }
.x-sheet header { position: sticky; z-index: 1; top: -22px; margin: -22px -24px 0; padding: 22px 24px 12px; background: #0b1625;
  border-bottom: 1px solid var(--x-line); }

@media (max-width: 760px) {
  .x-sheet { top: auto; left: 0; width: auto; height: 88vh; border-left: 0; border-top: 1px solid var(--x-line-strong); border-radius: 20px 20px 0 0; animation-name: x-sheet-up; }
  @keyframes x-sheet-up { from { transform: translateY(40px); opacity: 0; } }
  :root { --x-deck: 300px; }
  .x-card { padding: 24px 20px 20px; border-radius: 20px; }
  .x-ai { width: 140px; height: 128px; }
  .x-deck { justify-content: flex-start; padding: 4px 16px 8px; }
  /* The brain stays visible above the question: the replay frames its notes above #trace (the page's
     rule on mobile), so #trace sits where the answer sheet will end, and the graph keeps its size. */
  .x-ui { font-size: 15px; }
  .x-qa { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 168px; max-height: none; padding: 14px 16px; border-radius: 18px 18px 0 0; transition: height .4s ease; }
  body.x-answered .x-qa { height: 50vh; height: 50dvh; }
  .x-qa .x-who { font-size: 11.5px; }
  .x-qa .x-avatar { width: 26px; height: 26px; }
  .x-qa .x-ask, .x-qa.answered .x-ask { margin: 8px 0 8px; font-size: 15px; line-height: 1.4; }
  .x-step { font-size: 13.5px; }
  .x-reply { margin-top: 10px; padding-top: 10px; }
  .x-reply .x-short { margin: 0 0 10px; font-size: 16px; line-height: 1.35; }
  .x-doc { padding: 10px 12px; border-radius: 12px; }
  .x-doc figcaption { font-size: 12px; }
  .x-doc blockquote { margin: 6px 0 4px; font-size: 14px; }
  .x-full { font-size: 13px; }
  .x-actions { margin-top: 12px; gap: 8px; }
  .x-actions .x-primary, .x-actions .x-ghost { min-height: 44px; padding: 8px 16px; font-size: 15px !important; }
  #trace { left: 0 !important; right: 0 !important; width: auto !important; top: 50vh !important; top: 50dvh !important; height: 50vh !important; }
  body.x-framed #trace { top: calc(100vh - 168px) !important; top: calc(100dvh - 168px) !important; height: 168px !important; }
  body.x-framed.x-answered #trace { top: 50vh !important; top: 50dvh !important; height: 50vh !important; }
  .x-q { flex-basis: 78vw; padding: 14px; gap: 8px; min-height: 0; }
  .x-q .x-ask { font-size: 15px; }
  .x-sheet { padding: 18px 18px 24px; }
  .x-sheet header { margin: -18px -18px 0; padding: 18px 18px 10px; top: -18px; }
  .x-sheet h2 { font-size: 19px; }
  .x-sheet .x-md { font-size: 14px; }
  .x-actions { flex-direction: column-reverse; }
  .x-actions button { width: 100%; }
  .x-result strong { font-size: 28px; }
  .x-progress span { width: 22px; }
  body.x-act-4 .x-badge, body.x-act-5 .x-badge { display: none; }  /* the value and end cards need the top */
  @keyframes x-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* the demo company's logo on the opening card */
.x-logo { display: block; height: 72px; width: auto; margin: 4px auto 10px; }
