/* afile.sh in amessage.sh's look, so the two read as one family: the night bar, the vault on the
   left, a README column on the right in ruled sections, square corners, and the same type (a
   display face for headings, Inter for words, Plex Mono for code and captions). The sizes and
   colours are measured from amessage.sh. Breakpoints: 640, 768, 1024, 1280, 1536. */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/bricolage-grotesque.woff2) format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/bricolage-grotesque.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/inter.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/inter.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"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-500.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --font-display: "Bricolage Grotesque", Inter, sans-serif;
  --font-text: Inter, system-ui, sans-serif;
  --font-code: "IBM Plex Mono", ui-monospace, monospace;
  --foreground: #262626;
  --muted: #656565;
  --slate: #4a5068;
  --ink: #111111;
  --light: #f4c443;
  --night: #18224d;
  --night-deep: #121a3d;
  --night-line: #26336b;
  --pale: #aab6e6;
  --blue: #2b3f9e;
  --tint: #f4f6fc;
  --rule: #d5dbf0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
body {
  display: flex; flex-direction: column; min-height: 100vh;
  background: #fff; color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", ui-sans-serif, sans-serif;
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg, canvas { display: block; }
button { font: inherit; color: inherit; background: none; cursor: pointer; text-align: inherit; }
ul { list-style: none; }
a { color: var(--blue); text-underline-offset: 2px; text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--font-code); }
[hidden] { display: none !important; }
:where(a, button, summary, [tabindex]):focus-visible { outline: 2px solid var(--foreground); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.defs { position: absolute; }
.unseen { opacity: 0; }

.skip { position: fixed; top: 8px; left: 8px; z-index: 50; transform: translateY(calc(-100% - 1rem)); background: #fff; color: var(--ink); padding: 8px 16px; }
.skip:focus { transform: none; }

.frame { width: 100%; flex: 1 0 auto; display: flex; flex-direction: column; }
.site-main { flex: 1; font-family: var(--font-text); }
.site-main :is(h1, h2, h3) { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.035em; color: var(--ink); }
.site-main h3 { letter-spacing: -0.02em; }
:is(.hero, .sections, .missing) a:not([class]) { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* The lockup: the mark a little taller than the name, standing on its baseline. */
.lockup { display: inline-flex; align-items: center; font-weight: 600; line-height: 1; letter-spacing: -0.035em; }
.lockup .mark { flex: none; }
.lockup-18 { font-size: 18px; gap: 5.14px; }
.lockup-18 .mark { width: 24.3px; height: 24.3px; }
.lockup-30 { font-size: 30px; gap: 8.57px; }
.lockup-30 .mark { width: 40.5px; height: 40.5px; }
.lockup-40 { font-size: 40px; gap: 11.43px; }
.lockup-40 .mark { width: 54px; height: 54px; }

/* The night bar. */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--night); color: #fff; font-family: var(--font-text); }
.site-header .bar { display: grid; grid-template-columns: 1fr auto; }
.site-name { display: flex; height: 45px; align-items: center; padding: 0 20px; color: #fff; }
.site-name:hover { text-decoration: none; }
.site-header a:focus-visible { outline-color: #fff; outline-offset: -3px; }
.header-links { display: contents; }
.primary { grid-column: span 2; grid-row-start: 2; display: flex; height: 45px; align-items: stretch; border-bottom: 1px solid #e5e5e5; border-top: 1px solid var(--night-line); font-size: 14px; line-height: 1.5; }
.primary a { flex: 1; display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--night-line); padding: 0 16px; color: #fff; transition: background-color 150ms, box-shadow 150ms; }
.primary a:hover { background: var(--night-deep); text-decoration: none; }
.primary a[aria-current="page"] { background: var(--night-deep); box-shadow: inset 0 -2px 0 #fff; }
.action { grid-column-start: 2; grid-row-start: 1; display: flex; align-items: center; justify-content: center; white-space: nowrap; background: #fff; padding: 0 16px; font-weight: 500; font-size: 14px; line-height: 1.5; color: var(--night); }
.action:hover { text-decoration: none; opacity: 0.9; }
@media (min-width: 640px) {
  .site-name { padding: 0 80px; }
  .action { padding: 0 20px; }
}
@media (min-width: 768px) {
  .site-header .bar { display: flex; align-items: stretch; }
  .site-name { padding: 0 20px; }
  .header-links { display: flex; margin-left: auto; }
  .primary { border-top: 0; }
  .primary a { flex: none; }
}
@media (min-width: 1024px) {
  .site-name { width: max(500px, 40%); padding: 0 40px; flex: none; }
  .header-links { margin-left: 0; flex: 1; }
  .primary { flex: 5; }
  .primary a { flex: 1; }
  .action { flex: 1; }
}
@media (min-width: 1536px) { .site-name { padding: 0 56px; } }

/* The home page: on a wide window the vault on the left, the words scrolling past on the right. */
.home { display: flex; flex-direction: column; font-size: 16px; line-height: 1.6; }
.hero { order: 1; min-width: 0; padding: 36px 20px 24px; }
.vault-place { order: 2; }
.sections { order: 3; min-width: 0; padding: 0 20px; }
.col { max-width: 800px; }
@media (min-width: 640px) {
  .hero { padding: 48px 80px 32px; }
  .sections { padding: 0 80px; }
}
@media (min-width: 1024px) {
  .home { display: grid; grid-template-columns: minmax(500px, 40%) 1fr; grid-template-rows: auto 1fr; align-items: start; }
  .hero { grid-column-start: 2; grid-row-start: 1; padding: 36px 32px 16px; }
  .vault-place { grid-column-start: 1; grid-row: 1 / span 2; align-self: stretch; }
  .sections { grid-column-start: 2; grid-row-start: 2; padding: 0 32px; }
}

.readme { display: flex; align-items: center; gap: 12px; font-family: var(--font-code); font-size: 14px; color: var(--ink); }
.readme .rule, .heading > span { height: 1px; flex: 1; background: var(--rule); }
.hero h1 { margin-top: 24px; font-size: 32px; line-height: 1.08; }
.intro { margin-top: 16px; font-size: 15px; line-height: 1.6; color: rgb(38 38 38 / 0.8); }
@media (min-width: 640px) {
  .readme { font-size: 15px; }
  .hero h1 { font-size: 44px; }
}

/* The line to give an agent, in tabs by how it connects. */
.hero-line { margin-top: 24px; }
/* The pale border runs round the tabs and the line; the note sits under them, outside it. */
.hero-tabs { display: flex; border: 1px solid var(--rule); font-family: var(--font-code); font-size: 15px; }
.hero-tabs button { border-right: 1px solid var(--rule); padding: 10px 16px; color: var(--slate); line-height: 24px; }
.hero-tabs button:hover { color: var(--ink); }
.hero-tabs button[aria-selected="true"] { background: var(--night); color: #fff; }
.hero-code { display: flex; align-items: flex-start; gap: 16px; border: 1px solid var(--rule); border-top: 0; background: var(--night); padding: 18px; font-family: var(--font-code); font-size: 15px; line-height: 1.6; }
.hero-code code { min-width: 0; flex: 1; color: #fff; overflow-wrap: anywhere; }
.hero-code button { color: var(--pale); }
.hero-code button:hover { color: #fff; }
.hero-note { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--slate); }
.hero-note code { font-size: 13px; color: var(--ink); }
@media (min-width: 640px) { .hero-code { padding: 20px 22px; font-size: 16px; } }

/* The vault's column: a canvas the animation draws, a speech bubble, and the caption. */
.vault-column { position: relative; display: flex; flex-direction: column; background: var(--night); color: #fff; }
.vault-stage { position: relative; }
.vault-frame { position: relative; height: 420px; overflow: hidden; background: var(--night); }
.vault-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
@media (min-width: 640px) { .vault-frame { height: 500px; } }
@media (min-width: 1024px) {
  .vault-column { position: sticky; top: 44px; height: calc(100vh - 2.75rem); height: calc(100svh - 2.75rem); }
  .vault-stage { flex: 1; }
  .vault-frame { position: absolute; inset: 0; height: 100%; }
}
.vault-caption { pointer-events: none; position: absolute; right: 20px; bottom: 20px; left: 20px; }
@media (min-width: 640px) { .vault-caption { left: 80px; } }
@media (min-width: 1024px) { .vault-caption { right: 40px; bottom: 24px; left: 40px; } }
@media (min-width: 1536px) { .vault-caption { left: 56px; } }
.vault-eyebrow { font-family: var(--font-code); font-size: 12px; line-height: 1.5; text-transform: uppercase; letter-spacing: 0.08em; color: #e3e8fb; text-shadow: 0 1px 6px #0c1230; }
.vault-said { margin-top: 4px; min-height: 2.8em; font-weight: 500; font-size: 18px; line-height: 1.4; color: #fff; text-shadow: 0 1px 10px #0c1230; }
@media (min-width: 640px) { .vault-said { font-size: 20px; } }
.bubble { pointer-events: none; position: absolute; top: 0; left: 0; max-width: 240px; background: #fff; padding: 10px 14px; font-size: 15px; line-height: 1.375; color: var(--ink); opacity: 0; box-shadow: 0 6px 20px rgb(12 18 48 / 0.35); transition: opacity 300ms; }
.bubble::after { content: ""; position: absolute; bottom: -6px; left: var(--tail, 50%); width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg); background: #fff; }
.bubble [data-name] { font-family: var(--font-code); font-size: 11px; line-height: 1.5; text-transform: uppercase; letter-spacing: 0.06em; color: #3d4d92; }
.bubble-text { margin-top: 2px; }
.vault-pause { position: absolute; top: 12px; right: 12px; z-index: 20; min-height: 36px; background: var(--night); padding: 0 12px; font-size: 14px; color: #fff; }
.vault-pause:hover { text-decoration: underline; }
.vault-pause:focus-visible { outline-color: #fff; }
@media (prefers-reduced-motion: reduce) { .vault-pause { display: none; } }
.vault-links { display: none; height: 40px; user-select: none; align-items: center; justify-content: space-between; gap: 12px; padding: 0 40px; font-family: var(--font-code); font-size: 11px; color: rgb(227 232 251 / 0.5); }
.vault-links div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.vault-links div span { color: rgb(227 232 251 / 0.2); }
.vault-links a { color: inherit; transition: color 150ms; }
.vault-links a:hover { color: rgb(227 232 251 / 0.85); text-decoration: none; }
.vault-links .github svg { width: 14px; height: 14px; }
@media (min-width: 1024px) { .vault-links { display: flex; } }
@media (min-width: 1536px) { .vault-links { padding: 0 56px; } }

/* The sections: a heading with a thin line to the edge, and one line under it. */
.sections section { padding: 32px 0; }
@media (min-width: 640px) { .sections section { padding: 36px 0; } }
.heading { display: flex; align-items: center; gap: 16px; }
.heading h2 { flex: none; font-size: 18px; line-height: 1.6; }
.heading-line { margin-top: 6px; max-width: 40rem; font-size: 15px; line-height: 1.6; color: var(--muted); }
.heading-line code { font-size: 13.5px; color: var(--ink); }

/* What aFile does, in nine ruled cells. */
.features { margin-top: 24px; display: grid; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.features > div { display: flex; min-width: 0; flex-direction: column; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 20px; }
.features .num { font-family: var(--font-code); font-size: 11px; line-height: 1.6; color: var(--muted); }
.features h3 { margin-top: 6px; font-size: 13px; line-height: 1.6; }
.features h3 + p { margin: 2px 0 12px; flex: 1; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.features .pic { display: flex; min-height: 36px; align-items: flex-end; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--rule); background: #fff; padding: 4px 8px; font-family: var(--font-code); font-size: 11px; line-height: 1.5; color: var(--ink); }

/* The example chats. */
.examples { margin-top: 24px; }
.examples-tabs { margin-bottom: 24px; display: flex; gap: 24px; overflow-x: auto; border-bottom: 1px solid var(--rule); }
.examples-tab { flex: none; border-bottom: 2px solid transparent; padding-bottom: 12px; font-size: 16px; line-height: 1.5; color: var(--muted); }
.examples-tab:hover { color: var(--foreground); }
.examples-tab[aria-selected="true"] { border-color: var(--blue); color: var(--blue); }
.chat-pair { display: grid; gap: 20px; }
@media (min-width: 768px) { .chat-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chat-one { margin: 0 auto; max-width: 32rem; }
.chat-window { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--rule); background: #fff; }
.chat-top { display: flex; height: 44px; align-items: center; justify-content: space-between; background: var(--night); padding: 0 16px; font-family: var(--font-code); font-size: 13px; }
.chat-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
.chat-status { display: flex; align-items: center; gap: 6px; color: var(--pale); }
.chat-status-dot { width: 6px; height: 6px; background: var(--light); }
.chat-lines { display: flex; height: 400px; flex-direction: column; justify-content: flex-end; gap: 12px; overflow: hidden; padding: 16px; }
@media (min-width: 640px) { .chat-lines { height: 440px; } }
.chat-person { margin-left: auto; max-width: 85%; background: var(--night); padding: 8px 14px; font-size: 15px; line-height: 1.375; color: #fff; }
.chat-agent { max-width: 92%; font-size: 15px; line-height: 1.375; color: var(--foreground); }
.chat-agent > * + * { margin-top: 8px; }
.chat-link { border: 1px solid var(--rule); background: var(--tint); padding: 10px 14px; }
.chat-link-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.chat-link-dot { width: 8px; height: 8px; background: var(--light); }
.chat-link-url { margin-top: 4px; font-family: var(--font-code); font-size: 13px; color: var(--ink); }
.chat-in { animation: example-in 250ms ease-out both; }
@keyframes example-in { from { opacity: 0; transform: translateY(4px); } }
.chat-typing { display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; }
.chat-typing span { width: 6px; height: 6px; border-radius: 2px; background: var(--muted); animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.chat-typing span:nth-child(2) { animation-delay: 160ms; }
.chat-typing span:nth-child(3) { animation-delay: 320ms; }
@keyframes pulse { 50% { opacity: 0.5; } }
.chat-bottom { border-top: 1px solid var(--rule); padding: 12px; }
.chat-field { display: flex; height: 68px; align-items: flex-end; gap: 12px; border: 1px solid var(--rule); padding: 10px 12px; }
.chat-draft { display: flex; max-height: 100%; min-width: 0; flex: 1; flex-direction: column; justify-content: flex-end; overflow: hidden; font-size: 15px; line-height: 1.375; color: var(--muted); }
.chat-draft.is-typing { color: var(--foreground); }
.chat-caret { margin-left: 1px; display: inline-block; height: 16px; width: 1px; transform: translateY(2px); background: var(--foreground); animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.chat-send { display: flex; width: 28px; height: 28px; flex: none; align-items: center; justify-content: center; background: var(--tint); font-size: 14px; color: var(--muted); }
.chat-send.is-ready { background: var(--night); color: #fff; }
.examples-play { margin-top: 8px; display: inline-flex; min-height: 36px; align-items: center; font-size: 14px; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .chat-in, .chat-typing span, .chat-caret { animation: none; } }

/* The CLI in steps: the steps down the side as tabs, each with its line and its commands. */
.steps { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--rule); }
.steps-tabs { display: flex; border-bottom: 1px solid var(--rule); }
.steps-tabs button { flex: 1; padding: 12px 8px; font-family: var(--font-code); font-size: 11px; line-height: 1.5; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.steps-tabs button:not(:last-child) { border-right: 1px solid var(--rule); }
.steps-tabs button:hover { color: var(--ink); }
.steps-tabs button[aria-selected="true"] { background: #fafafa; color: var(--ink); }
.steps [role="tabpanel"] { min-width: 0; }
.steps [role="tabpanel"] p { border-bottom: 1px solid var(--rule); padding: 12px 16px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.steps pre { overflow-x: auto; background: #fafafa; padding: 16px; font-size: 12.5px; line-height: 1.7; color: var(--ink); }
@media (min-width: 640px) { .steps-tabs button { padding: 12px 16px; } }
@media (min-width: 768px) {
  .steps { grid-template-columns: 13rem minmax(0, 1fr); }
  .steps-tabs { flex-direction: column; border-bottom: 0; border-right: 1px solid var(--rule); }
  .steps-tabs button { flex: none; text-align: left; }
  .steps-tabs button:not(:last-child) { border-right: 0; border-bottom: 1px solid var(--rule); }
}

/* The agents, in ruled cells: each opens its setup steps in the docs. */
.agents { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
/* Three across at most, so each command shows whole. */
@media (min-width: 640px) { .agents { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.agents li { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.agents a { display: flex; width: 100%; height: 100%; align-items: center; gap: 12px; padding: 14px 16px; color: var(--ink); }
.agents a:hover { background: #fafafa; text-decoration: none; }
.agent-icon { display: flex; width: 32px; height: 32px; flex: none; align-items: center; justify-content: center; border: 1px solid var(--rule); background: #fff; font-family: var(--font-code); font-size: 13px; color: var(--ink); }
.agent-icon img { width: 18px; height: 18px; object-fit: contain; }
.agent-name { min-width: 0; }
.agent-name > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-name > span:first-child { font-weight: 500; font-size: 14px; line-height: 1.5; }
.agent-name > span:last-child { margin-top: 2px; font-family: var(--font-code); font-size: 10px; line-height: 1.5; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

/* The questions people ask first. */
.faq { margin-top: 20px; }
.faq li { border-bottom: 1px solid var(--rule); }
.faq li:first-child { border-top: 1px solid var(--rule); }
.faq summary { display: flex; min-height: 48px; cursor: pointer; list-style: none; align-items: center; gap: 12px; font-size: 15px; line-height: 1.6; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq .sign { width: 20px; flex: none; text-align: center; font-size: 16px; line-height: 1; color: var(--muted); }
.faq .sign::before { content: "+"; }
.faq details[open] .sign::before { content: "−"; }
.faq details p { padding: 0 0 16px 32px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.faq code { font-size: 13.5px; color: var(--ink); }

/* The night band under the page; on a wide window the vault's column carries these links. */
.site-footer { background: var(--night); color: #fff; font-family: var(--font-text); }
.footer-grid { margin: 0 auto; display: grid; max-width: 1280px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; border-top: 1px solid var(--night-line); padding: 40px 20px 32px; }
.footer-name { grid-column: span 2; align-self: start; color: #fff; }
.footer-name:hover { text-decoration: none; }
.footer-name .lockup-40 { display: none; }
.site-footer nav p { margin-bottom: 10px; font-size: 14px; color: var(--pale); }
.site-footer nav a { font-size: 15px; line-height: 32px; color: #fff; }
.footer-copy { grid-column: 1 / -1; font-size: 14px; color: var(--pale); }
@media (min-width: 640px) { .footer-grid { padding-left: 80px; padding-right: 80px; } }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 48px; }
  .footer-name { grid-column: span 1; }
  .footer-name .lockup-30 { display: none; }
  .footer-name .lockup-40 { display: inline-flex; }
  .footer-copy { margin-top: 24px; }
}
@media (min-width: 1024px) { .site-footer:not(.site-footer-always) { display: none; } }

/* The page for an address that isn't here. */
.missing { padding: 72px 20px 112px; max-width: 760px; }
.missing h1 { font-size: clamp(2rem, 4.5vw, 2.75rem); line-height: 1.08; }
.missing p { margin-top: 16px; font-size: 17px; line-height: 1.65; color: var(--slate); }
@media (min-width: 640px) { .missing { padding: 72px 80px 112px; } }
