/* The moving parts: the hero's three devices, the drawn app replicas, the story theatre, the systems, the marketplace
   teaser. The replicas copy the real web app's dark look (packages/web), whatever the page's theme. */

:root {
  --app-bg: #111215;
  --app-bg-2: #17181c;
  --app-line: #2a2c33;
  --app-ink: #ececf0;
  --app-ink-2: #a9abb5;
  --app-ink-3: #7c7f8a;
  --app-blue: #6f95ff;
  --app-blue-soft: #1f2a4a;
  --app-amber: #e7b74e;
  --app-green: #5fd08a;
  --app-red: #ff8a7a;
  --app-user: #262a35;
}

/* ---------- reveal on scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

.btn.small { min-height: 38px; padding: 0 16px; font-size: 14.5px; margin-left: 8px; }
@media (max-width: 719px) { .top .btn.small { display: none; } }
.top.scrolled { box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .5); }

/* ---------- hero ---------- */
.hero { padding-bottom: 40px; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 1px; background: var(--line);
}
.hero { position: relative; }

/* ---------- the drawn app ---------- */
.app {
  background: var(--app-bg); color: var(--app-ink); font: 400 13px/1.45 var(--sans); text-align: left;
  display: flex; height: 100%; overflow: hidden;
}
.app-side { width: 26%; max-width: 150px; background: var(--app-bg-2); border-right: 1px solid var(--app-line); padding: 12px 8px; display: flex; flex-direction: column; gap: 3px; flex: none; }
.app-logo { font-weight: 700; font-size: 13px; padding: 2px 8px 10px; display: flex; align-items: center; gap: 6px; }
.app-logo::before { content: ""; width: 16px; height: 16px; border-radius: 5px; background: linear-gradient(135deg, #7b9dff, #4c6fe0); }
.app-nav { padding: 6px 8px; border-radius: 7px; color: var(--app-ink-2); font-size: 12px; }
.app-nav.on { background: #22252d; color: var(--app-ink); }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 14px; min-height: 0; overflow: hidden; }
.chat > * { margin: 0; flex: none; }

/* beats: hidden until their moment, then they rise in */
[data-demo] [data-beat] { transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1), max-height .45s ease, margin .45s ease, padding .45s ease; }
[data-demo] .pre { opacity: 0; transform: translateY(8px) scale(.98); }
[data-demo] .chat > .pre, [data-demo] .session > .pre, [data-demo] .cal-screen > .pre { max-height: 0; margin-top: -8px; padding-top: 0; padding-bottom: 0; border-width: 0; overflow: hidden; }
[data-demo] .on { opacity: 1; transform: none; max-height: 400px; }
[data-demo].fading [data-beat] { opacity: 0; transition-duration: .4s; }
[data-demo] ins.pre { display: none; }

.m-user { align-self: flex-end; max-width: 82%; background: var(--app-user); padding: 8px 11px; border-radius: 12px 12px 4px 12px; min-height: 1.45em; }
.m-reply { max-width: 92%; padding-left: 26px; color: var(--app-ink); }
.m-reply small, .m-done small, .saved small, .m-test small { color: var(--app-ink-3); font-size: .9em; }
.m-think { color: var(--app-ink-3); font-size: 12px; padding-left: 26px; display: flex; align-items: center; gap: 3px; }
.m-think i { width: 5px; height: 5px; border-radius: 50%; background: var(--app-blue); animation: dot 1.1s infinite ease-in-out; }
.m-think i:nth-child(2) { animation-delay: .15s; } .m-think i:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.m-agent { display: flex; align-items: center; gap: 8px; }
.ag { width: 18px; height: 18px; border-radius: 6px; background: var(--app-blue-soft); position: relative; flex: none; }
.ag::after { content: "✦"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--app-blue); font-size: 11px; }
.tool { border: 1px solid var(--app-line); border-radius: 9px; padding: 5px 10px; font-size: 12px; color: var(--app-ink-2); display: inline-flex; gap: 6px; align-items: center; }
.tool::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--app-green); }
.tool b { color: var(--app-ink); font-weight: 600; }
.m-done, .m-test { display: flex; align-items: center; gap: 7px; color: var(--app-green); font-size: 12.5px; font-weight: 600; padding-left: 26px; flex-wrap: wrap; }
.tick { width: 16px; height: 16px; border-radius: 50%; background: var(--app-green); flex: none; position: relative; }
.tick::after { content: ""; position: absolute; left: 5px; top: 3px; width: 4px; height: 8px; border: solid #0d2a18; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pill { background: #2a1d1d; color: #ffb3a8; border: 1px solid #5a3030; border-radius: 6px; padding: 0 6px; font-weight: 600; white-space: nowrap; }

.card-ok { border: 1.5px solid var(--app-amber); border-radius: 12px; background: #16150f; padding: 10px 12px; box-shadow: 0 0 0 4px rgba(231, 183, 78, .08); }
.ok-title { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.shield { width: 16px; height: 18px; background: var(--app-amber); clip-path: polygon(50% 0, 100% 18%, 92% 62%, 50% 100%, 8% 62%, 0 18%); flex: none; }
.ok-fields { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 8px 0 0; font-size: 12px; }
.ok-fields dt { color: var(--app-ink-3); }
.ok-fields dd { margin: 0; font-family: var(--mono); color: var(--app-ink); overflow-wrap: anywhere; }
.ok-scope { display: inline-flex; gap: 2px; margin-top: 10px; background: #1d1e23; border-radius: 8px; padding: 2px; font-size: 11.5px; }
.ok-scope span { padding: 3px 9px; border-radius: 6px; color: var(--app-ink-2); }
.ok-scope .on { background: #2c2f38; color: var(--app-ink); }
.ok-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.card-ok.wide .ok-btns { margin-top: -26px; }
.b-deny, .b-ok, .b-save, .undo {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 7px; font-weight: 600; font-size: 12px; position: relative;
}
.b-deny { border: 1px solid var(--app-line); color: var(--app-ink); }
.b-ok, .b-save { background: var(--app-blue); color: #0b1430; }
.b-ok.pre, .b-save.pre, .undo.pre { opacity: 1 !important; transform: none !important; } /* buttons are always there; the beat only presses them */
.pressed { animation: press .5s ease; }
.b-ok.pressed, .b-save.pressed { box-shadow: 0 0 0 4px rgba(111, 149, 255, .35); }
@keyframes press { 30% { transform: scale(.92); } 100% { transform: none; } }
.tap { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px; border-radius: 50%; background: rgba(255, 255, 255, .55); opacity: 0; pointer-events: none; }
.pressed .tap { animation: tap .7s ease-out; }
@keyframes tap { 0% { opacity: .8; transform: scale(.2); } 100% { opacity: 0; transform: scale(2.2); } }
.undo { border: 1px solid var(--app-line); color: var(--app-ink); margin-left: 6px; padding: 2px 9px; }
.undo.pressed { background: #2c2f38; }
.m-report { margin-left: 26px; border-left: 3px solid var(--app-green); background: #142019; padding: 7px 10px; border-radius: 0 8px 8px 0; font-size: 12.5px; }
.m-report b { color: var(--app-green); }

.diff-rows { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
.diff-rows th { text-align: left; color: var(--app-ink-3); font-weight: 500; padding: 3px 6px; border-bottom: 1px solid var(--app-line); }
.diff-rows td { padding: 5px 6px; border-bottom: 1px solid #1f2026; font-family: var(--mono); }
.diff-rows s { color: var(--app-red); text-decoration-thickness: 1.5px; opacity: .8; }
.diff-rows ins { text-decoration: none; color: var(--app-green); background: rgba(95, 208, 138, .12); padding: 0 4px; border-radius: 4px; margin-left: 4px; }

.code { margin: 0 0 0 26px; background: #0b0c0e; border: 1px solid var(--app-line); border-radius: 9px; padding: 9px 11px; font: 11.5px/1.55 var(--mono); color: #cfd3dc; overflow: hidden; white-space: pre-wrap; }
.code .k { color: #c792ea; }
.code .add { color: var(--app-green); } .code .del { color: var(--app-red); }
.saved { margin-left: 26px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--app-ink-2); }
.tool-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--app-blue-soft); color: #c7d5ff; border-radius: 999px; padding: 2px 10px; font-weight: 600; font-size: 12px; }
.tool-chip::before { content: "ƒ"; font-style: italic; color: var(--app-blue); }

.pane { flex-direction: column; border-radius: 14px; border: 1px solid var(--app-line); min-height: 0; }
.pane-who { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--app-line); font-weight: 600; font-size: 12.5px; }
.pane-who .cost { margin-left: auto; color: var(--app-ink-3); font-weight: 500; font-family: var(--mono); }
.av { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #111; }
.av.a { background: #f2a65a; } .av.s { background: #7fd1c7; } .av.m1 { background: #b7a3ff; } .av.m2 { background: #8fd18a; }
.m-mem, .m-loaded { margin-left: 26px; font-size: 12px; color: #f5c2e0; display: flex; gap: 7px; align-items: center; }
.m-loaded { color: #c7d5ff; }
.mem-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); flex: none; }
.m-lock { margin-left: 26px; font-size: 12px; color: var(--app-amber); display: flex; gap: 7px; align-items: center; }
.lock { width: 10px; height: 8px; background: currentColor; border-radius: 2px; position: relative; margin-top: 4px; flex: none; }
.lock::before { content: ""; position: absolute; left: 1px; top: -5px; width: 8px; height: 7px; border: 2px solid currentColor; border-bottom: 0; border-radius: 5px 5px 0 0; box-sizing: border-box; }
.keep.pressed { animation: press .5s ease; }

.chart { margin: 0 0 0 26px; border: 1px solid var(--app-line); border-radius: 10px; padding: 10px 12px; background: #0e0f12; }
.chart figcaption { font-weight: 600; font-size: 12.5px; }
.chart figcaption small { color: var(--app-ink-3); font-weight: 400; margin-left: 6px; }
.chart svg { width: 100%; height: 96px; display: block; margin-top: 6px; }
.chart .grid { stroke: #23252c; stroke-width: 1; fill: none; }
.chart .line { fill: none; stroke: var(--app-blue); stroke-width: 2.4; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; vector-effect: non-scaling-stroke; }
.chart .area { fill: url(#none); fill: rgba(111, 149, 255, .12); stroke: none; }
.chart.on .line { animation: draw 1.4s ease forwards; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.chart-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12px; color: var(--app-ink-2); }
.chart-foot b { color: var(--app-ink); font-family: var(--mono); }

.session { margin-left: 26px; border: 1px solid #4a3426; border-radius: 10px; background: #17120f; padding: 8px 11px; display: grid; gap: 3px; }
.s-head { font-weight: 600; display: flex; gap: 7px; align-items: center; }
.s-head small { color: var(--app-ink-3); font-weight: 400; font-family: var(--mono); font-size: 11px; }
.cc { width: 14px; height: 14px; background: #e3896a; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.s-line { font: 11.5px/1.5 var(--mono); color: var(--app-ink-2); }
.s-line::before { content: "› "; color: #e3896a; }

.cal-screen { flex-direction: column; padding: 14px; gap: 10px; }
.cal-head { font-weight: 700; font-size: 15px; }
.cal-head small { color: var(--app-ink-3); font-weight: 400; margin-left: 6px; font-size: 12px; }
.cal { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal li { min-height: 52px; border: 1px solid #202228; border-radius: 7px; padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; position: relative; transition: background .4s; }
.cal li i { font-style: normal; font-size: 10.5px; color: var(--app-ink-3); }
.cal-screen[data-at="2"] .cal li.off { background: repeating-linear-gradient(135deg, #1a1b20 0 6px, #141519 6px 12px); }
.ev { font-size: 10px; line-height: 1.25; padding: 2px 4px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #0d0e10; font-weight: 600; }
.ev.pre { max-height: none !important; }
.ev.a { background: #8fb3ff; } .ev.b { background: #8fd8a8; } .ev.c { background: #f3c86b; } .ev.d { background: #f2a6c8; }
.ev.miss { background: transparent; border: 1px dashed var(--app-ink-3); color: var(--app-ink-2); }
.cal-screen[data-at="3"] .ev.miss { background: #8fd8a8; border-color: transparent; color: #0d0e10; }
.cal-off { align-self: flex-start; font-size: 12px; color: var(--app-ink-2); background: #1d1e23; border-radius: 999px; padding: 3px 11px; }
.cal-screen .m-done { padding-left: 0; }

/* ---------- the hero's three devices ---------- */
/* one column: the promise on top, then a wide stage with a laptop in the middle, a tablet left and a phone right */
.hero-in { grid-template-columns: 1fr !important; gap: 36px; }
.hero-copy { text-align: center; max-width: 900px; margin: 0 auto; }
.hero-copy .lede { margin-left: auto; margin-right: auto; max-width: 62ch; }
.hero-copy .proof { max-width: 760px; margin-left: auto; margin-right: auto; text-align: left; }
.hero-copy .cta { justify-content: center; }
.hero h1 { font-size: clamp(38px, 6.4vw, 72px); }
.hero h1 em { display: inline; }
@media (min-width: 900px) { .hero h1 em { display: block; } }
.devices { margin: 0 auto; position: relative; width: 100%; max-width: 1120px; height: 560px; perspective: 1600px; }
.devices > .dev { position: absolute; }
.dev { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.dev-screen { position: relative; overflow: hidden; height: 100%; }
.dev-laptop { left: 21%; top: 0; width: 58%; transform: rotateY(calc(var(--ry, 0deg) * .5)) rotateX(calc(var(--rx, 0deg) * .5)); }
.dev-laptop .dev-screen { height: 410px; border-radius: 14px 14px 0 0; border: 10px solid #1b1c20; border-bottom-width: 14px; box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .55); }
.dev-base { height: 16px; margin: 0 -8%; background: linear-gradient(#d4d6db, #9da0a8); border-radius: 0 0 16px 16px; box-shadow: 0 24px 30px -18px rgba(0, 0, 0, .5); position: relative; }
.dev-base::before { content: ""; position: absolute; left: 42%; right: 42%; top: 0; height: 5px; background: #8a8d95; border-radius: 0 0 6px 6px; }
.dev-tablet { left: 0; top: 190px; width: 27%; transform: rotateY(calc(var(--ry, 0deg) * 1 + 8deg)) rotateX(calc(var(--rx, 0deg) * 1)) translateZ(40px); z-index: 2; }
.dev-tablet .dev-screen { height: 350px; border-radius: 22px; border: 11px solid #222328; box-shadow: 0 50px 70px -30px rgba(0, 0, 0, .6); }
.dev-phone { right: 2%; top: 200px; width: 18%; min-width: 150px; transform: rotateY(calc(var(--ry, 0deg) * 1.3 - 8deg)) rotateX(calc(var(--rx, 0deg) * 1.3)) translateZ(80px); z-index: 3; }
.dev-phone .dev-screen { height: 350px; border-radius: 30px; border: 8px solid #121316; box-shadow: 0 50px 60px -24px rgba(0, 0, 0, .7), 0 0 0 1px #3a3b42; }
.dev-phone .dev-screen::before { content: ""; position: absolute; top: 6px; left: 50%; width: 34%; height: 12px; margin-left: -17%; background: #000; border-radius: 9px; z-index: 3; }
.app-tab, .app-phone { font-size: 11.5px; }
.app-tab .chat { padding: 14px 12px; }
.app-phone .chat { padding: 26px 9px 12px; gap: 6px; }
.app-phone .m-user { max-width: 94%; padding: 6px 8px; }
.app-phone .m-reply, .app-phone .m-think, .app-phone .m-done, .app-tab .m-reply, .app-tab .m-think, .app-tab .m-done { padding-left: 0; }
.app-phone .card-ok, .app-tab .card-ok { padding: 8px 9px; }
.app-phone .ok-fields, .app-tab .ok-fields { font-size: 10.5px; gap: 2px 8px; }
.app-phone .tool, .app-tab .tool { font-size: 10.5px; padding: 3px 7px; }
.notif {
  position: absolute; left: 7px; right: 7px; top: 24px; z-index: 4; background: rgba(40, 42, 50, .97); color: #eee; border-radius: 13px;
  padding: 8px 10px; font-size: 11px; line-height: 1.3; box-shadow: 0 10px 20px -8px rgba(0, 0, 0, .6); margin: 0;
}
.notif b { display: block; font-size: 11px; }
.notif.on { animation: notif 3.2s ease forwards; }
@keyframes notif { 0% { transform: translateY(-160%); } 12%, 70% { transform: none; opacity: 1; } 100% { transform: translateY(-160%); opacity: 0; } }
.float {
  position: absolute; z-index: 5; margin: 0; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 9px 13px 9px 16px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); line-height: 1.3;
}
.float small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12.5px; }
.float::before { content: ""; position: absolute; left: -5px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--brass-fill); box-shadow: 0 0 0 3px var(--brass-soft); }
.f1 { left: 4%; top: 110px; }
.f2 { right: 4%; top: 110px; }
.devices .float.pre { opacity: 0; transform: translateY(10px); }
@media (max-width: 899px) {
  .devices { height: 470px; }
  .dev-laptop { left: 0; width: 82%; }
  .dev-laptop .dev-screen { height: 330px; }
  .dev-tablet { display: none; }
  .dev-phone { top: 150px; right: 0; width: 30%; }
  .dev-phone .dev-screen { height: 310px; }
  .f1 { left: 0; top: auto; bottom: 0; }
  .f2 { left: auto; right: 0; top: auto; bottom: -46px; }
}
@media (max-width: 560px) {
  .devices { height: 430px; margin-bottom: 40px; }
  .dev-laptop { width: 100%; }
  .dev-laptop .dev-screen { height: 260px; }
  .app-side { display: none; }
  .dev-phone { top: 150px; right: 0; width: 44%; min-width: 0; }
  .dev-phone .dev-screen { height: 270px; }
  .f1 { left: 0; bottom: 10px; }
  .f2 { bottom: -44px; }
}
.devices.still .notif { display: none; }

/* ---------- marquee ---------- */
.marquee { display: flex; overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); padding: 14px 0; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.mq-track { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0 6px; flex: none; animation: mq 46s linear infinite; }
.mq-track li { white-space: nowrap; font: 600 15px/1 var(--serif); padding: 9px 16px; border: 1px dashed var(--line-2); border-radius: 999px; color: var(--ink-2); }
.mq-track li::before { content: "◆"; color: var(--brass-fill); margin-right: 8px; font-size: 10px; vertical-align: 2px; }
.marquee:hover .mq-track { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .marquee { flex-wrap: wrap; } .mq-track { flex-wrap: wrap; justify-content: center; animation: none; } .mq-track[aria-hidden] { display: none; } }

/* ---------- the story theatre ---------- */
.watch { background: radial-gradient(900px 400px at 10% 0%, color-mix(in srgb, var(--signal) 9%, transparent), transparent 70%), var(--bg); }
.theatre { margin-top: 36px; }
.t-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.t-tabs button {
  flex: none; font: 600 14.5px/1 var(--sans); padding: 11px 15px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-2); cursor: pointer; display: inline-flex; gap: 8px; align-items: center;
}
.t-tabs button b { font: 600 11px/1 var(--mono); color: var(--ink-3); }
.t-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.t-tabs button[aria-selected="true"] b { color: var(--brass-fill); }
.t-panel { display: grid; gap: 28px; margin-top: 18px; align-items: center; }
.t-panel[hidden] { display: none; }
@media (min-width: 960px) { .t-panel { grid-template-columns: .8fr 1.2fr; gap: 48px; } }
.t-copy h3 { font-size: clamp(26px, 3.4vw, 36px); }
.t-copy > p { color: var(--ink-2); margin-top: 12px; font-size: 17px; }
.t-steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 6px; counter-reset: st; }
.t-steps button {
  counter-increment: st; width: 100%; text-align: left; font: 500 15.5px/1.3 var(--sans); padding: 11px 14px 11px 46px; border-radius: 12px;
  border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; position: relative;
}
.t-steps button::before {
  content: counter(st); position: absolute; left: 12px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%;
  display: grid; place-items: center; font: 700 12px var(--mono); border: 1.5px dashed var(--line-2); color: var(--ink-3);
}
.t-steps button:hover { background: var(--surface); }
.t-steps button[aria-pressed="true"] { background: var(--surface); border-color: var(--line-2); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.t-steps button[aria-pressed="true"]::before { background: var(--brass-fill); border: 0; color: #1c1a16; }
.t-screen {
  height: 440px; border-radius: 18px; border: 1px solid #2a2c33; box-shadow: 0 50px 90px -50px rgba(0, 0, 0, .6), 0 0 0 6px var(--surface), 0 0 0 7px var(--line);
  font-size: 13.5px;
}
.t-screen.app { flex-direction: column; }
.t-screen .chat { padding: 18px; gap: 10px; }
.t-screen.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #0b0c0e; padding: 10px; }
.t-screen.two .chat { padding: 12px; }
.t-screen.two .m-reply, .t-screen.two .m-mem, .t-screen.two .m-loaded, .t-screen.two .m-lock, .t-screen.two .m-done { padding-left: 0; margin-left: 0; }
@media (max-width: 640px) {
  .t-screen { height: 460px; font-size: 12.5px; }
  .t-screen.two { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .t-screen .chat { padding: 12px; }
  .m-reply, .m-think, .m-done, .m-test { padding-left: 0; }
  .code, .saved, .chart, .session, .m-report, .m-mem, .m-loaded, .m-lock { margin-left: 0; }
  .cal li { min-height: 44px; }
  .ev { font-size: 0; height: 6px; padding: 0; }
}

/* ---------- every device ---------- */
.ev-in { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .ev-in { grid-template-columns: 1.1fr .9fr; gap: 56px; } }
.ev-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.ev-list li { padding-left: 30px; position: relative; color: var(--ink-2); }
.ev-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8 0 18%, transparent 22%), var(--brass-fill); box-shadow: 0 0 0 3px var(--brass-soft); }
.ev-list b { color: var(--ink); }
.sync { position: relative; aspect-ratio: 3 / 2; max-width: 520px; margin: 0 auto; }
.sync svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sync path { stroke: var(--brass-fill); stroke-width: 2; stroke-dasharray: 5 7; fill: none; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
.s-hub { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--surface); border: 2px solid var(--brass-fill); border-radius: 16px; padding: 12px 18px; font: 700 20px/1.1 var(--serif); text-align: center; z-index: 1; box-shadow: var(--shadow); }
.s-hub small { display: block; font: 500 12px var(--sans); color: var(--ink-3); margin-top: 3px; }
.s-dev { position: absolute; background: #1b1c20; border-radius: 8px; padding: 5px; box-shadow: var(--shadow); z-index: 1; }
.s-dev i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(180deg, #2a2d36 0 18%, var(--app-bg) 18%); position: relative; overflow: hidden; }
.s-dev i::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 14%; height: 22%; border: 1.5px solid var(--app-amber); border-radius: 4px; animation: blink 3s ease-in-out infinite; }
@keyframes blink { 0%, 30% { opacity: 0; transform: translateY(6px); } 40%, 80% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; } }
.s-lap { left: 4%; top: 2%; width: 34%; height: 34%; }
.s-tab { right: 4%; top: 0; width: 26%; height: 40%; border-radius: 12px; }
.s-pho { left: 50%; bottom: 0; width: 14%; height: 34%; margin-left: -7%; border-radius: 12px; }

/* ---------- systems ---------- */
.layers { display: grid; gap: 6px; margin-top: 36px; max-width: 760px; }
.layer { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); position: relative; }
.layer b { font: 700 18px var(--serif); min-width: 9ch; }
.layer span { color: var(--ink-3); font-size: 14.5px; }
.layer + .layer::before { content: ""; position: absolute; left: 32px; top: -8px; width: 2px; height: 10px; background: var(--brass-fill); }
.l-hub { border-color: var(--brass-fill); background: var(--us); margin-left: 16px; }
.l-sys { margin-left: 32px; }
.l-model { margin-left: 48px; }
.sys-groups { display: grid; gap: 22px; margin-top: 44px; }
@media (min-width: 760px) { .sys-groups { grid-template-columns: repeat(2, 1fr); } }
.sys-group h3 { font-size: 20px; padding-bottom: 8px; border-bottom: 2px dashed var(--line-2); }
.sys { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.sys li { display: grid; grid-template-columns: 40px 1fr; gap: 0 12px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); transition: transform .25s, box-shadow .25s; }
.sys li:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.si { grid-row: span 2; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font: 700 17px/1 var(--mono); color: hsl(var(--hue) 55% 30%); background: hsl(var(--hue) 70% 90%); }
:root[data-theme="dark"] .si { color: hsl(var(--hue) 80% 78%); background: hsl(var(--hue) 30% 18%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .si { color: hsl(var(--hue) 80% 78%); background: hsl(var(--hue) 30% 18%); } }
.sys b { font-size: 16px; }
.sys p { color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }
.sys-more { margin-top: 28px; color: var(--ink-2); }

/* ---------- marketplace teaser ---------- */
.mt-in { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .mt-in { grid-template-columns: 1fr 1fr; gap: 56px; } }
.mt-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mt-cards li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px; text-align: center; font-weight: 600; font-size: 14px; display: grid; gap: 6px; justify-items: center; }
.mt-cards span { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; color: hsl(var(--hue) 55% 30%); background: hsl(var(--hue) 70% 90%); }
.mt-cards small { font: 500 11px var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.mt-cards li:nth-child(even) { transform: translateY(14px); }
.mt-cards li:nth-child(even).in { transform: translateY(14px); }
:root[data-theme="dark"] .mt-cards span { color: hsl(var(--hue) 80% 78%); background: hsl(var(--hue) 30% 18%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mt-cards span { color: hsl(var(--hue) 80% 78%); background: hsl(var(--hue) 30% 18%); } }

/* ---------- comparison additions ---------- */
.matrix .cat th span b { font: 600 11px var(--mono); color: var(--brass); margin-right: 6px; }
.matrix .cat th span::before { display: none; }
.matrix .cat th small { display: block; font: 400 13px/1.35 var(--sans); color: var(--ink-3); margin-top: 3px; }
.sym.soon { border: 2px dashed var(--part); }
.src-all summary { cursor: pointer; font-weight: 600; margin-top: 28px; color: var(--brass); }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; }
  .dev { transform: none !important; }
}
.code.flush{margin:8px 0 0}
.m-loaded.note{color:var(--app-amber);font-style:italic}

/* compact hero: the promise and the devices both fit a laptop screen */
.hero { padding-top: 40px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); }
.hero-copy .lede { font-size: 18px; margin-top: 16px; }
.hero-copy .proof { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; max-width: none; }
.hero-copy .proof li { padding: 8px 14px 8px 34px; border-radius: 999px; box-shadow: none; }
.hero-copy .proof li::after { border-radius: 999px; inset: 3px; }
.hero-copy .proof .stud { left: 12px; top: 50%; margin-top: -7px; }
.hero-copy .proof strong { font-size: 15px; display: inline; }
.hero-copy .proof span:not(.stud) { display: none; }
.hero-copy .cta { margin-top: 22px; }
.card-ok > pre.code { display: block; width: 100%; box-sizing: border-box; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 641px) { .cal li { min-height: 84px; } }

/* ---------- the pitch: a definition with underlined terms that explain themselves ---------- */
.pitch { font: 400 clamp(19px, 2.3vw, 25px)/1.6 var(--serif); color: var(--ink-2); max-width: 54ch; margin: 22px auto 0; text-wrap: pretty; }
.term {
  position: relative; color: var(--ink); cursor: help; outline: none;
  text-decoration: underline; text-decoration-style: dotted; text-decoration-color: var(--brass-fill);
  text-decoration-thickness: 2px; text-underline-offset: .2em; border-radius: 4px; transition: background .2s;
}
.term:hover, .term:focus-visible, .term.open { background: var(--brass-soft); text-decoration-style: solid; }
.term:focus-visible { box-shadow: 0 0 0 3px var(--signal); }
.tip {
  position: absolute; z-index: 30; left: 50%; bottom: calc(100% + 10px); width: max-content; max-width: min(300px, 86vw);
  transform: translate(calc(-50% + var(--dx, 0px)), 6px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); border-radius: 12px; padding: 10px 13px; text-align: left;
  font: 400 14.5px/1.45 var(--sans); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); transition: opacity .18s, transform .18s;
}
.tip::after { content: ""; position: absolute; left: calc(50% - var(--dx, 0px)); top: 100%; margin-left: -7px; border: 7px solid transparent; border-top-color: var(--ink); }
.term:hover .tip, .term:focus-visible .tip, .term.open .tip { opacity: 1; transform: translate(calc(-50% + var(--dx, 0px)), 0); }
.tip.below { bottom: auto; top: calc(100% + 10px); }
.tip.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--ink); }
@media print { .tip { display: none; } }
.term { white-space: nowrap; }
.term .tip { white-space: normal; }
.term.long { white-space: normal; }

/* rich definitions (fn, system, kind) and tips placed by script so tables and cards never clip them */
.tip-head { display: block; font: 700 15px var(--serif); margin-bottom: 4px; color: var(--bg); }
.tip-head i { font: 400 12px var(--sans); opacity: .7; }
.tip-list { display: block; margin: 6px 0 4px; }
.tip-list span { display: block; padding-left: 14px; position: relative; }
.tip-list span::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--brass-fill); }
.tip.fixed { position: fixed; left: var(--tx); top: var(--ty); bottom: auto; transform: translateY(4px); }
.term:hover .tip.fixed, .term:focus-visible .tip.fixed, .term.open .tip.fixed { transform: none; }
.tip.fixed::after { left: var(--ax); }
.tip.fixed.below::after { left: var(--ax); }
.term.w-fn, .term.w-system, .term.w-kind { font-weight: 600; text-decoration-style: solid; text-decoration-thickness: 1.5px; }
.matrix .term, .m-card .term, .only-list .term { position: relative; z-index: 2; }
.matrix .term .tip, .only-list .term .tip, .m-card .term .tip { font-weight: 400; }
/* with script, a closed tip is fixed at the corner (fixed boxes never widen the page); place() moves it when it opens */
.js .tip { position: fixed; left: var(--tx, 0); top: var(--ty, 0); bottom: auto; visibility: hidden; transform: translateY(4px); }
.js .term:hover .tip, .js .term:focus-visible .tip, .js .term.open .tip { visibility: visible; transform: none; }
/* the floating layer site.js fills; with script, the inline tips stay hidden (they remain for assistive tech) */
.js .term .tip { display: none; }
.tip-layer {
  position: fixed; z-index: 100; left: 0; top: 0; width: max-content; max-width: min(320px, 88vw); pointer-events: none;
  background: var(--ink); color: var(--bg); border-radius: 12px; padding: 10px 13px; text-align: left;
  font: 400 14.5px/1.45 var(--sans); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
  opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s;
}
.tip-layer.on { opacity: 1; visibility: visible; transform: none; }
.tip-layer::after { content: ""; position: absolute; left: var(--ax, 50%); top: 100%; margin-left: -7px; border: 7px solid transparent; border-top-color: var(--ink); }
.tip-layer.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--ink); }
.tip-layer .tip-head { color: var(--bg); }

/* the joke: the pitch is one long breath */
.inhale { display: inline-block; font: italic 400 .8em var(--serif); color: var(--brass); padding: 0 .15em; animation: inhale 4.5s ease-in-out infinite; transform-origin: 50% 70%; }
@keyframes inhale { 0%, 55%, 100% { transform: scale(1); opacity: .75; } 70% { transform: scale(1.14); opacity: 1; } 85% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .inhale { animation: none; } }

/* ---------- run cards, as RunCard.vue draws them: dot · label · mono args · time and cost · chevron ---------- */
.m-user { background: #7f9cf5; color: #0c1530; border-radius: 12px; }
.run {
  display: flex; align-items: center; gap: 8px; min-width: 0; margin-left: 26px;
  border: 1px solid var(--app-line); border-radius: 10px; padding: 8px 10px; background: var(--app-bg);
  font-size: 12.5px;
}
.run b { font-weight: 600; white-space: nowrap; color: var(--app-ink); }
.run code { font: 12px var(--mono); color: var(--app-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.rdot { width: 8px; height: 8px; border-radius: 50%; background: var(--app-green); flex: none; }
.run.working .rdot { background: var(--app-amber); animation: rpulse 1s ease-in-out infinite; }
.run.working:has(.rmeta.done.on) .rdot { background: var(--app-green); animation: none; }
@keyframes rpulse { 50% { opacity: .35; } }
.rmeta { font-size: 11.5px; color: var(--app-ink-3); white-space: nowrap; flex: none; }
.run .rmeta.pre { display: none; }
.chev { width: 7px; height: 7px; border: solid var(--app-ink-3); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); flex: none; margin: 0 2px 0 4px; }
.fn-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--app-blue-soft); color: #c7d5ff; border-radius: 999px; padding: 2px 10px; font-weight: 600; font-size: 12px; }
.fn-chip::before { content: "{ }"; font: 600 10px var(--mono); color: var(--app-blue); }
.s-line.solo { margin-left: 26px; }
.app-tab .run, .app-phone .run, .t-screen.two .run { margin-left: 0; }
.app-phone .run { padding: 5px 7px; gap: 5px; font-size: 10.5px; }
.app-phone .run code { font-size: 10px; }
.app-phone .chev, .app-tab .chev { display: none; }
.app-tab .run { font-size: 11px; padding: 6px 8px; }
.app-tab .run code { font-size: 10.5px; }
@media (max-width: 640px) { .run { margin-left: 0; } .run .rmeta { display: none; } .s-line.solo { margin-left: 0; } }

/* ---------- marketplace teaser: real listing rows, not tiles ---------- */
.mt-cards { grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .mt-cards { grid-template-columns: 1fr 1fr; } }
.mt-cards li, .mt-cards li:nth-child(even), .mt-cards li:nth-child(even).in {
  transform: none; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 2px 12px;
  text-align: left; justify-items: start; padding: 12px 14px; font-size: 15px;
}
.js .mt-cards li[data-reveal]:not(.in) { transform: translateY(14px); }
.mt-cards li span { grid-row: span 2; }
.mt-cards li em { font-style: normal; font-size: 13px; color: var(--ink-3); font-weight: 400; grid-column: 2; line-height: 1.3; }
.mt-cards li small { grid-row: 1 / span 2; grid-column: 3; align-self: center; padding: 4px 8px; border-radius: 999px; border: 1px dashed var(--line-2); }
.mt-cards li small.b { border: 0; background: var(--brass-soft); color: var(--brass); }
.mt-cards li b { grid-column: 2; align-self: end; font-size: 15.5px; }
.mt-cards li em { align-self: start; }

/* ---------- the comparison's header, kept under the page header while the table scrolls by (site.js) ---------- */
.mx-float { position: fixed; top: 60px; z-index: 15; overflow: hidden; pointer-events: none; visibility: hidden; border-radius: 0 0 10px 10px; box-shadow: 0 12px 24px -18px rgba(0, 0, 0, .45); }
.mx-float.on { visibility: visible; pointer-events: auto; }
.mx-float table { margin: 0; }
.mx-float thead th { position: static; }
.mx-float .feat, .mx-float .us { position: relative; z-index: 2; }
.mx-float .feat, .mx-float .us { left: 0; }
.app .term { color: inherit; }

/* a run card with its body open (make_code's result: the saved fn, its signature, a sample) */
.run.with-body { display: block; padding: 0; }
.run-line { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; }
.run .rstat.pre { display: none; }
.run-body { border-top: 1px solid var(--app-line); padding: 8px 12px 9px 26px; display: grid; gap: 2px; font: 11.5px/1.5 var(--mono); color: var(--app-ink-2); }
.run-body.pre { display: none; }
.run-body .k { color: var(--app-ink-3); display: inline-block; min-width: 9ch; }
.chev.up { transform: rotate(-135deg) translateY(-1px); }
.tick-clock::after { content: "0:04"; animation: clock 4s steps(1) infinite; }
@keyframes clock { 0% { content: "0:04"; } 25% { content: "0:13"; } 50% { content: "0:24"; } 75% { content: "0:35"; } }
@media (max-width: 640px) { .run-body .k { min-width: 0; margin-right: 6px; } }
/* with script, only the floating copy sticks to the top; the table's own header row stays in the table */
.js .matrix thead th { top: auto; }
