
@font-face {
  font-family: 'Hanken Grotesk Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/hanken-grotesk.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Geist Mono Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/geist-mono.woff2) format('woff2-variations');
}

:root {
  color-scheme: dark;
  /* Four grounds, darkest first: the page, a well in a surface, a surface, a control on a surface. */
  --ground: #111010;
  --elevated: #191919;
  --canvas: #1e1d1d;
  --pane: #282726;
  --text: #e6e5e3;
  --text-2: rgb(230 229 227 / .62);
  --text-3: rgb(230 229 227 / .45);
  --text-4: rgb(230 229 227 / .18);
  --accent: #1084fe;
  --accent-hover: #4b9bff;
  --accent-active: #0076e8;
  --on-accent: #1e1d1d;
  --selection: rgb(16 132 254 / .4);
  --border-strong: #5f5e59;
  --border: #383836;
  /* The edge of a surface that sits on the page. */
  --edge: #ffffff0f;
  --danger: #ff263c;
  /* Danger as 13px text: one step lighter, 4.52:1 on the canvas where --danger is 4.48:1. */
  --danger-text: #ff2a3c;
  --success: #00c972;
  --sans: 'Hanken Grotesk Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono Variable', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(.23, 1, .32, 1);
  /* One width for everything the bot says: text, rows, chart. */
  --measure: 520px;
  /* Room beside a plot for its axis labels (left) and its end labels (right). */
  --axis: 40px;
  --labels: 72px;
  /* the chat's header: Echo's surface and 8px above and below */
  --head: 92px;
}

*, *::before, *::after { box-sizing: border-box; }
/* The gutter is always there, so the wordmark sits in one place on short and long pages. */
html { background: var(--ground); scrollbar-color: var(--border) transparent; scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--text);
  font: 425 15px/24px var(--sans);
  letter-spacing: .0027em;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent);
}
::selection { background: var(--selection); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
code, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
code { font-size: 13px; background: var(--elevated); border-radius: 6px; padding: 0 4px; }

.wrap { width: 100%; max-width: 800px; margin: 0 auto; padding: 0 20px; }
/* The landing page is the one place with two columns. */
.wrap.wide { max-width: 1120px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* navigation: a wordmark and one quiet link */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; font-size: 14px; line-height: 20px; }
.nav a { color: var(--text-2); padding: 6px 0; overflow-wrap: anywhere; text-align: right; }
.nav .mark { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 525; font-size: 15px; }
.logo { display: block; flex: none; }
.logo svg { display: block; }
.nav.mid { justify-content: center; }
/* In the chat the header floats: Echo top centre, the player's account on the right, and the conversation passing behind both. */
.nav.head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; padding-top: 8px; padding-bottom: 8px; pointer-events: none; }
.nav.head > * { pointer-events: auto; }
/* One step above a message, so he stays apart from what scrolls under him. */
.who {
  grid-column: 2; display: inline-flex; align-items: center; gap: 8px;
  height: 76px; padding: 0 26px 0 8px;
  background: var(--pane); border: .5px solid var(--border); border-radius: 22px;
  color: var(--text); font-size: 20px; line-height: 26px; font-weight: 525;
}
.who .logo { width: 64px; height: 64px; }
/* The player's account: their initial in their own colour, then the Riot ID, cut short before it pushes Echo off centre. */
.nav .you { grid-column: 3; justify-self: end; min-width: 0; max-width: 100%; gap: 8px; padding: 0 12px 0 8px; color: var(--text); }
.you .me { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-size: 12px; line-height: 1; font-weight: 600; }
.you .id { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.you .tag { color: var(--text-2); }

footer { display: flex; justify-content: center; gap: 16px; padding: 12px 20px 20px; font-size: 12px; line-height: 16px; }
footer.wrap { justify-content: flex-start; }
footer a, footer button { color: var(--text-2); padding: 6px 0; }
footer form { display: contents; }
footer button { background: none; border: 0; font: inherit; letter-spacing: inherit; cursor: pointer; }

/* one idea in the middle of the screen */
.center { flex: 1; display: grid; place-items: center; padding: 24px 20px; text-align: center; }
.center > div { display: flex; flex-direction: column; align-items: center; max-width: 420px; }
.display { font-size: 28px; line-height: 34px; font-weight: 525; letter-spacing: -.01em; overflow-wrap: anywhere; }
.title { font-size: 20px; line-height: 26px; font-weight: 525; }
.center p { color: var(--text-2); margin-top: 8px; text-wrap: balance; }
.center .btn, .center form { margin-top: 24px; }
.center form .btn, .center > div > :first-child, .center .sr + * { margin-top: 0; }
.center .hint { margin-top: 16px; }
.center .logo + .display { margin-top: 16px; }
.hint { font-size: 12px; line-height: 16px; color: var(--text-2); }
.hint a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.center .flash { font-size: 14px; line-height: 20px; color: var(--text); }

/* the landing page: what Echo is, with Echo in it */
.land { flex: 1; }
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); grid-template-areas: "pitch pet" "pitch sample";
  column-gap: 64px; align-items: center; padding-top: 16px; padding-bottom: 72px;
}
.pitch { grid-area: pitch; }
.pitch h1 { font-size: clamp(40px, 5.4vw, 64px); line-height: 1.04; font-weight: 525; letter-spacing: -.02em; text-wrap: balance; }
/* The first clause at full strength, the rest quiet. */
.lede { max-width: 44ch; font-size: 18px; line-height: 28px; color: var(--text-2); text-wrap: pretty; }
.lede b { color: var(--text); font-weight: inherit; }
.pitch .lede { margin-top: 20px; }
.cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
/* Two buttons side by side share the height and radius of the primary. */
.cta .btn { height: 44px; padding: 0 20px; border-radius: 16px; font-size: 15px; }
/* He sits on the recap he wrote. The lowest 7.5% of his drawing is clear space, so that much overlaps the message. */
.pet { grid-area: pet; justify-self: center; align-self: end; position: relative; z-index: 1; margin-bottom: -18px; }
.pet .logo { width: 248px; height: 248px; }
.sample { grid-area: sample; min-width: 0; }
/* Both recaps share one cell, so switching never moves the page. */
.swap { display: grid; }
.swap > .msg { grid-area: 1 / 1; }
.swap > .off { visibility: hidden; }
.pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.pick[hidden] { display: none; }
.pick .hint { margin-left: auto; }

.part { padding-bottom: 72px; scroll-margin-top: 16px; }
.part.last { padding-bottom: 0; }
.rule { border: 0; border-top: .5px solid var(--border); margin: 0 0 56px; }
.rule.flat { margin: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 16px 64px; align-items: start; }
.part h2 { font-size: clamp(28px, 3.4vw, 34px); line-height: 1.18; font-weight: 525; letter-spacing: -.01em; text-wrap: balance; }
/* Five faces, each kept in its own state. */
.moods { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px 16px; }
.moods li { display: flex; flex-direction: column; align-items: center; text-align: center; }
.moods .logo { width: 120px; height: 120px; margin-bottom: 8px; }
.moods b { font-weight: 525; }
.moods span:last-child { max-width: 22ch; font-size: 13px; line-height: 18px; color: var(--text-2); }
/* What he does: a few words on the left, and beside them the exchange as the chat shows it. */
.feats { display: flex; flex-direction: column; gap: 56px; margin-top: 56px; }
.feat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 20px 64px; align-items: start; }
.words h3 { font-size: 20px; line-height: 26px; font-weight: 525; }
.words p { max-width: 40ch; margin-top: 8px; color: var(--text-2); text-wrap: pretty; }
.demo { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
/* The page ends as it began: words on the left, Echo on the right, here asleep on the last line. */
.close { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 64px; align-items: end; }
.close > div { padding-bottom: 56px; }
.close .lede { margin-top: 12px; }
.close .btn { margin-top: 24px; }
.close .logo { width: 160px; height: 160px; margin-bottom: -12px; }
footer.foot { justify-content: space-between; align-items: flex-start; gap: 24px; padding-top: 20px; padding-bottom: 24px; }
.foot p { max-width: 72ch; color: var(--text-2); text-wrap: pretty; }
.foot a { flex: none; padding: 0; }

/* controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 16px;
  background: var(--pane); color: var(--text);
  border: .5px solid var(--border); border-radius: 10px;
  font: 525 14px/20px var(--sans); letter-spacing: inherit;
  cursor: pointer; user-select: none;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: scale(.97); }
/* 16, not 22: at this height 22 would be a full pill. */
.btn.primary {
  height: 44px; padding: 0 20px; border-radius: 16px;
  background: var(--accent); color: var(--on-accent); border-color: transparent;
  font-size: 15px;
}
.btn.primary:active { background: var(--accent-active); }

.field {
  width: 100%; height: 44px; padding: 0 12px;
  background: var(--canvas); color: var(--text);
  border: .5px solid var(--border); border-radius: 10px;
  font: 425 15px/24px var(--sans);
}
.field::placeholder { color: var(--text-2); }

/* the conversation */
.chat { flex: 1; display: flex; flex-direction: column; }
.thread { flex: 1; display: flex; flex-direction: column; gap: 24px; padding: 8px 0 24px; }
.thread > .empty { margin: auto; color: var(--text-2); }
.msg { min-width: 0; scroll-margin-top: calc(var(--head) + 8px); }
.msg.user {
  align-self: flex-end; max-width: 80%;
  background: var(--accent); color: var(--on-accent); border-radius: 16px; padding: 10px 16px;
  overflow-wrap: anywhere; white-space: pre-wrap;
}
.msg.user::selection { background: rgb(30 29 29 / .3); color: var(--on-accent); }
/* A question sits closer to its answer than to the exchange before it. */
.msg.user + .msg.bot { margin-top: -12px; }
/* What the bot says sits on a surface one step above the page. */
.msg.bot {
  align-self: flex-start; display: flex; flex-direction: column; gap: 16px;
  max-width: min(100%, calc(var(--measure) + 40px));
  background: var(--canvas); border: .5px solid var(--edge); border-radius: 16px; padding: 10px 16px;
}
/* With numbers in it, the surface takes the full measure and more room. */
.msg.bot:has(.figures, .rows, .chart, .focus) { width: 100%; padding: 16px 20px; }
.say h2, .say .t { font-size: 17px; line-height: 22px; font-weight: 650; }
.say h2 + p, .say .t + p { margin-top: 4px; }
.say p { overflow-wrap: anywhere; white-space: pre-line; }
.msg.bot .note { font-size: 12px; line-height: 16px; color: var(--text-2); }

.msg.bot.pending { flex-direction: row; gap: 4px; height: 44px; padding: 0 16px; align-items: center; }
.pending i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-2); animation: wait 1.2s ease-in-out infinite; }
.pending i:nth-of-type(2) { animation-delay: .15s; }
.pending i:nth-of-type(3) { animation-delay: .3s; }
@keyframes wait { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.dock { position: sticky; bottom: 0; z-index: 2; background: var(--ground); padding: 8px 0 20px; }
/* 52 tall, so that its radius of 22 is not a full pill. */
.composer {
  display: flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 8px 0 20px;
  background: var(--canvas); border: .5px solid var(--border); border-radius: 22px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.composer:focus-within { border-color: var(--text-3); box-shadow: 0 0 0 .5px var(--text-3); }
.composer input {
  flex: 1; min-width: 0; height: 100%;
  background: none; border: 0; outline: 0; color: var(--text);
  font: 425 15px/24px var(--sans); letter-spacing: inherit;
}
.composer input::placeholder { color: var(--text-2); }
.send {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  background: var(--accent); color: var(--on-accent);
  border: 0; border-radius: 12px; cursor: pointer;
  transition: background-color .15s var(--ease), transform .15s var(--ease);
}
.send:active { transform: scale(.97); background: var(--accent-active); }
.send:disabled { background: var(--text-4); color: var(--text-2); cursor: default; transform: none; }

/* blocks: what a bot message can show */
.cap { display: block; font-size: 13px; line-height: 18px; color: var(--text-2); }
.figures { display: flex; flex-wrap: wrap; gap: 16px 24px; margin: 0; }
.cap + .figures { margin-top: 4px; }
/* Figures keep one pitch whether there are two or four of them. */
.figure { display: flex; flex-direction: column-reverse; justify-content: flex-end; min-width: 104px; }
.figure dd { margin: 0; font-size: 28px; line-height: 34px; font-weight: 525; letter-spacing: -.02em; white-space: nowrap; }
.figure dt { font-size: 13px; line-height: 18px; color: var(--text-2); }
.figure small { display: block; font-size: 12px; line-height: 16px; }

.scroll { overflow-x: auto; }
.rows { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.rows th { padding: 0 0 8px 24px; text-align: left; font-weight: 425; font-size: 13px; line-height: 18px; color: var(--text-2); white-space: nowrap; }
.rows td { padding: 10px 0 10px 24px; border-top: .5px solid var(--border); white-space: nowrap; }
.rows th:first-child, .rows td:first-child { padding-left: 0; }
.rows .mono, .rows .num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13px; }
.rows .num, .rows .end { text-align: right; }
.rows th.num { font-family: var(--sans); }
.rows .pre { white-space: pre; }
.rows .quiet { color: var(--text-2); }
.rows .w { color: var(--success); }
.rows .l { color: var(--danger-text); }
.rows .res { font-weight: 525; width: 1px; }
.rows .res + td { padding-left: 10px; }
/* A table whose column labels are not drawn starts at its first row. */
.rows.plain th { padding: 0; }
.rows.plain tr:first-child td { border-top: 0; padding-top: 0; }
.rows.plain td:last-child { white-space: normal; }

.lead { font-size: 15px; line-height: 24px; font-weight: 650; }
.focus .tip { color: var(--text-2); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions form { display: contents; }

.chart { position: relative; margin: 0; border-radius: 6px; }
.chart:has(.plot:focus-visible) { outline: 2px solid var(--accent); outline-offset: 6px; }
.chart figcaption { margin-bottom: 12px; }
.plot { position: relative; height: 180px; margin: 0 var(--labels) 0 var(--axis); touch-action: pan-y; cursor: crosshair; outline: 0; }
.plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.plot .grid { position: absolute; left: 0; right: 0; border-top: .5px solid var(--border); }
.plot .ref { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.plot .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.plot .tick, .plot .end, .plot .lobby { position: absolute; transform: translateY(-50%); font: 425 12px/16px var(--mono); font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.plot .tick { right: calc(100% + 10px); }
.plot .end { left: calc(100% + 10px); color: var(--text); font-weight: 525; }
.plot .lobby { left: calc(100% + 10px); font-family: var(--sans); }
.plot .dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--canvas); pointer-events: none; }
.plot .cross { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: var(--text-3); pointer-events: none; }
.plot .tip {
  position: absolute; z-index: 1; pointer-events: none;
  padding: 6px 10px; background: var(--pane); border: .5px solid var(--border); border-radius: 8px;
  font-size: 12px; line-height: 16px; color: var(--text-2); white-space: nowrap;
}
.plot .tip b { display: block; font: 525 13px/18px var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.plot [hidden] { display: none; }
.chart .span { display: flex; justify-content: space-between; gap: 8px; margin: 8px var(--labels) 0 var(--axis); font-size: 12px; line-height: 16px; color: var(--text-2); }

/* the player page */
.player { flex: 1; padding-top: 24px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 24px; }
.player .empty { color: var(--text-2); }
.panel { display: flex; flex-direction: column; gap: 24px; background: var(--canvas); border: .5px solid var(--edge); border-radius: 16px; padding: 20px 24px 24px; }

/* the privacy page: prose */
.prose { padding-top: 24px; padding-bottom: 24px; }
.prose > * { max-width: 58ch; }
.prose h1 { font-size: 28px; line-height: 34px; font-weight: 525; letter-spacing: -.01em; }
.prose h2 { font-size: 17px; line-height: 22px; font-weight: 650; margin: 24px 0 8px; }
.prose p, .prose ul { margin: 8px 0 0; }
.prose ul { padding-left: 20px; }
.prose li { margin-top: 4px; text-wrap: pretty; }
.prose .quiet { color: var(--text-2); }

/* the creature by itself, on the surface it is drawn for */
.show { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 24px; padding-top: 24px; padding-bottom: 24px; }
.stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 40px; background: var(--canvas); border: .5px solid var(--edge); border-radius: 16px; padding: 48px 24px 24px; }
.sizes { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 24px; }
.sizes figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sizes figcaption { font-size: 12px; line-height: 16px; color: var(--text-2); }
.states { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.states .btn, .pick .btn { background: none; color: var(--text-2); }
.states .btn[aria-pressed=true], .pick .btn[aria-pressed=true] { background: var(--pane); color: var(--text); border-color: var(--border-strong); }

/* development stand-ins */
.dev { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 8px; text-align: left; margin-top: 24px; }
.dev .btn { margin-top: 0; height: 44px; }
.dev .btn[name=player] { justify-content: flex-start; }
.dev .btn span { color: var(--text-2); font-weight: 425; margin-left: auto; padding-left: 12px; }

/* a mouse: hover states, which would stick after a tap on a touch screen */
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .nav a:hover, footer a:hover, footer button:hover { color: var(--text); text-decoration: none; }
  .hint a:hover { color: var(--text); }
  .btn:hover { border-color: var(--border-strong); text-decoration: none; }
  .btn.primary:hover { background: var(--accent-hover); border-color: transparent; }
  .btn.primary:active { background: var(--accent-active); }
  .send:not(:disabled):hover { background: var(--accent-hover); }
}

/* a finger: 44px targets, and 16px in fields so the page does not zoom */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .nav .you { min-width: 44px; }
  .nav a, footer a, footer button { display: inline-flex; align-items: center; min-height: 44px; }
  .field, .composer input { font-size: 16px; }
  .composer { padding-right: 4px; }
  .send { width: 44px; height: 44px; border-radius: 16px; }
}

/* one column: Echo first, then the words, then what he wrote */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pet" "pitch" "sample"; padding-top: 8px; padding-bottom: 56px; }
  .pet { margin-bottom: 8px; }
  .pet .logo { width: 168px; height: 168px; }
  .pitch { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .cta { justify-content: center; }
  .sample { width: 100%; max-width: 560px; margin-top: 40px; justify-self: center; }
  .part { padding-bottom: 56px; }
  .rule { margin-bottom: 40px; }
  .split, .feat, .close { grid-template-columns: minmax(0, 1fr); }
  .moods { display: flex; flex-wrap: wrap; justify-content: center; }
  .moods li { width: 148px; }
  .feats { gap: 40px; margin-top: 40px; }
  .close > div { padding-bottom: 0; }
  .close .logo { justify-self: end; }
  footer.foot { flex-direction: column; }
}

@media (max-width: 520px) {
  .figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure { min-width: 0; }
  .rows th, .rows td { padding-left: 16px; }
  .rows .wide { display: none; }
  :root { --axis: 36px; --head: 76px; }
  .msg.bot:has(.figures, .rows, .chart, .focus), .panel { padding: 16px; }
  /* 48 is the smallest size at which he still moves. */
  .who { height: 60px; padding: 0 18px 0 6px; gap: 6px; border-radius: 20px; font-size: 17px; line-height: 22px; }
  .who .logo { width: 48px; height: 48px; }
  /* No room for a name beside Echo: the button is the initial alone, and the Riot ID stays for a screen reader. */
  .nav .you { width: 36px; padding: 0; }
  .you .id { position: absolute; width: 1px; height: 1px; margin: -1px; clip-path: inset(50%); }
}

/* the narrowest phones: the game rows fit without a sideways scroll */
@media (max-width: 360px) {
  .wrap { padding: 0 12px; }
  .msg.bot:has(.figures, .rows, .chart, .focus), .panel { padding: 12px; }
  .rows th, .rows td { padding-left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .btn:active, .send:active { transform: none; }
  .pending i { animation: none; opacity: .6; }
}
