/* The one-request demo: a quiet, self-contained motion layer for index.html. */
.otto-demo-intro { max-width: 42rem; }
.otto-demo { margin-top: 2.5rem; overflow: hidden; border: 1px solid var(--rule); border-radius: .75rem; background: var(--paper); box-shadow: var(--shadow); }
.otto-demo-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid var(--rule); }
.otto-demo-kicker { color: var(--ink-2); font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.otto-demo-controls { display: flex; gap: .35rem; }
.demo-control { display: inline-flex; align-items: center; gap: .35rem; min-height: 2rem; padding: .25rem .5rem; border: 1px solid transparent; border-radius: .35rem; background: transparent; color: var(--ink-2); cursor: pointer; font: inherit; font-size: .8rem; }
.demo-control:hover, .demo-control:focus-visible { border-color: var(--rule); color: var(--ink); }
.demo-control .i { width: .9rem; height: .9rem; }
.otto-demo-stage { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr); align-items: start; gap: clamp(1.25rem, 3vw, 2.25rem); padding: clamp(1rem, 3vw, 2.25rem); }
.otto-demo-slack, .otto-demo-output { min-width: 0; border: 1px solid var(--rule); border-radius: .5rem; background: var(--paper); }
.otto-demo-slack { align-self: start; overflow: hidden; }
/* Both panels start compact and grow with the conversation/output: JS clips their height to
   whatever content has revealed so far, only once the demo is JS-enhanced (no-JS keeps the
   full, unclipped layout). */
.otto-demo[data-demo-enhanced] .otto-demo-slack,
.otto-demo[data-demo-enhanced] .otto-demo-output { transition: height .6s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .otto-demo[data-demo-enhanced] .otto-demo-slack,
  .otto-demo[data-demo-enhanced] .otto-demo-output { transition: none; height: auto !important; }
}
.demo-window-bar { display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem; border-bottom: 1px solid var(--rule-2); color: var(--ink-2); font-size: .75rem; font-weight: 600; }
.demo-window-dot { width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 .2rem var(--tint); }
.demo-window-meta { margin-left: auto; color: var(--ink-3); font-weight: 400; }
.demo-slack-message, .demo-otto-reply { display: grid; grid-template-columns: 2rem 1fr; gap: .65rem; padding: 1.15rem 1rem; }
.demo-otto-reply { border-top: 1px solid var(--rule-2); background: color-mix(in srgb, var(--tint) 25%, transparent); }
.demo-avatar { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .35rem; background: var(--paper-2); color: var(--ink-2); font-size: .62rem; font-weight: 700; }
.demo-avatar-otto { background: var(--accent); color: var(--on-accent); }
.demo-message-copy > div { display: flex; align-items: baseline; gap: .55rem; }
.demo-otto-reply > div:last-child > strong { margin-right: .55rem; }
.demo-message-copy strong, .demo-otto-reply strong { font-size: .82rem; }
.demo-message-copy span, .demo-otto-reply > div:last-child > span { color: var(--ink-3); font-size: .7rem; }
.demo-message-copy p, .demo-otto-reply p { margin-top: .4rem; color: var(--ink-2); font-size: .9rem; line-height: 1.5; }
.demo-cursor { display: inline-block; width: .1rem; height: 1em; margin-left: .1rem; background: var(--accent); vertical-align: -.12em; animation: demo-blink .8s steps(1) infinite; }
.otto-demo-output { overflow: hidden; }
.demo-output-tabs { display: flex; gap: 1rem; padding: .65rem 1rem 0; border-bottom: 1px solid var(--rule); }
.demo-tab { padding: .5rem 0 .65rem; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink-2); cursor: pointer; font: inherit; font-size: .82rem; font-weight: 600; }
.demo-tab.is-active { border-color: var(--accent); color: var(--ink); }
.demo-output-card { padding: 1.25rem; }
.demo-output-card[hidden] { display: none; }
.demo-sheet-chrome { display: flex; align-items: center; gap: .45rem; padding-bottom: .8rem; color: var(--ink); font-size: .8rem; }
.demo-sheets-mark { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: .2rem; background: var(--accent); color: var(--on-accent); font-size: .95rem; line-height: 1; }
.demo-sheet-saved { margin-left: auto; color: var(--ink-3); font-size: .65rem; }
.demo-formula { display: grid; grid-template-columns: 2.5rem 1fr; border: 1px solid var(--rule); color: var(--ink-2); font: .68rem/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; }
.demo-formula span { padding: 0 .45rem; border-right: 1px solid var(--rule); overflow: hidden; white-space: nowrap; }
.demo-formula span:last-child { border-right: 0; }
.demo-sheet-grid { display: grid; grid-template-columns: 1.35rem 1.15fr 1fr 1fr .9fr; margin-top: .55rem; border: 1px solid var(--rule); color: var(--ink-2); font-size: .62rem; font-variant-numeric: tabular-nums; }
.demo-sheet-grid > * { min-width: 0; overflow: hidden; padding: .35rem .4rem; border-right: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
.demo-sheet-grid > :nth-child(5n) { border-right: 0; }
.demo-sheet-grid > :nth-last-child(-n + 5) { border-bottom: 0; }
.demo-sheet-grid b { background: var(--paper-2); color: var(--ink-3); font-weight: 600; text-align: center; }
.demo-sheet-grid > span:nth-child(5n + 1) { background: var(--paper-2); color: var(--ink-3); text-align: center; }
.demo-sheet-grid > span:not(:nth-child(5n + 1)) { color: var(--ink); }
.otto-demo[data-demo-enhanced] .demo-sheet-grid [data-demo-reveal] { opacity: 0; transform: translateY(.25rem); transition: opacity .3s, transform .3s; }
.demo-sheet-grid [data-demo-reveal].is-seen { opacity: 1; transform: none; }
.demo-card-title { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.demo-file-type { color: var(--ink-3); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.demo-card-title h3 { margin-top: .35rem; font-size: 1.15rem; }
.demo-stamp { padding: .3rem .45rem; border: 1px solid var(--accent); border-radius: .25rem; color: var(--accent); font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; transform: rotate(-3deg); }
.demo-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; margin-top: 1.4rem; }
.demo-metrics div { min-width: 0; padding-right: .5rem; border-right: 1px solid var(--rule); }
.demo-metrics div:last-child { border-right: 0; }
.demo-metrics span, .demo-metrics small { display: block; color: var(--ink-3); font-size: .68rem; }
.demo-metrics strong { display: block; margin: .25rem 0; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.demo-metrics small { color: var(--accent); }
.demo-chart { position: relative; margin-top: 1.5rem; padding-top: .5rem; }
.demo-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.demo-chart-grid { position: absolute; inset: .5rem 0 1.25rem; background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), var(--rule-2) 25%); }
.demo-chart-area { fill: var(--tint); opacity: .65; }
.demo-chart-line { fill: none; stroke: var(--accent); stroke-linecap: round; stroke-width: 3; }
.demo-chart-labels { display: flex; justify-content: space-between; color: var(--ink-3); font-size: .62rem; }
.demo-source { margin-top: 1rem; color: var(--ink-3); font-size: .7rem; }
.demo-timeline { display: grid; gap: 0; margin: 1.35rem 0 0; padding: 0; list-style: none; }
.demo-timeline li { display: grid; grid-template-columns: 2.5rem 1fr 1.25rem; gap: .6rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--rule-2); }
.demo-timeline li > span { color: var(--ink-3); font-size: .68rem; font-variant-numeric: tabular-nums; }
.demo-timeline strong, .demo-timeline small { display: block; }
.demo-timeline strong { font-size: .84rem; }
.demo-timeline small { margin-top: .2rem; color: var(--ink-3); font-size: .68rem; }
.demo-weekbar { display: block; height: .25rem; margin-top: .45rem; border-radius: 999px; background: var(--rule-2); overflow: hidden; }
.demo-weekbar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.demo-timeline i { color: var(--accent); font-size: .95rem; font-style: normal; text-align: center; }
.otto-demo-progress { height: .2rem; background: var(--rule-2); }
.otto-demo-progress span { display: block; width: 0; height: 100%; background: var(--accent); }
.otto-demo[data-demo-enhanced] .demo-reveal, .otto-demo[data-demo-enhanced] [data-demo-reveal] { opacity: 0; transform: translateY(.45rem); }
.demo-reveal.is-seen, [data-demo-reveal].is-seen { animation: demo-lift .55s both; opacity: 1; transform: none; }
.otto-demo[data-demo-enhanced] .demo-reveal.is-seen, .otto-demo[data-demo-enhanced] [data-demo-reveal].is-seen { opacity: 1; transform: none; }
.demo-chart.is-seen .demo-chart-line { animation: demo-draw 1.1s .15s both; }
.demo-chart-line { stroke-dasharray: 650; stroke-dashoffset: 0; }
.otto-demo[data-demo-enhanced] .demo-chart-line { stroke-dashoffset: 650; }
.otto-demo[data-demo-state="playing"] .otto-demo-progress span { animation: demo-progress 14s linear both; }
.otto-demo[data-demo-state="paused"] * { animation-play-state: paused !important; }
@keyframes demo-progress { to { width: 100%; } }
@keyframes demo-lift { from { opacity: .5; transform: translateY(.5rem); } to { opacity: 1; transform: translateY(0); } }
@keyframes demo-draw { to { stroke-dashoffset: 0; } }
@keyframes demo-blink { 50% { opacity: 0; } }
@media (max-width: 52rem) { .otto-demo-stage { grid-template-columns: 1fr; gap: 1rem; } }
@media (max-width: 34rem) { .otto-demo-head { padding: .7rem .85rem; } .otto-demo-kicker { font-size: .68rem; } .demo-control span { display: none; } .otto-demo-stage { padding: 1rem; } .demo-metrics strong { font-size: .95rem; } }
@media (prefers-reduced-motion: reduce) { .demo-cursor, .otto-demo[data-demo-state="playing"] .otto-demo-progress span, .demo-reveal, [data-demo-reveal], .demo-chart-line { animation: none; } .demo-reveal, [data-demo-reveal] { opacity: 1; transform: none; } .demo-chart-line { stroke-dashoffset: 0; } }
.demo-sr-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.otto-demo[data-demo-state="done"] .demo-reveal, .otto-demo[data-demo-state="done"] [data-demo-reveal] { opacity: 1 !important; transform: none !important; }
.otto-demo[data-demo-state="done"] .demo-chart-line { stroke-dashoffset: 0 !important; }
.otto-demo[data-demo-state="done"] .demo-cursor { animation: none; opacity: 0; }
