/* Simul. The app icon's graphite and white dots, one teal accent where the
   icon has it. System fonts only. */

:root {
  --bg: #15161a;
  --surface: #1c1d22;
  --surface-2: #22242a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --text: #ececea;
  --text-2: #a9aaa8;
  --text-3: #7e807f;
  --accent: #73bddb;
  --accent-soft: rgba(115, 189, 219, 0.12);

  --sans: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  --mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Consolas, monospace;

  --max: 1040px;
  --gutter: clamp(16px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.3); }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2 { margin: 0; font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; }
p { margin: 0; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: 0.86em; }
kbd {
  display: inline-block; padding: 0 5px;
  font-size: 0.8em; line-height: 1.6;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px;
  background: var(--surface);
}

.skip-link { position: absolute; left: 12px; top: -48px; z-index: 10; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 6px; }
.skip-link:focus { top: 12px; }

main > *, .nav, .footer { max-width: var(--max); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- Nav ---------- */

.nav { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; font-size: 0.92rem; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); text-decoration: none; }
.brand img { border-radius: 5px; }
.nav > a:last-child { color: var(--text-2); }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding-top: clamp(40px, 8vw, 96px);
  padding-bottom: clamp(40px, 6vw, 72px);
}
.def { font-family: var(--mono); font-size: 0.8rem; color: var(--text-3); max-width: 38rem; }
.def b { color: var(--text-2); font-weight: 600; }
.hero h1 { margin-top: 22px; font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1; }
.lede { margin-top: 22px; max-width: 34rem; color: var(--text-2); font-size: 1.1rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 30px; font-size: 0.95rem; }
.button {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px;
  border-radius: 8px; background: var(--text); color: var(--bg);
  font-weight: 600; text-decoration: none;
}
.button:hover { background: #fff; }
.orbit { width: clamp(220px, 30vw, 360px); aspect-ratio: 1; }

/* ---------- Demo ---------- */

.demo { margin-top: 0; margin-bottom: 0; }
.window {
  display: grid; grid-template-columns: 250px minmax(0, 1fr); height: 360px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  overflow: hidden;
}

.sidebar { border-right: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 5px; }

.session {
  display: grid;
  grid-template-columns: 8px 30px minmax(0, 1fr) auto;
  align-items: center; gap: 8px;
  width: 100%;
  padding: 8px 9px 8px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.session:hover { background: rgba(255, 255, 255, 0.04); }
.session.is-selected { background: rgba(255, 255, 255, 0.08); border-color: var(--line); }
.session.is-unread { background: var(--accent-soft); border-color: rgba(115, 189, 219, 0.35); }
.session.is-unread .s-title { font-weight: 600; }
.session:focus-visible { outline-offset: 1px; }

.slot { font-family: var(--mono); font-size: 9px; color: var(--text-3); }
.s-text { display: grid; min-width: 0; }
.s-title { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-sub { font-family: var(--mono); font-size: 9.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.branch::before { content: "⎇ "; }
.s-status { display: inline-flex; align-items: center; gap: 6px; }
.elapsed { font-family: var(--mono); font-size: 9.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.pixel-label { font-family: var(--mono); font-size: 9px; color: var(--text-2); }
.pixel-label.is-ember { color: var(--accent); }

.tile {
  position: relative; display: inline-block;
  width: 30px; height: 30px; border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  background-repeat: no-repeat; background-position: center;
  --g: #d8d8d6;
}
.tile-claude { background-image: radial-gradient(circle, var(--g) 30%, transparent 33%); background-size: 6px 6px; background-repeat: repeat; background-clip: content-box; padding: 8px; }
.tile-codex { background-image: radial-gradient(circle at center, transparent 34%, var(--g) 36%, var(--g) 52%, transparent 54%); background-size: 14px 14px; }
.tile-shell { background-image: linear-gradient(var(--g), var(--g)), linear-gradient(var(--g), var(--g)); background-size: 7px 2px, 2px 2px; background-position: 8px 15px, 17px 15px; }

.badge {
  position: absolute; top: -3px; right: -3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--surface);
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.is-unread .badge { transform: scale(1); }

/* Working indicator: a light chasing round a 3×3 grid. */
.pixel-loader { display: inline-grid; grid-template-columns: repeat(3, 4px); gap: 1.5px; }
.pixel-loader i { width: 4px; height: 4px; border-radius: 1px; background: var(--accent); opacity: 0.15; animation: chase 0.8s steps(1, end) infinite; }
.pixel-loader i:nth-child(2) { animation-delay: 0.1s; }
.pixel-loader i:nth-child(3) { animation-delay: 0.2s; }
.pixel-loader i:nth-child(6) { animation-delay: 0.3s; }
.pixel-loader i:nth-child(9) { animation-delay: 0.4s; }
.pixel-loader i:nth-child(8) { animation-delay: 0.5s; }
.pixel-loader i:nth-child(7) { animation-delay: 0.6s; }
.pixel-loader i:nth-child(4) { animation-delay: 0.7s; }
.pixel-loader i:nth-child(5) { animation: none; opacity: 0.1; }
@keyframes chase { 0% { opacity: 1; } 12.5% { opacity: 0.55; } 25% { opacity: 0.3; } 37.5%, 100% { opacity: 0.15; } }

.limits {
  margin-top: auto;
  display: grid; gap: 6px;
  padding: 9px 8px;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 9px; color: var(--text-3);
}
.limit-row { display: grid; grid-template-columns: 7.5em 1fr 3ch; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.bar { height: 3px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar i { display: block; height: 100%; background: rgba(255, 255, 255, 0.5); }

.terminal {
  background: #111215;
  padding: 18px 22px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.85;
  color: #cfd0ce;
}
.t-line { white-space: pre-wrap; }
.t-prompt { color: #fff; font-weight: 600; }
.t-dot, .t-dim { color: var(--text-3); }
.t-done { color: var(--accent); }
.t-add { color: #9fd3a8; }
.t-del { color: #e3958f; }
.t-ask { color: var(--text); }
.answer {
  margin-left: 6px;
  font: inherit; font-size: 11.5px;
  padding: 1px 10px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.answer:first-of-type { border-color: rgba(115, 189, 219, 0.5); color: var(--accent); }
.answer:hover { background: var(--surface-2); }
.cursor { display: inline-block; width: 7px; height: 14px; background: #cfd0ce; vertical-align: -2px; animation: blink 1.1s steps(1, end) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.demo figcaption { margin-top: 12px; font-size: 0.82rem; color: var(--text-3); }

/* ---------- What's in it ---------- */

.notes, .build { padding-top: clamp(56px, 8vw, 96px); }
h2 { font-size: 1.5rem; }
.notes dl { margin: 22px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 48px; }
.notes dt { font-weight: 600; }
.notes dd { margin: 4px 0 0; color: var(--text-2); font-size: 0.95rem; }

/* ---------- Build ---------- */

.build p { margin-top: 12px; max-width: 40rem; color: var(--text-2); }
.code {
  margin: 22px 0 0;
  padding: 18px 20px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12.5px; line-height: 1.9;
  overflow-x: auto;
}
.c-dim { color: var(--text-3); }

/* ---------- Footer ---------- */

.footer {
  margin-top: clamp(64px, 9vw, 112px);
  padding-top: 24px; padding-bottom: 44px;
  border-top: 1px solid var(--line);
  display: grid; gap: 6px;
  font-size: 0.84rem; color: var(--text-3);
}
.fine { font-size: 0.78rem; max-width: 46rem; }

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .orbit { grid-row: 1; width: 160px; }
  .notes dl { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .window { grid-template-columns: minmax(0, 1fr); height: auto; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .limits { display: none; }
  .terminal { height: 260px; font-size: 11.5px; padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .pixel-loader i { opacity: 0.4; }
  .pixel-loader i:nth-child(1) { opacity: 1; }
}
