/* The home page's four scenes (components/site/demo_stage/home/): only what each adds to demo_stage.css. */
.demo-stage [data-demo-scene=sales] {
  .address { margin: 14px auto 0; width: max-content; font-size: 12px; color: var(--muted-foreground); background: var(--ds-panel); border-radius: 99px; padding: 3px 14px; }

  .search { margin: 14px 8px 0; }
  .search > :first-child { gap: 10px; }
  .query, .answer { font-size: 13px; }
  .results { padding: 16px; }
  .results > :last-child { margin-top: 12px; }
  .products img { aspect-ratio: 4 / 3; }
  .search :is(.results, .answer, .products li) { opacity: 0; transform: translateY(10px); transition: opacity .26s var(--ds-ease), transform .26s var(--ds-ease); }
  .search :is(.results, .answer, .products li).show { opacity: 1; transform: none; }
  .search .products .btn { transition: transform .15s, background-color .2s; }
  .search .picked { background: var(--brand); color: var(--brand-foreground); transform: scale(.97); }
  .dots { font-size: 13px; color: var(--muted-foreground); animation: ds-breathe 1.4s ease-in-out infinite; }


  .sheet svg { width: 18px; height: 18px; stroke-width: 2.6; }

  .happened { display: flex; justify-content: center; margin-bottom: 8px; }
  .happened span { display: flex; align-items: center; gap: 7px; font-size: 12px; border-radius: 99px; padding: 4px 12px; background: var(--muted); }
  .happened svg { width: 13px; height: 13px; flex: none; }
  .happened.paid span { background: var(--brand); color: var(--brand-foreground); }

  .picks { display: grid; gap: 8px; margin-top: 8px; }
  .pick { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: 11px; padding: 6px 8px; font-size: 12px; line-height: 1.25; }
  .pick img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; background: var(--muted); flex: none; }
  .pick b { display: block; font-weight: 500; }

  .event.ghost :is(b, small, .dot) { color: var(--muted-foreground); }
}

@media (min-width: 1024px) {
  .demo-stage [data-demo-scene=sales] {
    .picks { grid-template-columns: 1fr 1fr; }
  }
}

.demo-stage [data-demo-scene=marketing] {
  .thread { justify-content: flex-start; padding-top: 16px; }
  .brief { border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; font-size: 14px; line-height: 1.4; min-height: 66px; margin-bottom: 10px; }
  .brief small { display: block; font-size: 12px; color: var(--muted-foreground); margin-bottom: 2px; }

  .letter { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
  .letter > b { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
  .version { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 12.5px; min-height: 30px; }
  .version .key { font-weight: 600; color: var(--muted-foreground); }
  .version .subject { padding: 4px 0; }
  .version em { font-style: normal; text-align: right; white-space: nowrap; color: var(--muted-foreground); font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .3s; }
  .letter.sent .version em { opacity: 1; }
  .version.best em, .version.best .key { color: var(--brand); font-weight: 600; }
  .version.best .subject { font-weight: 600; }

  .note { display: flex; flex-wrap: wrap; align-items: center; column-gap: 9px; font-size: 13.5px; padding: 9px 2px; border-top: 1px solid var(--border); }
  .note svg { width: 15px; height: 15px; flex: none; }
  .note small { margin-left: auto; font-size: 12px; color: var(--muted-foreground); }
  .note.win { font-weight: 500; color: var(--brand); }

  .event.before b, .event.before small { color: var(--muted-foreground); }

  .clock { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted-foreground); transition: opacity .3s; }
  .clock b { display: block; font-size: 54px; font-weight: 300; color: var(--foreground); line-height: 1; }
  .clock.off { opacity: 0; }
  .mailview { position: absolute; inset: 0; background: var(--ds-screen); opacity: 0; transform: translateY(14px); transition: opacity .3s var(--ds-ease), transform .3s var(--ds-ease); }
  .mailview.on { opacity: 1; transform: none; }
  .mailhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 18px 16px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
  .mailhead b { font-weight: 600; }
  .mailhead small { font-size: 12px; color: var(--muted-foreground); }
  .paper { margin: 12px; background: #fff; color: #1c1917; border-radius: 12px; padding: 18px 16px; display: grid; gap: 12px; box-shadow: 0 1px 3px rgb(0 0 0 / .08), 0 0 0 1px rgb(0 0 0 / .04); }
  .paper .logo { text-align: center; font-weight: 600; font-size: 14px; letter-spacing: -.01em; }
  .paper h3 { font-size: 17px; font-weight: 600; line-height: 1.25; }
  .paper p { font-size: 13px; line-height: 1.45; color: #44403c; }
  .goods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .goods li { border: 1px solid #e7e5e4; border-radius: 10px; padding: 7px; font-size: 12.5px; line-height: 1.3; color: #57534e; }
  .goods img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #f5f5f4; margin-bottom: 7px; }
  .goods b { display: block; font-weight: 500; color: #1c1917; }
  .paper .cta { text-align: center; }
  .paper .cta span { display: inline-block; background: #1c1917; color: #fff; border-radius: 99px; padding: 8px 18px; font-size: 13px; font-weight: 500; }

  .site { position: absolute; inset: 0; z-index: 2; background: var(--ds-screen); opacity: 0; transition: opacity .3s var(--ds-ease); }
  .site.on { opacity: 1; }
  .address { margin: 14px auto 0; width: max-content; font-size: 12px; color: var(--muted-foreground); background: var(--ds-panel); border-radius: 99px; padding: 3px 14px; }
  .checkout { margin: 16px 12px 0; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px 16px; display: grid; gap: 14px; font-size: 13.5px; }
  .checkout h3 { font-size: 17px; font-weight: 600; }
  .checkout .item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
  .checkout .item img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--muted); }
  .checkout .item b { font-weight: 500; }
  .field small { display: block; font-size: 12px; color: var(--muted-foreground); margin-bottom: 4px; }
  .field .code { display: block; min-height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; font-weight: 500; letter-spacing: .04em; }
  .sum { display: flex; justify-content: space-between; gap: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
  .sum.total { color: var(--foreground); border-top: 1px solid var(--border); padding-top: 12px; }
  .sum.total b { font-size: 16px; font-weight: 600; }
  .pay { display: block; text-align: center; background: var(--foreground); color: var(--background); border-radius: 99px; padding: 11px 0; font-weight: 500; transition: transform .15s var(--ds-ease); }
  .pay.picked { transform: scale(.97); }

  .text { position: absolute; left: 10px; right: 10px; top: 10px; z-index: 3; border-radius: 20px; background: var(--ds-bezel); color: #fff; padding: 12px 14px; font-size: 13px; line-height: 1.4; opacity: 0; transform: translateY(-16px); transition: opacity .3s var(--ds-ease), transform .3s var(--ds-ease); }
  .text.on { opacity: 1; transform: none; }
  .text.tapped { transform: scale(.97); }
  .text small { display: flex; align-items: center; gap: 6px; font-size: 12px; opacity: .8; margin-bottom: 3px; }
  .text svg { width: 13px; height: 13px; }
  .text b { font-weight: 600; background: rgb(255 255 255 / .16); border-radius: 5px; padding: 0 5px; }
  .sheet { z-index: 4; }
  .sheet span svg { width: 18px; height: 18px; stroke-width: 2.6; }
}
.dark .demo-stage [data-demo-scene=marketing] :is(.text, .sheet) { outline: 1px solid color-mix(in oklab, var(--foreground) 22%, transparent); }

.demo-stage [data-demo-scene=support] {
  .chat { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--card); color: var(--foreground); }
  .chat header { padding: 16px 16px 12px; border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 600; }
  .chat header small { display: block; font-size: 12px; font-weight: 400; color: var(--muted-foreground); }
  .chat .talk { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px 12px 6px; }
  .thread, .chat .talk { -webkit-mask-image: linear-gradient(to bottom, transparent, black 34px); mask-image: linear-gradient(to bottom, transparent, black 34px); }
  .bubble { max-width: 82%; width: fit-content; border-radius: 17px; padding: 8px 12px; font-size: 13.5px; line-height: 1.38; margin-bottom: 8px; }
  .bubble.me { margin-left: auto; background: var(--brand); color: var(--brand-foreground); border-bottom-right-radius: 5px; }
  .bubble.them { background: var(--muted); color: var(--foreground); border-bottom-left-radius: 5px; }
  .day { text-align: center; font-size: 12px; color: var(--muted-foreground); padding: 2px 0 10px; }
  .wait { font-size: 13px; color: var(--muted-foreground); padding: 0 4px 8px; animation: ds-breathe 1.4s ease-in-out infinite; }
  .box-in { margin: 0 12px 14px; display: flex; align-items: center; background: var(--muted); border-radius: 99px; padding: 9px 14px; font-size: 13.5px; min-height: 40px; }
  .box-in .hint { color: var(--muted-foreground); }
  .box-in .typed:not(:empty) + .hint { display: none; }

  .work .head .title { min-width: 0; }
  .tool { margin-left: auto; flex: none; font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; font-weight: 400; background: var(--card); border-radius: 6px; padding: 2px 8px; color: var(--muted-foreground); }
  .route { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--muted-foreground); margin: 9px 0 4px; }
  .route b { font-weight: 500; transition: color .25s; }
  .route b.past { color: var(--foreground); }
  .route b.now { color: var(--foreground); text-decoration: underline 2px var(--brand); text-underline-offset: 4px; }
  .note { display: flex; align-items: center; gap: 9px; padding: 2px 2px 10px; font-size: 13px; color: var(--muted-foreground); }
  .note svg { width: 15px; height: 15px; flex: none; }
  .passes { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted-foreground); padding-bottom: 10px; }
  .passes::before, .passes::after { content: ''; flex: 1; height: 1px; background: var(--border); }
  .then { margin-bottom: 8px; }

  .event.before b, .event.before small { color: var(--muted-foreground); }
}

/* Home scene: analytics. Only what this scene adds to shared.css: no phone; a desk with the owner's conversation and
   three boxes (sources, apps, the projection). */
.demo-stage [data-demo-scene=analytics] {
  .side { display: contents; }
  .sources, .apps, .future { height: auto; align-self: center; }

  .thread { mask-image: linear-gradient(to bottom, transparent, #000 34px); }
  .thread > .grow > div > * { margin-bottom: 10px; }
  .bubble { max-width: 86%; width: fit-content; border-radius: 17px; padding: 9px 13px; font-size: 13.5px; line-height: 1.42; }
  .bubble.me { margin-left: auto; background: var(--brand); color: var(--brand-foreground); border-bottom-right-radius: 5px; }
  .bubble.them { background: var(--muted); border-bottom-left-radius: 5px; }
  .work .body { margin-top: 6px; }
  .composer-row span { color: var(--foreground); }
  .composer-row span:empty::before { content: attr(data-placeholder); color: var(--muted-foreground); }

  .box > b { display: block; font-size: 15px; font-weight: 600; }
  .box > small { display: block; font-size: 12.5px; color: var(--muted-foreground); margin-bottom: 12px; }

  .source { display: grid; grid-template-columns: 96px minmax(0, 1fr) 34px 78px; gap: 8px; align-items: center; font-size: 13px; min-height: 34px; border-radius: 9px; margin: 0 -8px; padding: 0 8px; transition: background-color .3s; }
  .source .name { display: flex; align-items: center; gap: 7px; font-weight: 500; }
  .source .name svg { width: 15px; height: 15px; flex: none; }
  .source .track { height: 8px; border-radius: 99px; background: var(--muted); overflow: hidden; }
  .source .track i { display: block; height: 100%; width: 0; border-radius: 99px; background: color-mix(in oklab, var(--foreground) 34%, transparent); transition: width .9s var(--ds-ease), background-color .3s; }
  .source em, .source small { font-style: normal; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted-foreground); opacity: 0; transition: opacity .3s .5s; }
  .source em { text-align: right; font-size: 13px; color: var(--foreground); }
  .read .source .track i { width: var(--share); }
  .read .source :is(em, small) { opacity: 1; }
  .source.best { background: color-mix(in oklab, var(--brand) 8%, transparent); }
  .source.best .track i { background: var(--brand); }
  .source.best small { color: var(--brand); font-weight: 500; }

  .apps { transition: box-shadow .3s; }
  .apps.lit { box-shadow: 0 0 0 2px color-mix(in oklab, var(--brand) 45%, transparent), 0 18px 40px -26px rgb(0 0 0 / .35); }
  .marks { display: flex; gap: 8px; margin: 2px 0 10px; }
  .marks svg { width: 34px; height: 34px; padding: 7px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); }
  .apps p { font-size: 13.5px; font-weight: 500; line-height: 1.3; }
  .apps p small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted-foreground); margin-top: 2px; }
  .connect { margin-top: 12px; min-height: 36px; border-radius: 99px; background: var(--brand); color: var(--brand-foreground); font-size: 13px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 6px; transition: background-color .25s, color .25s, transform .15s; }
  .connect svg { width: 14px; height: 14px; display: none; }
  .connect.done { background: var(--ds-good-bg); color: var(--ds-good); transform: scale(.98); }
  .connect.done svg { display: block; }

  .future { display: flex; flex-direction: column; }
  .chart { position: relative; }
  .plot { display: block; width: 100%; height: 190px; overflow: visible; }
  .plot :is(.grid, .as-now, .with) { vector-effect: non-scaling-stroke; fill: none; }
  .plot .grid { stroke: var(--border); stroke-width: 1; }
  .plot .as-now { stroke: color-mix(in oklab, var(--foreground) 34%, transparent); stroke-width: 2; }
  .plot .with { stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; }
  .plot .draw { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset 1.3s var(--ds-ease), opacity .2s; }
  .plot .band { fill: color-mix(in oklab, var(--brand) 12%, transparent); opacity: 0; transition: opacity .6s .5s; }
  .axis { position: relative; height: 26px; font-size: 12px; color: var(--muted-foreground); }
  .axis span { position: absolute; bottom: 0; translate: -50% 0; white-space: nowrap; }
  .axis span:nth-child(1) { left: 5.71%; }
  .axis span:is(:nth-child(2), :nth-child(4)) { display: none; }
  .axis span:nth-child(2) { left: 25%; }
  .axis span:nth-child(3) { left: 44.29%; }
  .axis span:nth-child(4) { left: 63.57%; }
  .axis span:nth-child(5) { left: 82.86%; }
  .tags { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 12px; font-size: 12px; color: var(--muted-foreground); }
  .tags p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; opacity: 0; transition: opacity .4s .9s; }
  .tags b { font-size: 14px; font-weight: 600; color: var(--brand); }
  .drawn .draw { stroke-dashoffset: 0; opacity: 1; }
  .drawn :is(.band, .tags p) { opacity: 1; }
}

@media (min-width: 1024px) {
  .demo-stage [data-demo-scene=analytics] {
    .desk { grid-template-columns: 430px minmax(0, 1fr); gap: 16px; height: 600px; }
    .side { display: grid; grid-template-columns: minmax(0, 1fr) 262px; grid-template-rows: auto minmax(0, 1fr); gap: 16px; min-height: 0; }
    .sources, .apps, .future { align-self: stretch; }
    .future { grid-column: 1 / -1; min-height: 0; }
    .source { grid-template-columns: 104px minmax(0, 1fr) 36px 84px; gap: 10px; }
    .chart { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .plot { flex: 1; min-height: 0; height: auto; }
    .tags { position: absolute; inset: 0 0 26px calc(82.86% + 10px); margin: 0; display: block; }
    .tags p { position: absolute; left: 0; right: 0; display: block; }
    .tags .up { top: 24.4%; translate: 0 -10px; }
    .tags .up span { display: block; }
    .tags .now { top: 80%; translate: 0 -50%; }
    .axis span:is(:nth-child(2), :nth-child(4)) { display: inline; }
  }
}
