@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-400.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-500.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-600.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-700.woff2) format('woff2'); }
@font-face { font-family: 'Cascadia Code'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/cascadia-code-400.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-400.woff2) format('woff2'); }
:root {
  color-scheme: light;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Cascadia Code', ui-monospace, Menlo, monospace;
  --blue: #2952e3;
  --blue-hover: #1f44cc;
  --bg: #ffffff;
  --panel: #f7f7f8;
  --line: #e4e4e7;
  --text: #09090b;
  --muted: #52525b;
  --faint: #71717a;
  --accent: #2952e3;
  --tile: #eef2ff;
  --chrome: #f4f4f5;
}
:root[data-theme="dark"] {
  color-scheme: dark;
    --bg: #050506;
    --panel: #0c0c0e;
    --line: #1f1f24;
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --faint: #8e8e99;
    --accent: #7d9bff;
    --tile: #10183a;
    --chrome: #111114;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  display: flex; flex-direction: column; min-height: 100vh;
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
::selection { background: var(--blue); color: #ffffff; }
html { scrollbar-color: var(--line) transparent; accent-color: var(--blue); caret-color: var(--accent); }
.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; flex: none; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 32px; max-width: 1240px; margin: 0 auto; padding: 14px 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 17px; }
.nav { display: flex; gap: 26px; margin-right: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; padding: 4px 0; }
.nav a:hover { color: var(--text); }
.actions { display: flex; align-items: center; gap: 8px; }
.actions form { margin: 0; }
.theme-toggle {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
}
.theme-toggle:hover { color: var(--text); border-color: var(--faint); }
.in-dark-inline { display: none; }
:root[data-theme="dark"] .in-dark-inline { display: block; }
:root[data-theme="dark"] .in-light-inline { display: none; }
.menu { position: relative; }
.who {
  display: inline-flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 14px; cursor: pointer; list-style: none; user-select: none;
}
.who::-webkit-details-marker { display: none; }
.who:hover, .menu[open] .who { border-color: var(--faint); }
.avatar { display: block; width: 28px; height: 28px; border-radius: 50%; flex: none; }
.chev { width: 14px; height: 14px; fill: none; stroke: var(--faint); stroke-width: 2; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 260px; padding: 6px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 18%);
}
.menu-pop form { margin: 0; }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head .avatar { width: 36px; height: 36px; }
.menu-head strong { display: block; font-size: 14px; font-weight: 600; }
.menu-head span { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer;
}
.menu-item:hover { background: var(--panel); }
.menu-item .icon-sm { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 15px; font-weight: 500; line-height: 22px;
  padding: 7px 16px; border-radius: 8px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.btn.large { font-size: 16px; padding: 12px 22px; }
.btn.primary { background: var(--blue); color: #ffffff; }
.btn.primary:hover { background: var(--blue-hover); }
.btn.outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn.outline:hover { border-color: var(--faint); }
.btn.quiet { background: transparent; color: var(--text); }
.btn.quiet:hover { background: var(--panel); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* The frame: one column with hairline sides, sections stacked with hairlines between. */
.frame { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.band { padding: 72px 64px; border-bottom: 1px solid var(--line); }
h1 {
  text-wrap: balance; margin: 0 0 24px; font-size: clamp(40px, 6vw, 72px); line-height: 1.02;
  font-weight: 600; letter-spacing: -0.03em;
}
h2 { text-wrap: balance; margin: 0 0 16px; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }

.hero { padding-top: 96px; padding-bottom: 56px; text-align: center; }
.host-sep { width: 1px; height: 12px; background: var(--line); }
.host {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 28px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 999px; font-family: var(--font-mono); font-size: 13px; color: var(--muted);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.scribble { position: relative; display: inline-block; white-space: nowrap; }
.scribble-line {
  position: absolute; left: -2%; bottom: -0.16em; width: 104%; height: 0.32em; overflow: visible; pointer-events: none;
}
.scribble-line path {
  fill: none; stroke: var(--accent); stroke-width: 3.2px; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke; stroke-dasharray: 2000; stroke-dashoffset: 0;
  animation: scribble 900ms 450ms cubic-bezier(.4, 0, .2, 1) both;
}
.scribble-line .grain { stroke-width: 1.4px; opacity: 0.45; animation-delay: 650ms; }
/* Non-scaling strokes dash in screen pixels: 2000 outlasts any underline. */
@keyframes scribble { from { stroke-dashoffset: 2000; } }
.lead { text-wrap: pretty; margin: 0 auto 36px; max-width: 34em; font-size: 19px; line-height: 1.6; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* The clickable Collab window. */
.show { padding-top: 48px; background: var(--panel); }
.view-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tabs {
  display: flex; width: max-content; max-width: 100%; margin: 0 auto 24px; padding: 4px; gap: 2px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow-x: auto;
}
.tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 6px 14px; border-radius: 7px; font-size: 14px; color: var(--muted); cursor: pointer;
  user-select: none; white-space: nowrap; transition: background-color 120ms ease, color 120ms ease;
}
.tab:hover { color: var(--text); }
.window {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--chrome);
}
.window-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.window-bar span { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 0.5px rgb(0 0 0 / 22%); }
/* macOS window controls, in their real colours: the one place the page
   uses colour outside blue and black. */
.window-bar span:nth-child(1) { background: #ff5f57; }
.window-bar span:nth-child(2) { background: #febc2e; }
.window-bar span:nth-child(3) { background: #28c840; }
.window-bar em { margin-left: 8px; font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.screen { position: relative; }
.shot img { display: block; width: 100%; height: auto; }
.in-dark { display: none !important; }
:root[data-theme="dark"] .in-dark { display: block !important; }
:root[data-theme="dark"] .in-light { display: none !important; }
.view { display: none; }
.hot { position: absolute; border-radius: 6px; cursor: pointer; transition: background-color 120ms ease; }
/* Hover tints the entry the way Collab's own sidebar does; the open view's
   entry is already drawn selected in its screenshot, so it gets no tint. */
.hot:hover { background: rgb(255 255 255 / 6%); }
:root[data-theme="light"] .hot:hover { background: rgb(0 0 0 / 5%); }
#view-frames:checked ~ .window .hot-frames:hover,
#view-hub:checked ~ .window .hot-hub:hover,
#view-hub-usage:checked ~ .window .hot-hub-usage:hover { background: none; }
.hot-tip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#view-chat:checked ~ .window .view-chat,
#view-frames:checked ~ .window .view-frames,
#view-hub:checked ~ .window .view-hub,
#view-hub-usage:checked ~ .window .view-hub-usage { display: block; }
#view-chat:checked ~ .tabs .tab-chat,
#view-frames:checked ~ .tabs .tab-frames,
#view-hub:checked ~ .tabs .tab-hub,
#view-hub-usage:checked ~ .tabs .tab-hub-usage { background: var(--blue); color: #ffffff; }
#view-chat:focus-visible ~ .tabs .tab-chat,
#view-frames:focus-visible ~ .tabs .tab-frames,
#view-hub:focus-visible ~ .tabs .tab-hub,
#view-hub-usage:focus-visible ~ .tabs .tab-hub-usage { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The chat replica: Collab's own chat screen, in its own colours. */
.app {
  --app-bg: #ffffff; --app-side: #fafafa; --app-line: #e4e4e7; --app-text: #09090b; --app-muted: #71717a;
  --app-soft: #f4f4f5; --app-active: #2952e3;
  aspect-ratio: 16 / 10; grid-template-columns: 18% minmax(0, 1fr) 24%;
  background: var(--app-bg); color: var(--app-text); font-size: 13px; text-align: left;
}
:root[data-theme="dark"] .app {
    --app-bg: #0a0a0a; --app-side: #111111; --app-line: #262626; --app-text: #f4f4f5; --app-muted: #a1a1aa;
    --app-soft: #1c1c1c;
}
#view-chat:checked ~ .window .view-chat { display: grid; }
#view-chat:checked ~ .window .hot { display: none; }
.app-side {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 8px; min-height: 0;
  background: var(--app-side); border-right: 1px solid var(--app-line);
}
.app-logo { display: flex; align-items: center; gap: 8px; padding: 2px 8px 12px; font-weight: 600; font-size: 14px; }
.app-side hr { width: 100%; border: 0; border-top: 1px solid var(--app-line); margin: 6px 0; }
.side-item, .side-sub, .side-foot {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; cursor: pointer;
}
.side-item:hover { background: var(--app-soft); }
.side-item.active { background: var(--app-active); color: #ffffff; }
.side-sub { padding-left: 22px; color: var(--app-muted); cursor: default; }
.side-hist {
  margin-left: 22px; padding: 6px 8px; border-left: 1px solid var(--app-line); color: var(--app-muted);
  font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-foot { color: var(--app-muted); cursor: default; }
.side-foot:first-of-type { margin-top: auto; }
.app-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.app-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--app-line);
}
.hub-badge { padding: 2px 8px; border-radius: 999px; background: var(--app-active); color: #ffffff; font-size: 11px; font-weight: 600; }
.head-model { font-weight: 600; white-space: nowrap; }
.head-title { min-width: 0; padding-left: 10px; border-left: 1px solid var(--app-line); color: var(--app-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-actions { display: flex; gap: 6px; margin-left: auto; }
.ghost-btn, .new-btn {
  padding: 5px 10px; border-radius: 7px; border: 1px solid var(--app-line); font: inherit; font-size: 12px;
  background: transparent; color: var(--app-text); white-space: nowrap;
}
.new-btn { background: var(--app-text); color: var(--app-bg); border-color: var(--app-text); cursor: pointer; }
.app-msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; }
.empty { margin: auto; display: grid; justify-items: center; gap: 12px; text-align: center; color: var(--app-muted); }
.empty p { margin: 0; }
.starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.starters button {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--app-line); background: var(--app-bg);
  color: var(--app-text); font: inherit; font-size: 12px; cursor: pointer;
}
.starters button:hover { border-color: var(--app-active); }
.msg { max-width: 80%; line-height: 1.55; white-space: pre-wrap; }
.msg.me {
  align-self: flex-end; padding: 9px 14px; border-radius: 10px; background: var(--app-soft);
  border-left: 3px solid var(--app-active);
}
.msg.ai { align-self: flex-start; }
.msg-meta { margin-bottom: 4px; font-family: var(--font-mono); font-size: 11px; color: var(--app-muted); }
.thinking { color: var(--app-muted); }
.thinking::after { content: "..."; }
.toolcall { align-self: flex-start; border: 1px solid var(--app-line); border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.toolcall summary { cursor: pointer; font-weight: 600; }
.toolbody { display: grid; gap: 2px; margin-top: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--app-muted); }
.toolbody code { color: var(--app-active); font-family: inherit; }
.msg-after { margin-top: 12px; }
/* A chart drawn into a reply: its bars grow in one after another. */
.chart {
  margin: 12px 0 0; width: min(420px, 100%); padding: 12px 14px 8px; border: 1px solid var(--app-line);
  border-radius: 10px; background: var(--app-bg); white-space: normal; animation: rise 0.4s ease both;
}
.chart-head { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 600; }
.chart-legend { display: flex; gap: 12px; font-weight: 400; color: var(--app-muted); }
.chart-key { display: inline-flex; align-items: center; gap: 5px; }
.chart-key i { width: 8px; height: 8px; border-radius: 2px; }
.chart svg { display: block; width: 100%; height: auto; margin-top: 6px; overflow: visible; }
.chart .grid { stroke: var(--app-line); stroke-dasharray: 2 3; }
.chart .base { stroke: var(--app-muted); }
.chart .axis { fill: var(--app-muted); font-size: 10px; font-family: var(--font-mono); }
.chart .num { fill: var(--app-text); font-size: 10px; font-weight: 600; font-family: var(--font-mono); animation: num-in 0.3s ease both; }
.chart .hi { fill: var(--app-active); }
.chart .lo { fill: color-mix(in srgb, var(--app-muted) 40%, transparent); }
.chart-key i.hi { background: var(--app-active); }
.chart-key i.lo { background: color-mix(in srgb, var(--app-muted) 40%, transparent); }
.chart .bar { transform-box: fill-box; transform-origin: 50% 100%; animation: col-up 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.chart .hbar { transform-box: fill-box; transform-origin: 0 50%; animation: bar-out 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes col-up { from { transform: scaleY(0); } }
@keyframes bar-out { from { transform: scaleX(0); } }
@keyframes num-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .chart, .chart .bar, .chart .hbar, .chart .num { animation: none; } }
.composer { margin: 0 14px 14px; border: 1px solid var(--app-line); border-radius: 12px; overflow: visible; }
.frame-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 10px;
  border-bottom: 1px solid var(--app-line); background: var(--app-soft); border-radius: 12px 12px 0 0;
}
.fb-label { padding: 2px 9px; border-radius: 999px; background: var(--app-active); color: #ffffff; font-size: 11px; font-weight: 600; }
.fchip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 9px; border-radius: 999px;
  border: 1px solid var(--app-line); background: var(--app-bg); font-size: 11px;
}
.fchip button {
  display: inline-grid; place-items: center; width: 24px; height: 24px; margin: -4px -2px -4px 0; border: 0;
  border-radius: 50%; background: none; color: var(--app-muted); font: inherit; font-size: 14px; cursor: pointer;
}
.fchip button:hover { background: var(--app-soft); color: var(--app-text); }
.composer textarea::placeholder { color: var(--app-muted); opacity: 1; }
.composer textarea {
  display: block; width: 100%; padding: 10px 12px; border: 0; resize: none; outline: none;
  background: transparent; color: var(--app-text); font: inherit; font-size: 13px;
}
.composer-row { display: flex; align-items: center; gap: 8px; padding: 0 10px 10px; }
.picker { position: relative; }
.model-btn, .pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 8px;
  border: 1px solid var(--app-line); background: var(--app-bg); color: var(--app-text); font: inherit; font-size: 12px;
}
.model-btn { cursor: pointer; }
.model-btn:hover { border-color: var(--app-active); }
.pill { color: var(--app-muted); white-space: nowrap; overflow: hidden; cursor: pointer; max-width: 100%; }
.pill:hover { border-color: var(--app-active); color: var(--app-text); }
.pill span { overflow: hidden; text-overflow: ellipsis; }
.conn-menu { width: 280px; }
.conn-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 7px 8px; border: 0;
  border-radius: 7px; background: transparent; color: var(--app-text); font: inherit; font-size: 13px;
  text-align: left; cursor: pointer;
}
.conn-opt:hover { background: var(--app-soft); }
.conn-opt .brand-icon { width: 18px; height: 18px; }
.conn-opt span { flex: 1; }
.conn-opt .toggle { width: 30px; height: 18px; margin: 0; background: var(--app-line); }
.conn-opt .toggle b { top: 3px; left: 3px; width: 12px; height: 12px; background: var(--app-muted); transition: left 140ms ease; }
.conn-opt[aria-checked="true"] .toggle { background: var(--app-active); }
.conn-opt[aria-checked="true"] .toggle b { left: 15px; background: #ffffff; }
.logo { width: 16px; height: 16px; flex: none; }
.logo.tile {
  display: inline-grid; place-items: center; border-radius: 4px; background: var(--app-text); color: var(--app-bg);
  font-size: 8px; font-weight: 700; letter-spacing: 0.02em;
}
:root[data-theme="dark"] .logo.mono { filter: invert(1) hue-rotate(180deg); }
.send-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: auto; border-radius: 50%;
  border: 0; background: var(--app-text); color: var(--app-bg); cursor: pointer;
}
.model-menu {
  position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 5; width: 260px; max-height: 340px; overflow-y: auto;
  padding: 6px; border-radius: 12px; border: 1px solid var(--app-line); background: var(--app-bg);
  box-shadow: 0 16px 40px rgb(0 0 0 / 28%);
}
.menu-note { margin: 6px 8px 8px; font-size: 12px; line-height: 16px; color: var(--app-muted); }
.model-group p { margin: 8px 8px 2px; font-size: 11px; font-weight: 600; color: var(--app-muted); }
.model-opt {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 8px; border: 0; border-radius: 7px;
  background: transparent; color: var(--app-text); font: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.model-opt:hover { background: var(--app-soft); }
.model-opt.on { background: var(--app-soft); box-shadow: inset 2px 0 0 var(--app-active); }
.app-frames { padding: 14px; border-left: 1px solid var(--app-line); min-height: 0; overflow-y: auto; }
.pf-title { margin: 0; font-weight: 600; font-size: 14px; }
.pf-sub { margin: 2px 0 12px; color: var(--app-muted); font-size: 12px; }
.pf {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; margin-bottom: 6px; border-radius: 8px;
  border: 1px solid var(--app-line); cursor: pointer;
}
.pf:has(input:checked) { border-color: var(--app-active); }
.pf input {
  appearance: none; display: grid; place-items: center; flex: none; width: 16px; height: 16px; margin: 0;
  border: 1.5px solid var(--app-muted); border-radius: 4px; cursor: pointer;
}
.pf input:checked { background: var(--app-active); border-color: var(--app-active); }
.pf input:checked::before {
  content: ""; width: 4px; height: 8px; margin-top: -2px;
  border: solid #ffffff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.connectors { padding-top: 40px; padding-bottom: 40px; text-align: center; }
.connectors p { margin: 0 0 28px; font-family: 'IBM Plex Mono', var(--font-mono); font-size: 14px; color: var(--muted); }
.connectors ul {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 48px;
}
.connectors li { display: inline-flex; padding: 4px; }
.strip-logo { width: 36px; height: 36px; }
:root[data-theme="dark"] .strip-logo.mono { filter: invert(1); }
.brand-icon { width: 20px; height: 20px; flex: none; }
:root[data-theme="dark"] .brand-icon.mono { filter: invert(1); }

.problem h2 { max-width: 14em; }
.pains { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 40px; border-top: 1px solid var(--line); }
.pains > div { padding: 32px 32px 4px; }
.pains > div:first-child { padding-left: 0; }
.pains > div + div { border-left: 1px solid var(--line); }
.pains h3 { display: flex; align-items: center; gap: 10px; }
.pains h3 .icon { color: var(--accent); }
.pains p { margin: 0; color: var(--muted); }

.chapter { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.chapter:nth-of-type(even) .chapter-copy { order: 2; }
.chapter-copy p { text-wrap: pretty; margin: 0 0 20px; color: var(--muted); font-size: 17px; }
.chapter-copy ul { margin: 0; padding: 0; list-style: none; }
.chapter-copy li { padding: 10px 0 10px 22px; border-top: 1px solid var(--line); position: relative; font-size: 15px; }
.chapter-copy li::before {
  content: ""; position: absolute; left: 0; top: 19px; width: 8px; height: 8px; border-radius: 2px; background: var(--blue);
}

/* Chapter illustrations: drawn in HTML, animated once as they scroll into view. */
.art {
  position: relative; border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
  padding: 32px; min-height: 340px;
}
.chip {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 13px;
  background: var(--tile); color: var(--accent); border: 1px solid var(--line);
}
.toggle { position: relative; display: block; width: 34px; height: 20px; margin-left: auto; border-radius: 999px; background: var(--line); }
.toggle b { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); }
.fcard.on .toggle { background: var(--blue); }
.fcard.on .toggle b { left: 17px; background: #ffffff; }

.art-frames { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); align-items: center; gap: 0; }
.fcards { display: grid; gap: 10px; }
.fcard {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line); font-size: 14px; font-weight: 500;
}
.fcard .icon-sm { color: var(--faint); }
.fcard.on { border-color: var(--blue); }
.fcard.on .icon-sm { color: var(--accent); }
.fflow { position: relative; height: 2px; margin: 0 8px; }
.fline { position: absolute; inset: 0; background: var(--blue); transform-origin: left; }
.fdot {
  position: absolute; top: -4px; right: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue);
}
.newchat {
  display: grid; gap: 12px; padding: 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line);
}
.nc-head { display: flex; justify-content: space-between; font-weight: 600; font-size: 15px; }
.nc-head span { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--accent); }
.nc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nc-input {
  display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 12px;
  border-radius: 10px; border: 1px solid var(--line); font-size: 13px; color: var(--faint);
}
.send { width: 22px; height: 22px; border-radius: 6px; background: var(--blue); }

.art-tools { display: grid; gap: 20px; padding: 28px; }
.stage { position: relative; aspect-ratio: 5 / 3; }
.spokes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.spokes line { stroke: var(--line); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.spokes line.live { stroke: var(--blue); stroke-dasharray: 3 4; }
.tool, .core, .ping { position: absolute; transform: translate(-50%, -50%); }
.ping { z-index: 1; } .tool { z-index: 2; } .core { z-index: 3; }
.tool {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; white-space: nowrap;
  border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; font-weight: 500;
}
.tool.live { border-color: var(--blue); }
.core {
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line); box-shadow: 0 0 0 8px var(--tile);
}
.core img { display: block; width: 40px; height: 40px; }
.ping { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); opacity: 0; }
.call {
  justify-self: center; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 10px 14px;
  border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; color: var(--muted);
}
.call-name { display: inline-flex; gap: 10px; }
.call code { font-family: var(--font-mono); color: var(--accent); }
.call .ok { color: var(--text); font-weight: 500; }
.t0 { left: 17%; top: 20%; }
.t1 { left: 83%; top: 20%; }
.t2 { left: 17%; top: 80%; }
.t3 { left: 83%; top: 80%; }
.hot { left: 0.56%; width: 16.59%; height: 3.56%; }
.hot-chat { top: 24.78%; }
.hot-frames { top: 15.78%; }
.hot-hub { top: 6.33%; }
.hot-hub-usage { top: 10.33%; }
.core, .ping { left: 50%; top: 50%; }

.boundary {
  position: relative; padding: 36px 24px 24px; border: 1.5px dashed var(--blue); border-radius: 14px;
}
.blabel {
  position: absolute; top: -11px; left: 18px; padding: 0 8px; background: var(--panel);
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
}
.htiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.htile {
  display: grid; justify-items: center; gap: 8px; padding: 18px 8px; border-radius: 10px; text-align: center;
  background: var(--bg); border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--accent);
}
.htile span { color: var(--text); }
.usage { display: grid; gap: 10px; margin-top: 22px; }
.ulabel { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.ubar { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 13px; }
.ubar i { display: block; height: 10px; border-radius: 5px; background: var(--blue); transform-origin: left; }
.ubar .b0 { width: 46%; } .ubar .b1 { width: 82%; opacity: 0.55; }

@supports (animation-timeline: view()) {
  /* One timeline per illustration: its own passage through the viewport. Each
     sequence starts once the illustration is in view and ends as it reaches
     the middle of the screen, where it is being looked at. */
  .art { view-timeline-name: --art; }
  .art * { animation-timeline: --art; animation-fill-mode: both; animation-timing-function: ease-out; }
  @keyframes knob-on { from { left: 3px; background: var(--bg); } }
  @keyframes track-on { from { background: var(--line); } }
  @keyframes edge-on { from { border-color: var(--line); } }
  @keyframes draw-x { from { transform: scaleX(0); } }
  @keyframes appear { from { opacity: 0; transform: translateY(8px); } }
  @keyframes travel {
    0% { opacity: 1; left: 50%; top: 50%; }
    50% { opacity: 1; left: 83%; top: 20%; }
    100% { opacity: 0; left: 50%; top: 50%; }
  }
  @keyframes grow { from { transform: scaleX(0); } }
  .fcard.on .toggle b { animation-name: knob-on; animation-range: cover 28% cover 34%; }
  .fcard.on .toggle { animation-name: track-on; animation-range: cover 28% cover 34%; }
  .fcard.on { animation-name: edge-on; animation-range: cover 28% cover 34%; }
  .fcard.on.s2 .toggle b, .fcard.on.s2 .toggle, .fcard.on.s2 { animation-range: cover 34% cover 40%; }
  .fline { animation-name: draw-x; animation-range: cover 40% cover 45%; }
  .fdot, .nc-chips .c1, .nc-head span { animation-name: appear; animation-range: cover 44% cover 48%; }
  .nc-chips .c2 { animation-name: appear; animation-range: cover 46% cover 50%; }
  .ping { animation-name: travel; animation-range: cover 28% cover 50%; animation-timing-function: linear; }
  .htile { animation-name: appear; animation-range: cover 28% cover 36%; }
  .h1 { animation-range: cover 32% cover 40%; } .h2 { animation-range: cover 36% cover 44%; }
  .ubar i { animation-name: grow; animation-range: cover 40% cover 50%; }
}

.shell { flex: 1; display: flex; width: 100%; }
.topbar-in.wide { max-width: none; padding: 14px 28px; }
/* The account dashboard's sidebar, in the admin panel's shape. Folded, it
   keeps only its icons; the choice is remembered in this browser. */
.dash { flex: 1; display: grid; grid-template-columns: 15rem minmax(0, 1fr); transition: grid-template-columns 0.2s ease; }
.dash-nav {
  position: sticky; top: 65px; align-self: start; height: calc(100vh - 65px);
  display: flex; flex-direction: column; gap: 1.75rem; padding: 1.5rem 1rem; border-right: 1px solid var(--line);
}
.dash-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.dash-nav ul + ul { padding-top: 1.75rem; border-top: 1px solid var(--line); margin-top: -0.875rem; }
.dash-link {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.6rem; border-radius: 6px;
  color: var(--text); font-size: 0.9rem; text-decoration: none; white-space: nowrap; overflow: hidden;
}
.dash-link svg { color: var(--muted); }
.dash-link:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.dash-link:hover svg { color: var(--text); }
.dash-link[aria-current="page"] { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 600; }
.dash-link[aria-current="page"] svg { color: var(--accent); }
.dash-link .mark-img, .dash-link img { width: 16px; height: 16px; flex: none; }
.dash-fold {
  margin-top: auto; align-self: flex-start; display: inline-grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer;
}
.dash-fold:hover { color: var(--text); border-color: var(--muted); }
:root[data-sidebar="folded"] .dash { grid-template-columns: 4.25rem minmax(0, 1fr); }
:root[data-sidebar="folded"] .dash-nav { padding-inline: 0.75rem; }
:root[data-sidebar="folded"] .dash-link { justify-content: center; padding-inline: 0; }
:root[data-sidebar="folded"] .dash-link span { display: none; }
:root[data-sidebar="folded"] .dash-fold { align-self: center; }
:root[data-sidebar="folded"] .dash-fold svg { transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) { .dash { transition: none; } }
.dash-main { min-width: 0; max-width: 64rem; padding: 2.5rem 2.5rem 4rem; }
.dash-main h1 { font-size: 32px; margin: 0 0 24px; }
.acct-head { display: flex; align-items: center; gap: 20px; margin-bottom: 40px; }
.acct-head .avatar { width: 64px; height: 64px; }
.acct-head h1 { margin: 0; font-size: 36px; }
.acct-head p { margin: 4px 0 0; color: var(--muted); }
.acct-list { margin: 0 0 40px; max-width: 640px; border-top: 1px solid var(--line); }
.acct-list div {
  display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.acct-list dt { color: var(--muted); }
.acct-list dd { margin: 0; overflow-wrap: anywhere; }
.mono { font-family: var(--font-mono); font-size: 14px; }
.acct-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.acct-actions form { margin: 0; }

.ways { background: var(--panel); }
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; margin-top: 32px; }
.door {
  display: flex; align-items: center; gap: 16px; min-height: 76px; padding: 18px 4px;
  border-top: 1px solid var(--line); text-decoration: none; color: var(--accent);
}
.door .mark-img { transform: scale(1.18); }
.door-text { display: grid; gap: 2px; flex: 1; }
.door-text strong { color: var(--text); font-size: 17px; font-weight: 600; }
.door-text span { color: var(--muted); font-size: 15px; }
.door-arrow { color: var(--faint); transition: transform 160ms cubic-bezier(.2, .7, .2, 1), color 160ms ease; }
.door:hover .door-arrow { color: var(--accent); transform: translateX(4px); }

.closing { text-align: center; padding-top: 96px; padding-bottom: 96px; }
.closing p { margin: 0 auto 28px; max-width: 30em; color: var(--muted); font-size: 18px; }

.footer { background: var(--bg); color: var(--muted); font-size: 15px; border-top: 1px solid var(--line); }
.foot-in {
  display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 48px;
  max-width: 1240px; margin: 0 auto; padding: 72px 64px 56px;
}
.foot-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 18px; text-decoration: none; }
.foot-brand p { margin: 16px 0 24px; max-width: 22em; line-height: 1.6; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.social {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--muted); transition: border-color 140ms ease, color 140ms ease;
}
.social svg { width: 18px; height: 18px; }
.social:hover { border-color: var(--faint); color: var(--text); }
.foot-col h2 { margin: 6px 0 18px; font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--text); }
.foot-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.foot-col a { display: inline-block; padding: 6px 0; color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }
.foot-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  max-width: 1240px; margin: 0 auto; padding: 24px 64px 32px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--faint);
}
.foot-host { font-family: var(--font-mono); font-size: 13px; }

/* Motion: once, on load. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero > *, .showcase { animation: rise 600ms cubic-bezier(.2, .7, .2, 1) both; }
.hero > :nth-child(2) { animation-delay: 60ms; }
.hero > :nth-child(3) { animation-delay: 120ms; }
.hero > :nth-child(4) { animation-delay: 180ms; }
.hero > :nth-child(5) { animation-delay: 240ms; }
.showcase { animation-delay: 320ms; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 960px) {
  .foot-in { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 56px 32px 40px; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-base { padding: 24px 32px 32px; }
  .app-frames { display: none; }
  .app { grid-template-columns: 26% minmax(0, 1fr); }
  .art-frames { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .fflow { display: none; }
  .nav { display: none; }
  .actions { margin-left: auto; }
  .band { padding: 56px 32px; }
  .chapter { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .chapter:nth-of-type(even) .chapter-copy { order: 0; }
  .pains { grid-template-columns: minmax(0, 1fr); }
  .pains > div, .pains > div + div { padding: 22px 0 6px; border-left: 0; border-top: 1px solid var(--line); }
  .pains > div:first-child { border-top: 0; }
}
@media (max-width: 560px) {
  .topbar-in { gap: 12px; padding: 12px 16px; }
  .brand span, .who-name { display: none; }
  .theme-toggle { width: 44px; height: 44px; }
  .acct-list div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .dash { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .topbar-in.wide { padding: 12px 16px; }
  .dash, :root[data-sidebar="folded"] .dash { grid-template-columns: minmax(0, 1fr); }
  .dash-nav, :root[data-sidebar="folded"] .dash-nav {
    position: static; height: auto; flex-direction: row; gap: 6px; padding: 8px 16px;
    overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line);
  }
  .dash-nav ul { flex-direction: row; gap: 6px; }
  .dash-nav ul + ul { padding: 0 0 0 6px; margin: 0; border-top: 0; border-left: 1px solid var(--line); }
  :root[data-sidebar="folded"] .dash-link { padding-inline: 0.6rem; }
  :root[data-sidebar="folded"] .dash-link span { display: inline; }
  .dash-fold { display: none; }
  .dash-main { padding: 24px 16px 64px; }
  .dash-link { min-height: 44px; }
  .frame { border: 0; }
  .band { padding: 44px 16px; }
  .hero { padding-top: 56px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .lead { font-size: 17px; }
  .hot { display: none; }
  .tabs { width: 100%; }
  .tab { flex: 1; padding: 10px 6px; text-align: center; }
  .tab .wide { display: none; }
  .send-btn { width: 40px; height: 40px; }
  .model-btn, .new-btn { min-height: 36px; }
  .foot-in { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; padding: 48px 16px 32px; }
  .foot-col a { padding: 10px 0; }
  .foot-base { padding: 20px 16px 28px; }
  .social { width: 44px; height: 44px; }
  .brand { min-height: 44px; }
  .menu-item { min-height: 44px; }
  .doors { grid-template-columns: minmax(0, 1fr); }
  .app { aspect-ratio: auto; height: 560px; grid-template-columns: minmax(0, 1fr); }
  .app-side, .app-frames, .head-actions .ghost-btn, .pill { display: none; }
  .art { padding: 20px; }
  .tool span { display: none; }
  .htile { padding: 14px 6px; font-size: 12px; }
}
