/*
 * SPDX-License-Identifier: AGPL-3.0-or-later
 * Copyright (c) 2026 Atacama <contact@atacama.tech>
 */

/* session-mesh showcase site.
   Variables and shell rules are copied from the application's static/style.css
   so the site stands alone. Without JavaScript the page is a long-form document;
   site.js adds the "js" class on <html> and the app shell takes over. */
:root {
  color-scheme: dark;
  --bg: #0b0e13;
  --term: #0d1117;
  --panel: #11151c;
  --panel-2: #161b24;
  --line: #232a35;
  --fg: #d8dee9;
  --text: #c9d1dc;
  --mute: #8b94a3;
  --accent: #7ee0a1;
  --busy: #f5c56b;
  --idle: #7ee0a1;
  --wait: #ff9f5a;
  --off: #4b5361;
  --danger: #ff8a8a;
  --violet: #c8a8ff;
  --mono: ui-monospace, "JetBrains Mono", "Fira Code", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --side: 300px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17.5px/1.65 var(--sans); }
[hidden] { display: none !important; }
html:not(.js) .js-only { display: none !important; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #a8f0c2; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mute { color: var(--mute); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 8px 14px; border-radius: 7px; background: var(--accent); color: var(--bg); font-weight: 600; }
.skip:focus { top: 12px; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: .86em; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--fg); overflow-wrap: anywhere; }
kbd { font-size: .8em; padding: 1px 6px; border: 1px solid #3a4352; border-bottom-width: 2px; border-radius: 5px; background: var(--panel-2); color: var(--fg); }
.phone-only { display: none; }

/* A quieter showcase, with a real, local-only prompt draft. */
.site-composer { flex: none; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--term); }
.site-composer label { display: block; margin-bottom: 8px; font: 12px var(--mono); }
.site-composer textarea { display: block; width: 100%; min-height: 64px; max-height: 180px; resize: vertical; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--fg); font: 14px/1.5 var(--mono); }
.site-composer textarea:focus { border-color: var(--accent); }
.site-composer p { margin: 7px 0 0; color: var(--mute); font: 11px/1.5 var(--sans); }
.prompt-commands { display: flex; flex-wrap: wrap; gap: 6px; max-height: 120px; overflow-y: auto; margin-bottom: 10px; }
.site-composer #prompt-status:empty { display: none; }
.site-composer #prompt-status { color: var(--accent); }

/* ---------------- controls (from the app) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 12px/1.3 var(--mono); padding: 6px 11px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel-2); color: var(--fg); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: #3a4352; color: var(--fg); }
.btn.primary { background: var(--accent); color: #0b0e13; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: #9aeab6; color: #0b0e13; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 4px 8px; font-size: 12px; }
.btn.big { padding: 11px 20px; font-size: 15px; border-radius: 9px; }

/* ---------------- sidebar (from the app) */
#side { background: var(--panel); border-bottom: 1px solid var(--line); font: 13px/1.45 var(--mono); color: var(--fg); }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 14px 10px; }
.brand { display: inline-flex; align-items: center; gap: .45em; font-weight: 600; letter-spacing: .02em; color: var(--fg); text-decoration: none; }
.brand:hover { color: var(--fg); }
.brand-logo { height: 1.4em; width: auto; aspect-ratio: 240 / 130; flex: none; }
/* Sessions / Projects, as at the top of the session-mesh sidebar */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 14px 10px; }
.mode { display: block; padding: 8px 6px; border: 1px solid var(--line); border-radius: 6px; text-align: center; font-size: 12.5px; color: var(--fg); text-decoration: none; background: var(--bg); }
.mode:hover { border-color: var(--accent); }
.mode.cur { background: #16301f; border-color: #2a5a3c; color: var(--accent); }
.mode[data-go="projects"]:hover { border-color: #8a6fd1; }
.mode[data-go="projects"].cur { background: #241d33; border-color: #8a6fd1; color: #d9ccff; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 0 14px 10px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.tabs button { font: inherit; font-size: 12px; border: 0; border-radius: 6px; padding: 6px 8px; background: none; color: var(--mute); display: flex; gap: 6px; justify-content: center; align-items: center; cursor: pointer; }
.tabs button:hover { color: var(--fg); }
.tabs button.cur { background: #1d2530; color: var(--fg); }
.n { font-size: 11px; color: var(--mute); }
.filter { display: block; width: calc(100% - 28px); margin: 0 14px 8px; padding: 7px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 7px; color: var(--fg); font: inherit; }
.filter:focus { outline: none; border-color: var(--accent); }
.list { padding: 4px 8px 12px; }
.items { list-style: none; margin: 0; padding: 0; }
.group { margin: 6px 0 4px; padding: 4px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); display: flex; gap: 6px; }
.group .count { margin-left: auto; }
.item { display: block; text-decoration: none; border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; color: var(--fg); margin-bottom: 2px; }
.item:hover { background: var(--panel-2); color: var(--fg); }
.item:focus-visible { outline-offset: -2px; }
.item[aria-current="page"] { background: var(--panel-2); border-color: var(--line); box-shadow: inset 2px 0 0 var(--accent); }
.item.wait { box-shadow: inset 3px 0 0 var(--wait); }
.item.wait[aria-current="page"] { box-shadow: inset 3px 0 0 var(--wait), inset 0 0 0 0 transparent; }
.item .top { display: flex; align-items: center; gap: 7px; }
.item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.item .ago { color: var(--mute); font-size: 11px; flex: none; }
.item .meta { display: block; color: var(--mute); font-size: 11px; margin: 2px 0 0 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .last { display: block; color: #aab2c0; font-size: 11.5px; margin: 3px 0 0 15px; }
.tag { font-size: 10px; padding: 0 5px; border-radius: 4px; border: 1px solid var(--line); color: var(--mute); flex: none; font-family: var(--mono); }
.tag.claude { color: #e5a88a; border-color: #4a352b; }
.tag.codex { color: #8ab8e5; border-color: #2b3b4a; }
.tag.known-agent { color: #9fcf9f; border-color: #315238; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--off); flex: none; display: inline-block; }
.dot.idle { background: none; border: 1.5px solid var(--idle); }
.dot.unread { background: var(--idle); }
.dot.wait { background: var(--wait); box-shadow: 0 0 0 3px #ff9f5a33; }
.dot.busy { background: var(--busy); box-shadow: 0 0 0 3px #f5c56b22; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.st { font-weight: 600; }
.st.wait { color: var(--wait); }
.st.busy { color: var(--busy); }
.st.done { color: var(--idle); font-weight: 400; }
.no-match { margin: 8px 10px; font-size: 12px; }
/* History: releases listed as past conversations */
.dot.hist { background: none; border: 1px solid var(--off); }
.hitem[aria-current="page"] .dot.hist { border-color: var(--accent); background: var(--accent); }
/* "Waiting for you": the status section the app puts at the top of the list */
.todo { margin: 2px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.status-head.wait { color: var(--wait); font-weight: 700; }
.todo .item { width: 100%; text-align: left; font: inherit; background: none; cursor: pointer; }
.nudge-pop { animation: pop .5s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.94); } }
#btn-menu { position: relative; }
#btn-menu[data-badge]:not([data-badge=""])::after { content: attr(data-badge); position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--wait); color: #1a1206; font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; }
.side-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 8px 14px; color: var(--mute); font-size: 11px; }
.foot-count { flex: 1 1 100%; }
.foot-legal { flex: 1 1 100%; min-width: 0; display: flex; gap: .4em; font-family: var(--sans); font-size: 10.5px; line-height: 1.4; color: var(--mute); white-space: nowrap; }
.foot-legal-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hlist-intro { margin: 2px 6px 8px; font: 12px/1.45 var(--sans); color: var(--mute); }
.more-gh-row { margin: 8px 0 0; }
.more-gh { display: inline-block; margin: 0 0 6px 25px; font-size: 11.5px; }
.legend { display: grid; gap: 4px; margin: 0 0 1em; font-size: .92em; }
.legend div { display: flex; align-items: baseline; gap: 8px; }
.legend dt { min-width: 7.6em; }
.legend dd { margin: 0; flex: 1; min-width: 0; }
.legend-slot { margin-top: 1.2em; }
.anchor-alias { display: block; height: 0; }

/* ---------------- long-form document (no JavaScript) */
html:not(.js) .list { max-width: 1100px; margin: 0 auto; }
html:not(.js) .items { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px; }
html:not(.js) #main { background: var(--term); }
html:not(.js) .sess { max-width: 780px; margin: 0 auto; padding: 56px 24px; border-bottom: 1px solid var(--line); }
html:not(.js) .visual { margin: 32px 0 0; }

/* ---------------- section content: web reading inside the panes */
.cmdline { margin: 0 0 28px; font: 13.5px/1.6 var(--mono); color: var(--fg); }
.cmdline .prompt { color: var(--accent); }
.cmdline .out { display: block; color: var(--mute); }
.cmdline .cmd.typing::after { content: "▋"; color: var(--accent); animation: blink 1s steps(1) infinite; }
.cmdline.pending .out { visibility: hidden; }
@keyframes blink { 50% { opacity: 0; } }
.sess h1, .sess h2, .sess h3 { color: #eef2f7; line-height: 1.2; text-wrap: balance; }
.sess h1 { margin: 6px 0 14px; font-size: clamp(2rem, 3.4vw, 2.8rem); letter-spacing: -.02em; }
.sess h2 { margin: 0 0 18px; font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -.01em; }
.sess h3 { margin: 34px 0 8px; font-size: 1.15rem; }
.h-prompt { color: var(--accent); font-family: var(--mono); font-weight: 400; margin-right: .2em; }
.prose { max-width: 66ch; }
.prose p, .prose li { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.lead, .lede { font-size: 1.2em; line-height: 1.5; color: var(--fg); }
.lede { max-width: 58ch; margin: 0 0 22px; }
.prose strong { color: var(--fg); }
.sess { container-type: inline-size; }
.hero { display: grid; gap: 26px; margin-bottom: 18px; }
.hero-visual { min-width: 0; }
.hero-brand { display: flex; align-items: center; gap: 14px; margin: 0 0 10px -8px; }
.hero-logo { display: block; width: 76px; height: auto; }
.wordmark { font: 700 2.6rem/1 var(--mono); color: var(--fg); letter-spacing: -.02em; }
@container (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: 44px; align-items: center; }
}
/* the hero illustration: a session list with states, and one terminal */
.hero-mock { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--term); box-shadow: 0 14px 40px #0008; font: 12px/1.45 var(--mono); color: var(--fg); }
.hm-side { background: var(--panel); border-right: 1px solid var(--line); padding: 8px 6px; }
.hm-group { display: flex; justify-content: space-between; margin: 4px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.hm-wait-group { color: var(--wait); font-weight: 700; }
.hm-item { margin: 0 0 3px; padding: 6px 8px; border-radius: 7px; border: 1px solid transparent; }
.hm-item.cur { background: var(--panel-2); border-color: var(--line); box-shadow: inset 2px 0 0 var(--accent); }
.hm-item.wait { box-shadow: inset 3px 0 0 var(--wait); background: #ff9f5a0d; }
.hm-item .top { display: flex; align-items: center; gap: 6px; }
.hm-item b { flex: 1; min-width: 0; }
.hm-item .st, .hm-item .last { display: block; margin-left: 14px; font-size: 10.5px; }
.hm-item .last { color: #aab2c0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-term { padding: 0 0 10px; min-width: 0; min-height: 262px; }
.hm-head { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 7px 10px; background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: inset 0 -2px 0 var(--accent); }
.hm-state { margin-left: auto; color: var(--busy); font-size: 10.5px; }
.hm-state.wait { color: var(--wait); }
.hm-state.idle { color: var(--mute); }
.hm-consent { margin: 8px 10px 6px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--wait); border-radius: 10px; }
.hm-consent p { margin: 0 0 5px; }
.hm-consent-title { font-weight: 700; }
.hm-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin: 8px 0 0 !important; }
.js .hm-off { display: none; }
.hm-consent.fresh { animation: appear .25s ease-out; }
.hm-term .ml { margin: 0 10px 3px; }
.hero-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 8px 0 0; min-height: 2.9em; font-size: 12.5px; line-height: 1.45; color: var(--mute); }
.hero-foot #hm-status { flex: 1 1 220px; }
/* three doors into the site, inside the first screen */
/* built-in agents: a slow, looping strip; still and wrapped with reduced motion */
.agents-strip { margin: 4px 0 22px; }
.strip-title { margin: 0 0 8px; font: 600 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.marquee { display: flex; gap: 10px; overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent); }
.marquee-track { display: flex; gap: 10px; flex: none; list-style: none; margin: 0; padding: 0; animation: marquee 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-100% - 10px)); } }
.agent { display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 7px; border: 1px solid #2a5a3c; border-radius: 999px; background: var(--panel); white-space: nowrap; }
.agent .mono { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--mute); font: 700 12px/1 var(--mono); }
.agent .logo { width: 30px; height: 30px; padding: 6px; border-radius: 50%; border: 1px solid var(--accent); background: var(--panel-2); }
.agent .aname { font-weight: 600; color: var(--fg); }
.agent.more { border-style: dashed; border-color: var(--line); }
.agent.more .aname { color: var(--mute); font-weight: 500; }
.strip-note { margin: 8px 0 0; font-size: .88em; color: var(--mute); }
@media (prefers-reduced-motion: reduce) {
  .marquee { flex-wrap: wrap; -webkit-mask-image: none; mask-image: none; }
  .marquee-track { flex-wrap: wrap; animation: none; }
  .marquee-track[aria-hidden] { display: none; }
}
.doors { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 0 0 30px; padding: 0; }
.door { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); text-decoration: none; }
.door:hover { border-color: var(--accent); color: var(--text); }
.door-k { font: 600 12px/1.4 var(--mono); color: var(--accent); }
.door-t { font-size: .95em; line-height: 1.45; color: var(--fg); }
.door-go { margin-top: auto; color: var(--accent); font-family: var(--mono); }
.prose .chips-row { margin: 0 0 18px; }
/* a pointer to another view, styled as a top-bar button of the app */
.app-hint { display: flex; gap: 12px; align-items: baseline; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: .95em; }
.hint-btn { flex: none; font: 12px/1.3 var(--mono); padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-2); color: var(--fg); }
/* install: Linux and macOS */
.platform { padding-top: 4px; }
/* the Projects mock */
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chip-s { display: inline-block; font: 12px/1.5 var(--mono); padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg); background: var(--panel-2); white-space: nowrap; vertical-align: 2px; }
.chip-s.alpha { color: var(--wait); border-color: #5a3a24; }
.chip-s.planned { color: var(--violet); border-color: #3a2f4f; }
.chip-s.available { color: var(--accent); border-color: #2b4a37; }
.chip-s.progress { color: var(--busy); border-color: #4a3f2b; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 8px; font-size: 1.02em; color: var(--fg); }
.points li { padding-left: 16px; border-left: 2px solid var(--accent); line-height: 1.45; }
.points strong { color: #eef2f7; }
.howto-line { margin: 0; color: var(--mute); font-size: .95em; }
.status-list { list-style: none; padding-left: 0 !important; }
.status-list li { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0 !important; }
.status-list .chip-s { min-width: 7.6em; text-align: center; margin-right: 6px; }
.facts { counter-reset: fact; list-style: none; padding-left: 0 !important; }
.facts li { counter-increment: fact; position: relative; padding: 14px 0 14px 46px; border-bottom: 1px solid var(--line); margin: 0 !important; }
.facts li::before { content: counter(fact); position: absolute; left: 0; top: 14px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font: 600 14px/28px var(--mono); text-align: center; }
/* a section without a panel uses the width: its facts sit side by side */
@container (min-width: 760px) {
  .prose.wide { max-width: 1240px; }
  .prose.wide > p { max-width: 74ch; }
  .prose.wide .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 26px 0 28px; }
  .prose.wide .facts li { padding: 18px 20px 18px 64px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
  .prose.wide .facts li::before { left: 18px; top: 18px; }
}
/* two blocks side by side when the reading area is wide */
@container (min-width: 900px) {
  .prose.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 52px; align-items: start; }
  .prose.split h3:first-child { margin-top: 0; }
}
.steps { list-style: none; padding-left: 0 !important; border-left: 2px solid var(--line); margin-left: 6px !important; }
.steps li { position: relative; padding: 4px 0 18px 26px; margin: 0 !important; }
.steps li::before { content: ""; position: absolute; left: -7px; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--mute); }
.steps li:first-child::before { background: var(--accent); border-color: var(--accent); }
.step-k { display: block; font: 600 12px/1.6 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.steps li:first-child .step-k { color: var(--accent); }
.code { margin: 0 0 1.2em; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; font-size: 14px; line-height: 1.6; color: var(--fg); }
.code code { border: 0; padding: 0; background: none; font-size: inherit; overflow-wrap: normal; }
.small-print { font-size: .85em; color: var(--mute); }
.hero .cmdline.accent { margin: 22px 0 0; font-size: 12.5px; opacity: .8; }

/* the Releases section (History) */
.hentry { max-width: 66ch; margin: 0 0 14px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.hmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; font: 12px/1.5 var(--mono); color: var(--mute); }
.sess .htitle { margin: 0 0 10px; font-size: 1.15rem; line-height: 1.3; color: #eef2f7; text-wrap: balance; }
.hbody p, .hbody li { margin: 0 0 .8em; }
.hbody > :last-child, .hbody li:last-child { margin-bottom: 0; }
.hbody ul { margin: 0; padding-left: 1.2em; }
.hbody strong { color: var(--fg); }
.hback { margin: 0 0 14px; font: 13px var(--mono); }
.hnav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font: 13px/1.4 var(--mono); }
.hnav-next { margin-left: auto; text-align: right; }
.js .hist-sess:not(.single) .hback, .js .hist-sess:not(.single) .hnav { display: none; }
.js .hist-sess.single > h2, .js .hist-sess.single .hist-intro, .js .hist-sess.single .hentry:not(.cur) { display: none; }
.hbody .highlights { margin-bottom: .9em; }
.highlights li { margin-bottom: .55em; }
.js .hist-sess.single .hentry { padding: 0; border: 0; background: none; }
.js .hist-sess.single .htitle { margin: 4px 0 18px; font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -.01em; }
.js .hist-sess.single .hbody { font-size: 1.05em; }
.doc-toc li { margin: 0 0 .25em; }
.doc-toc a[aria-current="page"] { font-weight: 700; color: #d8dee9; }

.next { margin: 48px 0 0; padding-top: 22px; border-top: 1px solid var(--line); max-width: 66ch; }
.next-link { display: inline-flex; gap: 8px; align-items: center; padding: 10px 16px; border: 1px solid var(--accent); border-radius: 9px; font: 600 14px var(--mono); text-decoration: none; }
.next-link:hover { background: var(--accent); color: var(--bg); }

/* ---------------- visuals: screenshots, documents, the mock */
.visual { margin: 0; }
.visual figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--mute); }
.visual img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.shot { display: block; border-radius: 8px; }
.shot-wide { margin-bottom: 14px; }
.shot:hover img { border-color: var(--accent); }
.mock figcaption { font-family: var(--sans); }
.open-panel { display: none; }
.phone-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 560px; }
.gallery .phone-pair { max-width: none; margin-top: 14px; }
.shot-frame { padding: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px #0006; }
.shot-frame img { border-radius: 6px; }
.shot-cap { margin: 8px 4px 2px; font-size: 13px; line-height: 1.45; color: var(--mute); }
.doc { background: #0d1117; color: #d8dee9; border-radius: 8px; overflow: hidden; font: 15.5px/1.6 var(--sans); }
.doc-bar { display: flex; justify-content: space-between; margin: 0; padding: 7px 18px; border-bottom: 1px solid #30363d; font: 12px var(--mono); color: #8b949e; }
.doc-src { text-decoration: underline; }
.doc-body { padding: 18px 24px 22px; }
.doc-body p { margin: 0 0 .9em; }
.doc-h1 { font-size: 1.75em; font-weight: 700; line-height: 1.25; padding-bottom: .3em; border-bottom: 1px solid #30363d; margin-bottom: .7em !important; }
.doc-h2 { font-size: 1.15em; font-weight: 700; margin-top: 1.2em !important; }
.doc code { background: #161b22; border-color: #30363d; color: #d8dee9; }
.doc a { color: #79b8ff; }
.doc blockquote { margin: 0 0 .9em; padding: 0 0 0 14px; border-left: 4px solid #30363d; color: #9aa4b2; }
.doc-table { border-collapse: collapse; margin: 0 0 1em; font-size: .9em; width: 100%; }
.doc-table th, .doc-table td { border: 1px solid #30363d; padding: 6px 10px; text-align: left; vertical-align: top; }
.doc-table th { background: #161b22; }
.doc .chip-s { background: #161b22; }
.doc-pre { margin: 0 0 .9em; padding: 10px 12px; background: #161b22; border-radius: 6px; overflow-x: auto; font-size: 13.5px; }
.doc-pre code { background: none; border: 0; padding: 0; }
.doc-diagram { text-align: center; margin: 4px 0 18px !important; }
.visual .doc-diagram img { display: inline-block; width: auto; max-width: 100%; height: auto; border: 0; border-radius: 0; background: none; }
.doc-list { margin: 0 0 .9em; padding-left: 1.3em; }
.timeline { list-style: none; margin: 0 0 1em; padding: 0 0 0 18px; border-left: 2px solid #30363d; }
.timeline li { position: relative; padding: 0 0 14px 6px; }
.timeline li::before { content: ""; position: absolute; left: -26px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #0d1117; border: 2px solid #8b949e; }
.timeline li.now::before { background: #3fb950; border-color: #3fb950; }
.timeline b { display: block; }
.timeline span { color: #9aa4b2; }
.doc-link { margin-top: 1.2em !important; font-weight: 600; }

.mock { font: 13px/1.5 var(--mono); }
.mock-panes { display: grid; gap: 10px; }
.mock-pane { border: 1px solid var(--line); border-radius: 8px; background: var(--term); overflow: hidden; }
.mock-head { display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 10px; background: var(--panel); border-bottom: 1px solid var(--line); color: var(--fg); }
.mock-state { margin-left: auto; font-size: 11.5px; color: var(--busy); }
.mock-state.idle { color: var(--mute); }
.mock-state.wait { color: var(--wait); }
.mock-term { padding: 8px 10px; min-height: 92px; color: var(--fg); }
.ml { margin: 0 0 4px; overflow-wrap: anywhere; }
.ml.dim { color: var(--mute); }
.ml.notice { color: var(--accent); }
.ml .k { color: #8ab8e5; }
.mock-consent { margin: 10px 0 0; padding: 14px 16px; background: var(--panel); border: 1px solid var(--wait); border-radius: 12px; color: var(--fg); box-shadow: 0 10px 30px #0008; }
.mock-consent p { margin: 0 0 6px; }
.mock-consent-title { font-weight: 700; font-size: 14px; }
.mock-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.mock-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 0; color: var(--fg); }
.mock-status { min-height: 1.5em; }
.js .ml.off, .js .mock-consent.off { display: none; }
.ml.fresh, .mock-consent.fresh { animation: appear .25s ease-out; }
/* the whiteboard panel of "collaborate" */
.board { font: 13px/1.5 var(--mono); }
.board figcaption { font-family: var(--sans); }
.board-frame { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #121212; margin-bottom: 10px; }
.board-canvas { display: block; width: 100%; height: auto; }
.board-user { stroke: #e3e3e3; }
.board-agent { stroke: #7ee2a8; }
@font-face { font-family: "Excalifont"; src: url("assets/Excalifont-Regular.woff2") format("woff2"); font-display: swap; }
.board-text { font: 19px "Excalifont", var(--mono); stroke: none; fill: #e3e3e3; }
.board-agent .board-text { fill: #7ee2a8; }
.board-title { font-size: 16px; fill: #9aa4b2; }
.board-note { font-size: 15px; }
.board .draw { stroke-dasharray: 1; }
.board .fresh .draw { animation: draw .9s ease-out both; }
.board .fresh .board-text { animation: appear .5s ease-out .5s both; }
.js .board-off { display: none; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } }

/* ---------------- dialogs and sheets (from the app) */
dialog { background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; padding: 22px; width: min(460px, calc(100vw - 32px)); font: 13px/1.45 var(--mono); }
dialog::backdrop { background: #0008; backdrop-filter: blur(2px); }
dialog h2 { margin: 0 0 14px; font-size: 15px; }
dialog label { display: block; margin-bottom: 12px; color: var(--mute); font-size: 12px; }
dialog input:not([type=radio]) { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 7px; color: var(--fg); font: inherit; }
.presets { border: 0; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.presets legend { color: var(--mute); font-size: 12px; margin-bottom: 6px; padding: 0; }
.presets label { margin: 0; color: var(--fg); border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px; cursor: pointer; font-size: 12px; }
.presets label:has(input:checked) { border-color: var(--accent); color: var(--accent); }
.presets label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.presets input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.preset-hint { min-height: 3em; margin: 4px 0 10px; color: var(--fg); }
.row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.sheet { width: min(560px, 100%); max-width: none; margin: auto auto 0; padding: 14px; border-radius: 16px 16px 0 0; }
.mobile-actions-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mobile-actions-head h2 { margin: 0; }
.mobile-actions-head .btn { min-height: 44px; }
.mobile-actions-list { display: grid; gap: 8px; margin-top: 14px; }
.mobile-actions-list .btn { min-height: 48px; justify-content: flex-start; font-size: 15px; }
.mobile-actions-list .btn[aria-current="true"] { border-color: var(--accent); color: var(--accent); }

/* ---------------- the app shell (JavaScript on) */
.js body { height: 100dvh; overflow: hidden; }
.js #app { display: grid; grid-template-columns: var(--side) 5px 1fr; height: 100dvh; }
.js #side { display: flex; flex-direction: column; min-height: 0; border-bottom: 0; border-right: 1px solid var(--line); overflow: hidden; }
.js .list { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.grip { background: var(--line); }
.js #main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--term); }
.bar { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--panel); flex: none; font: 13px var(--mono); }
.bar-title { flex: 1; min-width: 0; margin: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-actions { display: flex; align-items: center; gap: 8px; }
#btn-panel[aria-pressed="true"] { border-color: #3a4555; background: #1d2530; }
#btn-menu, #btn-mobile-panels, #btn-mobile-actions { display: none; }
.js #panes { flex: 1; min-height: 0; display: flex; }
.workspace-group { min-width: 0; display: flex; flex-direction: column; }
.js #col-main { flex: 1 1 0; }
.js #col-doc { flex: 0 0 44%; max-width: 760px; background: var(--panel); }
#col-grip { width: 5px; flex: none; }
.js body.doc-closed #col-doc, .js body.doc-closed #col-grip { display: none; }
/* a section without a panel: nothing to open in the second column */
.js body.no-panel [data-pane="doc"], .js body.no-panel #btn-panel { display: none; }
.workspace-tabs { min-height: 33px; display: flex; align-items: center; gap: 3px; padding: 3px 5px; border-bottom: 1px solid var(--line); background: var(--panel-2); font: 13px var(--mono); }
.workspace-tab { font: inherit; font-size: 11.5px; color: var(--mute); background: transparent; border: 1px solid transparent; border-radius: 5px; padding: 3px 8px; cursor: pointer; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.workspace-tab[aria-selected="true"] { color: var(--fg); background: var(--panel); border-color: var(--line); }
.workspace-tab:hover { color: var(--fg); border-color: #3a4352; }
.workspace-tab-close { margin-left: auto; font: 16px/1 var(--mono); color: var(--mute); background: none; border: 1px solid transparent; border-radius: 5px; width: 28px; height: 26px; cursor: pointer; }
.workspace-tab-close:hover { color: var(--fg); border-color: #3a4352; }
.tab-other { display: none; }
.pane { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.pane-head { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 12px; border-bottom: 1px solid var(--line); background: var(--panel); flex: none; font: 12.5px var(--mono); color: var(--fg); }
.pane.active .pane-head { box-shadow: inset 0 -2px 0 var(--accent); }
.p-identity { flex: 1 1 auto; min-width: 0; }
.p-name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-status { display: flex; gap: 6px; align-items: center; }
.p-agent, .conn { display: inline-grid; place-items: center; width: 16px; height: 24px; font-size: 0; line-height: 1; }
.p-agent::before { content: "?"; font-size: 14px; font-weight: 700; }
.p-agent[data-state="busy"] { color: var(--busy); }
.p-agent[data-state="busy"]::before { content: "●"; }
.p-agent[data-state="waiting"] { color: var(--wait); }
.p-agent[data-state="waiting"]::before { content: "◐"; }
.p-agent[data-state="shell"] { color: var(--busy); }
.p-agent[data-state="shell"]::before { content: "›"; }
.p-agent[data-state="idle"] { color: var(--mute); }
.p-agent[data-state="idle"]::before { content: "○"; }
.conn { color: var(--accent); }
.conn::before { content: "◉"; font-size: 15px; }
.p-cmd { font-size: 11.5px; }
.js .pane-body { flex: 1; min-height: 0; position: relative; }
.js .reader { position: absolute; inset: 0; overflow-y: auto; padding: 34px 44px 72px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.js .reader:focus { outline: none; }
.js .sess:not(.cur) { display: none; }
.js .sess .visual { display: none; }
.js .doc-host { position: absolute; inset: 0; overflow-y: auto; padding: 22px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.js .doc-host .visual:not(.cur) { display: none; }
.js .doc-host .visual.cur { animation: appear .3s ease-out; }

@media (max-width: 1100px) {
  :root { --side: 260px; }
  .js .reader { padding: 28px 30px 64px; }
  .bar-title { display: none; }
  .bar-actions { margin-left: auto; }
}

/* ---------------- phone: Sessions, Panes, Actions */
@media (max-width: 700px) {
  body { font-size: 17px; }
  .desk-only { display: none; }
  .phone-only { display: inline; }
  html:not(.js) .sess { padding: 40px 16px; }
  .js #app { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .js #side-grip, .js #col-grip, .bar-title, .bar-actions { display: none !important; }
  .js #side { position: fixed; z-index: 10; inset: 56px auto 0 0; width: min(88vw, 340px); transform: translateX(-102%); transition: transform .18s ease; box-shadow: 8px 0 30px #0009; }
  .js body.drawer #side { transform: none; }
  .bar { height: 56px; padding: 0 10px; gap: 8px; }
  #btn-menu, #btn-mobile-panels, #btn-mobile-actions { display: inline-flex; min-width: 44px; min-height: 44px; font-size: 15px; }
  #btn-menu { flex: 1; }
  #btn-mobile-panels, #btn-mobile-actions { flex: 0 0 auto; padding-inline: 10px; }
  .js #col-doc { flex: 1 1 0; max-width: none; }
  .js .workspace-group:not(.group-active) { display: none; }
  .js body.doc-closed #col-main { display: flex; }
  .tab-other { display: inline-block; }
  .workspace-tabs { min-height: 44px; }
  .workspace-tab { min-height: 38px; font-size: 12px; max-width: 48%; }
  .js .reader { padding: 22px 16px 56px; }
  .js .open-panel { display: inline-flex; margin-top: 32px; min-height: 44px; font-size: 14px; white-space: normal; text-align: left; }
  .js .open-panel + .next { margin-top: 20px; }
  .js .doc-host { padding: 14px; }
  .sess h3 { margin-top: 28px; }
  .lede { font-size: 1.04em; margin-bottom: 16px; }
  .sess h1 { font-size: 1.85rem; margin: 4px 0 10px; }
  .hero { gap: 16px; }
  .hero-logo { width: 56px; }
  .wordmark { font-size: 1.9rem; }
  .hero-brand { gap: 10px; }
  .hero-mock { grid-template-columns: minmax(0, 1fr); font-size: 11.5px; }
  .hm-side { border-right: 0; padding: 4px; }
  .hm-extra { display: none; }
  .hm-term { border-top: 1px solid var(--line); min-height: 232px; }
  .app-hint { flex-direction: column; gap: 6px; }
  .cta .btn { white-space: normal; flex-wrap: wrap; max-width: 100%; }
  .cmdline { font-size: 12.5px; overflow-wrap: anywhere; }
  .phone-pair { gap: 10px; }
  .status-list .chip-s { min-width: 0; }
  .doc-body { padding: 14px 16px 18px; }
  .doc-table { font-size: .82em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.install-cmd { margin: 0 0 .9em; padding: 12px 14px; background: var(--term); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; font-size: 13px; line-height: 1.55; }
.install-cmd code { display: block; padding: 0; border: 0; background: none; white-space: pre; font-size: inherit; color: var(--fg); }
.install-flags code { white-space: nowrap; }
.status-fold { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 14px; }
.status-fold > summary { cursor: pointer; font-weight: 600; color: var(--fg); }
.status-fold[open] > summary { margin-bottom: 12px; }
/* in the prose, only what is not there yet carries a chip */
.chip-s.available[data-status-of] { display: none; }
[data-legend-copy] .legend > div:has(.chip-s.available) { display: none; }
/* roadmap previews: Projects and several machines, in the style of the interface */
.pm { padding: 10px 12px 12px; color: var(--fg); }
.pm p { margin: 0; }
.pm-title { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.pm-meta { color: var(--mute); font-size: 11.5px; }
.pm-readme { margin: 4px 0 2px !important; color: #aab2c0; font-family: var(--sans); font-size: 13px; }
.pm-k { margin: 10px 0 4px !important; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.pm-task { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.pm-st { min-width: 66px; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 10.5px; text-align: center; color: var(--mute); }
.pm-st.done { color: var(--accent); border-color: #2a5a3c; }
.pm-st.doing { color: var(--busy); border-color: #5a4a22; }
.pm-machines { border-right: 0; }

/* Reduce competing detail without removing the session-shaped navigation. */
.js #list .item:not([aria-current="page"]) .meta { display: none; }
.js #list .item { padding-block: 13px; }
.js #col-main > .workspace-tabs { display: none; }
.js .reader { padding-top: 48px; }
.hero { margin-bottom: 48px; }
.hero .lede { max-width: 46ch; }
.welcome-points { display: grid; gap: 20px; margin: 0 0 44px; padding: 0; list-style: none; }
.welcome-points li { margin: 0; }
.agents-strip { margin-block: 40px; }
.marquee { flex-wrap: wrap; mask-image: none; -webkit-mask-image: none; }
.marquee-track { flex-wrap: wrap; flex: 1; animation: none; }
.marquee-track[aria-hidden] { display: none; }
.doors { margin-block: 40px; }
.door { border-color: transparent; background: transparent; }
.js .open-panel { display: inline-flex; margin-top: 24px; }
.welcome-points { max-width: 58ch; }
.site-orientation { max-width: 48ch; margin: 44px 0; padding-left: 22px; border-left: 3px solid var(--accent); color: var(--fg); font-size: clamp(1.25rem, 2vw, 1.65rem); line-height: 1.5; text-wrap: balance; }
@media (max-width: 700px) {
  .js .reader { padding-top: 28px; }
  .site-composer { padding: 10px 16px; }
  .site-composer textarea { font-size: 16px; }
  .hero { margin-bottom: 32px; }
  .welcome-points { gap: 16px; }
}
