/* astroagent site. Layout: a centred hero with the replayed agent session, the gains grid,
   how it works (the approval loop, the twelve stages, tips), install. */
:root {
  --sky: #0B1220; --surface: #111B2C; --surface2: #16233A; --line: #24344D;
  --text: #E9EEF4; --muted: #93A3B6; --oiii: #14A3A0; --oiii-text: #3CC6C2; --ha: #E5484D;
  --font-display: "Sora", "Avenir Next", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --sky: #F4F6F9; --surface: #FFFFFF; --surface2: #EEF2F6; --line: #D8E0EA;
  --text: #0E1A2B; --muted: #536173; --oiii: #14A3A0; --oiii-text: #0B7C79; --ha: #C9363B;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .cursor { animation: none !important; } }
body { margin: 0; background: var(--sky); color: var(--text); font: 400 17px/1.6 var(--font-body); }
a { color: var(--oiii-text); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--oiii); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; }
h3 { font-size: 19px; }
.sub { color: var(--muted); max-width: 62ch; margin: 12px 0 0; }
code, pre { font-family: var(--font-mono); }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--sky) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 20px var(--font-display); letter-spacing: -0.01em; }
.mark { width: 30px; height: 30px; }
nav { display: flex; gap: 22px; margin-left: 12px; }
nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
nav a:hover { color: var(--text); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.langs { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.langs a { padding: 4px 9px; font: 500 13px var(--font-mono); color: var(--muted); text-decoration: none; }
.langs a[aria-current] { background: var(--surface2); color: var(--text); }
.theme, .gh { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.theme svg, .gh svg { width: 16px; height: 16px; fill: currentColor; }
.theme:hover, .gh:hover { color: var(--text); }

/* hero */
.hero { position: relative; padding: 76px 0 72px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(1px 1px at 12% 18%, var(--muted) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 12%, var(--muted) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 46%, var(--oiii-text) 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 62%, var(--muted) 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 28%, var(--muted) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 6% 40%, var(--ha) 50%, transparent 51%),
    radial-gradient(60% 50% at 50% 70%, color-mix(in srgb, var(--oiii) 16%, transparent), transparent 70%);
  opacity: .7; }
.hero .wrap { position: relative; }
.hero-text { text-align: center; max-width: 780px; margin: 0 auto; }
.kicker { display: inline-block; font: 500 13px var(--font-mono); color: var(--oiii-text); margin: 0 0 20px; padding: 5px 12px;
  border: 1px solid color-mix(in srgb, var(--oiii) 45%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--oiii) 10%, transparent); }
h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.04; letter-spacing: -0.025em; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 62ch; margin: 22px auto 30px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; transition: border-color .2s, transform .2s; }
.btn.primary { background: var(--oiii); border-color: var(--oiii); color: #06201F; }
.btn:hover { border-color: var(--oiii); transform: translateY(-1px); }
.stage { max-width: 920px; margin: 52px auto 0; }
.stage .cc { box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--oiii) 45%, transparent), 0 0 0 1px color-mix(in srgb, var(--oiii) 18%, transparent); }
.caption { text-align: center; font-size: 13px; color: var(--muted); margin: 14px 0 0; }

/* sections */
.block { padding: 96px 0; }
.block.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { font: 500 13px var(--font-mono); color: var(--oiii-text); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; }
h3.minor { font-size: 15px; font-family: var(--font-mono); font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 56px 0 16px; }

/* gains */
.gains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.gain { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; transition: border-color .2s, transform .2s; }
.gain:hover { border-color: color-mix(in srgb, var(--oiii) 55%, var(--line)); transform: translateY(-2px); }
.ic { width: 40px; height: 40px; padding: 9px; border-radius: 10px; fill: none; stroke: var(--oiii-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  background: color-mix(in srgb, var(--oiii) 12%, transparent); margin-bottom: 16px; }
.gain p { color: var(--muted); margin: 8px 0 0; font-size: 15.5px; }

/* how it works */
.how { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; align-items: stretch; margin-top: 40px; }
.loop { list-style: none; margin: 0; padding: 0; display: grid; grid-template-rows: repeat(3, 1fr); gap: 14px; position: relative; }
.loop li { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-content: center; column-gap: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--sky); }
.loop li > :not(.step) { grid-column: 2; }
.loop p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.step { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font: 600 15px var(--font-mono); color: #06201F; background: var(--oiii); }
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stages > li { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--sky); }
.stages h4 { font-size: 15.5px; margin-bottom: 8px; }
.stages ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.stages ol li { font-size: 14.5px; color: var(--muted); }
.num { font: 500 12px var(--font-mono); color: var(--oiii-text); margin-right: 8px; font-variant-numeric: tabular-nums; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cards li { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--sky); }
.cards h4 { font-size: 15.5px; }
.cards p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.term { background: #070C16; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: #DCE4EE; }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid #1B2840; font: 500 12px var(--font-mono); color: #8FA0B3; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #24344D; }
.term-bar span { margin-left: 8px; }
.term-body { padding: 16px 18px; font: 400 14px/1.6 var(--font-mono); }
.term-body p { margin: 0 0 8px; }
.tag { display: inline-block; min-width: 108px; color: #3CC6C2; }
.thumbs { display: flex; gap: 10px; margin: 12px 0; }
.thumbs span { flex: 1; aspect-ratio: 4 / 3; border-radius: 8px; display: grid; place-items: end start; padding: 6px 8px; font-size: 12px; color: #E9EEF4;
  background: radial-gradient(ellipse 38% 30% at 55% 50%, rgba(229,72,77,var(--a)) 0%, transparent 70%), radial-gradient(ellipse 50% 40% at 48% 52%, rgba(20,163,160,var(--b)) 0%, transparent 75%), #05080F; }
.t1 { --a: .35; --b: .25; } .t2 { --a: .6; --b: .45; } .t3 { --a: .95; --b: .8; outline: 1px solid #E5484D; }
.gate { color: #F08A8D; }
.ask { color: #E9EEF4; }
.cursor { display: inline-block; width: 8px; height: 15px; margin-left: 6px; background: #3CC6C2; vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.note { font-size: 12px; color: #8FA0B3; margin: 0; padding: 0 18px 12px; }


/* install */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 28px; max-width: 880px; }
.steps > li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 18px; }
.steps > li > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.code { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.code pre { margin: 0; padding: 14px 16px; padding-right: 76px; overflow-x: auto; font-size: 14px; line-height: 1.55; }
.copy { position: absolute; top: 8px; right: 8px; font: 500 12px var(--font-mono); color: var(--muted); background: var(--sky); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; cursor: pointer; }
.copy:hover { color: var(--text); }
.small { margin: 2px 0 0; font-size: 14.5px; color: var(--muted); }
.tabbar { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: var(--surface); }
.tabbar button { font: 500 13px var(--font-mono); color: var(--muted); background: transparent; border: 0; border-radius: 7px; padding: 5px 12px; cursor: pointer; }
.tabbar button[aria-selected="true"] { background: var(--surface2); color: var(--text); }
.tabs.js .pane[data-off] { display: none; }
.tabs:not(.js) .tabbar { display: none; }
.tabs:not(.js) .pane + .pane { margin-top: 10px; }
.reqs { max-width: 880px; }
.reqs ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 4px; }
.badge { margin-left: 10px; font-size: 12px; padding: 3px 9px; border-radius: 999px; color: var(--oiii-text); border: 1px solid color-mix(in srgb, var(--oiii) 45%, transparent); text-transform: none; letter-spacing: 0; }

/* usage: a Claude Code terminal */
.cc { margin: 0; background: #0A0D12; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: #D4D8DE; }
.cc-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid #1A1F28; font: 500 12px var(--font-mono); color: #7D8590; }
.cc-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2A303A; }
.cc-bar span { margin-left: 8px; }
.cc-body { padding: 16px 18px 12px; font: 400 13.5px/1.55 var(--font-mono); overflow-x: auto; }
.cc-body > div { margin: 0; }
.cc-user { color: #9BA3AE; margin: 14px 0 10px !important; padding: 4px 10px; background: #161B22; border-radius: 4px; }
.cc-user:first-child { margin-top: 0 !important; }
.cc-user .p { color: #6E7681; }
.cc-say, .cc-tool { display: grid; grid-template-columns: 18px 1fr; gap: 4px; margin-top: 10px !important; }
.cc-say p { margin: 0; color: #E6EDF3; font-family: var(--font-body); font-size: 14.5px; line-height: 1.55; }
.dot { color: #E6EDF3; font-size: 11px; line-height: 21px; }
.dot.ok { color: #3FB950; }
.cc-tool b { color: #E6EDF3; font-weight: 600; }
.cc-tool > span:last-child { color: #9BA3AE; word-break: break-word; }
.cc-out { display: grid; grid-template-columns: 18px 22px 1fr; color: #8B949E; }
.cc-out::before { content: ""; }
.cc-out .el { color: #6E7681; }
.cc-out.more span:last-child { color: #6E7681; font-style: italic; }
.cc-think { margin-top: 10px !important; color: #8B949E; font-style: italic; }
.cc-think .star { color: #D97757; font-style: normal; }
.cc-thought { color: #6E7681; font-style: italic; padding-left: 18px; border-left: 1px solid #2A303A; margin-left: 6px !important; }
.cc-note { text-align: center; color: #6E7681; margin: 14px 0 4px !important; font-size: 12.5px; }
.cc-input { margin-top: 16px !important; border: 1px solid #3A414B; border-radius: 6px; padding: 7px 10px; color: #9BA3AE; }
.cc-input .p { color: #9BA3AE; }
.cc-input .cursor { display: inline-block; width: 8px; height: 15px; margin-left: 6px; background: #9BA3AE; vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
.cc-hint { display: flex; justify-content: space-between; color: #6E7681; font-size: 12px; padding: 4px 2px 0; }
.cc figcaption { font-size: 12px; color: #7D8590; padding: 0 18px 14px; }
@media (prefers-reduced-motion: reduce) { .cc-input .cursor { animation: none; } }
.cc-ctl { margin-left: auto !important; display: none; gap: 6px; }
.cc.js .cc-ctl { display: flex; }
.cc-ctl button { font: 500 11.5px var(--font-mono); color: #9BA3AE; background: #161B22; border: 1px solid #2A303A; border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.cc-ctl button:hover { color: #E6EDF3; border-color: #3A414B; }
.cc-ctl button[hidden] { display: none; }
.cc.js .cc-log { height: 540px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2A303A transparent; }
.cc-status { display: none; margin-top: 10px !important; color: #D97757; }
.cc-status .lbl { font-style: italic; }
.cc-status .sec { color: #6E7681; }
.cc.busy .cc-status { display: block; }
.cc-input .typed { color: #E6EDF3; margin-left: 6px; }
.dot.run { color: #6E7681; animation: blink 0.8s steps(1) infinite; }
@media (max-width: 640px) { .cc.js .cc-log { height: 440px; } }
/* footer */
.foot { padding: 40px 0 56px; border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.foot p { color: var(--muted); font-size: 14px; margin: 0; max-width: 70ch; }

@media (max-width: 960px) {
  .how, .duo { grid-template-columns: 1fr; }
  .gains, .stages { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  nav { display: none; }
  .bar { gap: 12px; }
  .brand span { display: none; }
  .langs a { padding: 4px 7px; }
  .steps > li { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .steps .step { grid-row: auto; }
  .gains, .stages { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .tag { min-width: 0; display: block; }
  .cc-body { font-size: 12.5px; }
}
.small code, .cards code { font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--surface2); color: var(--text); }
.kicker a { color: inherit; }
.steps > li.opt .step { background: transparent; color: var(--oiii-text); border: 1px solid var(--oiii); }
.sub-steps { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); font-size: 14.5px; }
.sub-steps b { color: var(--text); font-weight: 600; }
.sub-steps code { font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--surface2); color: var(--text); word-break: break-all; }

.term { display: flex; flex-direction: column; }
.term-body { flex: 1; }
.term-body p:has(> .tag) { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); column-gap: 12px; }
.term-body .tag { min-width: 0; }
@media (max-width: 640px) { .term-body p:has(> .tag) { grid-template-columns: 1fr; } }

a.badge { text-decoration: none; }
a.badge:hover { border-color: var(--oiii); }

/* results: final images of real runs */
.results { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.result { display: flex; flex-direction: column; background: var(--sky); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.shot { display: block; background: #05080F; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 2048 / 1110; object-fit: cover; transition: opacity .2s; }
.shot:hover img { opacity: .9; }
.result-body { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 22px; flex: 1; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.facts li { font: 500 12.5px var(--font-mono); color: var(--oiii-text); padding: 3px 9px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--oiii) 40%, transparent); background: color-mix(in srgb, var(--oiii) 8%, transparent); }
.points { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); font-size: 15px; }
.open { margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 18px; font: 500 13px var(--font-mono); }
.open a { text-decoration: none; }
.open a:hover { text-decoration: underline; }
.shot { position: relative; }
.source { position: absolute; top: 12px; left: 12px; font: 500 12px var(--font-mono); color: #E9EEF4; padding: 4px 10px; border-radius: 999px;
  background: rgba(5, 8, 15, .72); border: 1px solid rgba(233, 238, 244, .28); backdrop-filter: blur(4px); }
.specs { margin: 0; display: grid; gap: 4px; font-size: 14px; }
.specs div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; }
.specs dt { font: 500 12px/1.9 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.specs dd { margin: 0; }
.assist { max-width: 62ch; margin: -12px auto 30px; padding: 12px 16px; font-size: 15px; color: var(--muted); text-align: left;
  border: 1px solid var(--line); border-left: 3px solid var(--oiii); border-radius: 10px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.assist strong { color: var(--text); }
@media (max-width: 960px) { .results { grid-template-columns: 1fr; } }
#results .sub { max-width: none; }

/* install: one prompt to paste, the manual steps folded below */
.prompt { max-width: 880px; margin-top: 32px; overflow: hidden;
  border-color: color-mix(in srgb, var(--oiii) 45%, var(--line));
  box-shadow: 0 20px 60px -30px color-mix(in srgb, var(--oiii) 50%, transparent); }
.prompt-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 16px;
  border-bottom: 1px solid var(--line); font: 500 12.5px var(--font-mono); color: var(--oiii-text); }
.prompt .copy { position: static; background: var(--oiii); border-color: var(--oiii); color: #06201F; padding: 5px 12px; font-weight: 600; }
.prompt .copy:hover { color: #06201F; filter: brightness(1.08); }
.prompt pre { padding: 16px 18px; white-space: pre-wrap; word-break: break-word; font-size: 13.5px; line-height: 1.65; }
.prompt-note { max-width: 880px; margin-top: 12px; }
.manual { max-width: 880px; margin-top: 28px; border-top: 1px solid var(--line); padding-top: 18px; }
.manual summary { cursor: pointer; font: 500 14px var(--font-mono); color: var(--muted); }
.manual summary:hover { color: var(--text); }
.manual[open] summary { color: var(--text); }
.manual .steps { margin-top: 24px; }
/* install spans the same width as the other sections' grids */
#install .sub, #install .prompt, #install .prompt-note, #install .manual, #install .steps, #install .reqs { max-width: none; }
