:root {
  --bg: #f2efe7;
  --paper: #fffdf7;
  --paper-soft: #f7f3e9;
  --ink: #11110f;
  --ink-mid: #3f3e39;
  --ink-soft: #68665f;
  --line: rgba(17, 17, 15, .15);
  --line-strong: rgba(17, 17, 15, .26);
  --rail: #11110f;
  --rail-soft: #1d1e1a;
  --rail-ink: #fffdf7;
  --rail-muted: #aaa79f;
  --green: #72a778;
  --echo: #4d7853;
  --echo-bright: #72a778;
  --amber: #bd4b20;
  --sky: #087aa5;
  --red: #c92f2f;
  --yellow: #d6aa32;
  --tracer-sky: #3fa8e8;
  --tracer-orange: #f0821e;
  --tracer-red: #e34637;
  --echo-dark: #365d41;
  --echo-blue: #3fa8e8;
  --echo-orange: #f0821e;
  --echo-red: #e34637;
  --echo-green: #4d7853;
  --code-bg: #11110f;
  --code-ink: #e9e6dc;
  --display: "General Sans", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "General Sans", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sidebar: 276px;
  --topbar: 66px;
  --composer-max: 860px;
}

*, *::before, *::after { box-sizing: border-box; }
::selection { background: rgba(63, 168, 232, .32); color: var(--ink); }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
html:not([data-alpha-invites-enabled="1"]) [data-alpha-invite-surface] { display: none !important; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, textarea, input { font: inherit; }
button { color: inherit; }
button:focus-visible, textarea:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

.sidebar {
  position: relative;
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  padding: 18px 13px 15px;
  overflow: hidden;
  background: var(--rail);
  color: var(--rail-ink);
  border-right: 1px solid rgba(255, 253, 247, .16);
  z-index: 30;
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 3px solid var(--echo);
  opacity: .75;
}
.brand-row {
  position: relative;
  z-index: 1;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--rail-ink);
  text-decoration: none;
  font: 700 17px/1 var(--sans);
  letter-spacing: 0;
}
.tracer-echo-mark {
  --mark-h: 16px;
  --bar-w: 2px;
  --bar-gap: 1px;
  width: max-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--bar-gap);
  height: var(--mark-h);
  vertical-align: middle;
}
.tracer-echo-mark i {
  --bar: var(--tracer-sky);
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: var(--bar-w);
  border-radius: 0;
  background: var(--bar);
}
.tracer-echo-mark i:nth-child(1) { --bar: var(--tracer-sky); height: 35%; }
.tracer-echo-mark i:nth-child(2) { --bar: var(--tracer-orange); height: 80%; }
.tracer-echo-mark i:nth-child(3) { --bar: var(--tracer-red); height: 52%; }
.tracer-echo-mark i:nth-child(4) { --bar: var(--echo); height: 100%; }
.tracer-echo-mark i:nth-child(5) { --bar: var(--tracer-sky); height: 44%; }
.tracer-echo-mark-xs { --mark-h: 11px; --bar-w: 1px; --bar-gap: 1px; margin-right: 4px; }
.tracer-echo-mark-sm { --mark-h: 18px; --bar-w: 2px; --bar-gap: 1px; flex: 0 0 auto; padding: 3px; }
.tracer-echo-mark-lg { --mark-h: 44px; --bar-w: 4px; --bar-gap: 3px; padding: 5px; }

.icon-button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.icon-button:hover { background: var(--paper-soft); border-color: var(--line); }
.sidebar .icon-button { color: var(--rail-muted); }
.sidebar .icon-button:hover { color: var(--rail-ink); background: var(--rail-soft); border-color: rgba(255, 253, 247, .22); }
.icon-button[aria-pressed="true"] { color: var(--echo); background: #e9f0e5; border-color: #b8cdb9; }
.icon-button.small { width: 32px; height: 32px; flex-basis: 32px; }
.icon-button svg { width: 19px; height: 19px; stroke-width: 1.8; }
.icon-button.small svg { width: 16px; height: 16px; }

.new-chat-button {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 20px;
  padding: 10px 12px;
  border: 1px solid #aebba9;
  border-radius: 6px;
  background: #edf1e9;
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}
.new-chat-button:hover { background: #e3ece0; border-color: var(--echo-bright); }
.new-chat-button svg { width: 18px; height: 18px; }

.history-search {
  position: relative;
  z-index: 1;
  min-width: 0;
  height: 38px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 7px;
  margin: -5px 0 8px;
  padding: 0 4px 0 10px;
  border: 1px solid #343b31;
  border-radius: 5px;
  background: #1d211c;
  color: var(--rail-muted);
}
.history-search:focus-within { border-color: var(--echo-bright); box-shadow: 0 0 0 2px rgba(114,167,120,.1); }
.history-search > svg { width: 15px; height: 15px; stroke-width: 1.8; }
.history-search input {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--rail-ink);
  font: 500 12px/1 var(--sans);
}
.history-search input::placeholder { color: #7f887a; opacity: 1; }
.history-search input::-webkit-search-cancel-button { display: none; }
.history-search-clear {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--rail-muted);
  cursor: pointer;
}
.history-search-clear:hover { background: var(--rail-soft); color: var(--rail-ink); }
.history-search-clear svg { width: 14px; height: 14px; }
.history-search-empty {
  margin: 14px 8px;
  color: var(--rail-muted);
  font-size: 11px;
  line-height: 1.45;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.history-heading {
  position: relative;
  z-index: 1;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  color: var(--rail-muted);
  font: 700 10px/1 var(--sans);
  letter-spacing: 0;
  text-transform: uppercase;
}
.conversation-list {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 3px 0 12px;
  scrollbar-width: thin;
  scrollbar-color: #515b4d transparent;
}
.conversation-item {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 4px;
  margin: 2px 0;
  padding: 4px 5px 4px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
}
.conversation-item:hover { background: var(--rail-soft); }
.conversation-item.active { background: #262c23; border-color: #394136; }
.conversation-title {
  width: 100%;
  overflow: hidden;
  color: var(--rail-muted);
  font-size: 13px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.conversation-item.active .conversation-title { color: var(--rail-ink); font-weight: 700; }
.conversation-delete { opacity: 0; }
.conversation-item:hover .conversation-delete, .conversation-item:focus-within .conversation-delete { opacity: 1; }

.sidebar-footer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: start;
  width: 100%;
  margin: 0;
  padding: 15px 7px 2px;
  border: 0;
  border-top: 1px solid #343a31;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.sidebar-footer:hover { background: var(--rail-soft); }
.identity-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--amber); }
.identity-dot.ready { background: var(--echo-bright); box-shadow: 0 0 0 3px rgba(114,167,120,.12); }
.identity-copy { min-width: 0; display: flex; flex-direction: column; }
.identity-copy strong { overflow: hidden; color: var(--rail-ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.identity-copy span { color: var(--rail-muted); font-size: 11px; }
.sidebar-settings-icon { width: 16px; height: 16px; margin-top: 2px; color: var(--rail-muted); stroke-width: 1.8; }

.workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: var(--topbar) minmax(0, 1fr) auto;
  background: var(--bg);
}
.topbar {
  position: relative;
  z-index: 70;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 0 18px 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.topbar-leading { min-width: 0; display: flex; align-items: center; gap: 10px; }
.product-name {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}
.product-name strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 700 13px/1.2 var(--sans);
  letter-spacing: 0;
}
.product-name strong .brand-by { color: var(--ink-soft); font-size: 10px; font-weight: 560; }
.product-name span { overflow: hidden; color: var(--ink-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.product-name strong > span:nth-child(2) { color: var(--ink); font-size: inherit; font-weight: inherit; }
.cost-comparison {
  position: relative;
  justify-self: end;
  color: var(--echo);
}
.cost-comparison[hidden] { display: none; }
.cost-comparison summary {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(63,139,91,.38);
  border-radius: 50%;
  background: rgba(63,139,91,.08);
  color: var(--echo);
  box-shadow: 0 0 0 3px rgba(63,139,91,.05), 0 0 16px rgba(63,139,91,.16);
  cursor: pointer;
  list-style: none;
  perspective: 160px;
  transform-style: preserve-3d;
  animation: cost-leaf-breathe 4.8s cubic-bezier(.45, 0, .55, 1) infinite;
}
.cost-comparison summary::-webkit-details-marker { display: none; }
.cost-comparison summary svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.9;
  transform-origin: 55% 75%;
  transform-style: preserve-3d;
  animation: cost-leaf-tilt 4.8s cubic-bezier(.45, 0, .55, 1) infinite;
}
.cost-comparison summary:hover,
.cost-comparison[open] summary { background: rgba(63,139,91,.14); border-color: var(--echo); }
@keyframes cost-leaf-breathe {
  0%, 100% { box-shadow: 0 0 0 3px rgba(63,139,91,.04), 0 0 12px rgba(63,139,91,.12); transform: translateY(0) scale(1); }
  50% { box-shadow: 0 0 0 4px rgba(63,139,91,.07), 0 0 20px rgba(63,139,91,.22); transform: translateY(-1px) scale(1.025); }
}
@keyframes cost-leaf-tilt {
  0%, 100% { transform: rotateX(0deg) rotateY(-7deg) rotateZ(-1deg); }
  50% { transform: rotateX(5deg) rotateY(7deg) rotateZ(1deg); }
}
.cost-info-panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 12px);
  right: 0;
  width: min(380px, calc(100vw - 24px));
  max-height: calc(100dvh - var(--topbar) - 24px);
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 17px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(8,10,7,.16);
  color: var(--ink-mid);
  font: 400 12px/1.5 var(--sans);
  white-space: normal;
  isolation: isolate;
}
.cost-info-heading { display: grid; gap: 3px; }
.cost-info-heading span { color: var(--echo); font: 750 9px/1.2 var(--mono); text-transform: uppercase; }
.cost-info-heading strong { color: var(--ink); font-size: 14px; line-height: 1.3; }
.cost-info-panel p { margin: 0; }
.cost-values { display: grid; gap: 7px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cost-values > span { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 14px; }
.cost-values > span > span:first-child { color: var(--ink-soft); font: 650 10px/1.3 var(--sans); }
.cost-values strong { color: var(--ink-mid); font: 700 10px/1.3 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.numeric-readout {
  font-variant-numeric: tabular-nums lining-nums;
  unicode-bidi: isolate;
}
.numeric-readout__visual {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}
.numeric-readout__fraction {
  position: relative;
  top: -.22em;
  font-size: .62em;
  font-weight: 740;
  letter-spacing: .015em;
}
.numeric-readout__currency {
  font-size: .62em;
  color: var(--ink-soft);
  letter-spacing: .02em;
}
.cost-multiplier { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px; }
.cost-multiplier span { max-width: 150px; color: var(--ink-soft); font: 650 10px/1.35 var(--sans); }
.cost-multiplier strong { color: var(--echo); font: 800 13px/1.3 var(--mono); white-space: nowrap; }
.cost-methodology { display: grid; gap: 7px; padding: 12px; border: 1px solid var(--line); background: var(--paper-soft); }
.cost-methodology strong { color: var(--ink); font-size: 11px; line-height: 1.3; }
.cost-methodology p { color: var(--ink-mid); font-size: 11px; line-height: 1.48; }
.cost-methodology > span { color: var(--ink-soft); font: 650 9px/1.35 var(--sans); }
.cost-info-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.cost-info-links a { color: var(--echo-dark); font-weight: 650; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.topbar-personal-controls {
  min-height: 40px;
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}
.topbar-personal-controls .theme-toggle {
  min-height: 38px;
  padding-right: 9px;
  padding-left: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.topbar-personal-controls .theme-toggle:hover { background: var(--paper-soft); }
.topbar-personal-controls .account-menu-button {
  height: 38px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.topbar-action-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-mid);
  font-size: 11px;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
}
.topbar-action-link:hover, .topbar-action-link:focus-visible { border-color: var(--line-strong); background: var(--paper-soft); color: var(--ink); }
.topbar-action-link:focus-visible { outline: 2px solid var(--echo); outline-offset: 2px; }
.topbar-action-link > svg { width: 16px; height: 16px; stroke-width: 1.8; }
.landing-pricing-action { border-color: transparent; }
.account-menu-button {
  min-width: 96px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink-mid);
  font-size: 11px;
  font-weight: 720;
  line-height: 1;
  cursor: pointer;
}
.account-menu-button:hover { border-color: var(--line-strong); background: var(--paper-soft); color: var(--ink); }
.account-menu-button > svg { width: 17px; height: 17px; flex: 0 0 auto; stroke-width: 1.8; }
.account-menu-avatar,
.menu-account-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--rail);
  color: var(--rail-ink);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.account-menu-avatar { width: 22px; height: 22px; }
.account-menu-button .account-menu-chevron { width: 13px; height: 13px; color: var(--ink-soft); }

.thread {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}
.message-list { width: min(860px, 100%); margin: 0 auto; padding: 34px 28px 24px; }
.empty-state {
  width: 100%;
  min-height: 100%;
  display: block;
  margin: 0;
  padding: 0;
}
.home-intro {
  width: min(var(--composer-max), 100%);
  min-height: calc(100dvh - var(--topbar) - 198px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
  padding: 50px 28px 44px;
}
.mode-resolver {
  position: relative;
  width: min(600px, 100%);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 auto 23px;
}
.mode-resolver-line {
  height: 1px;
  flex: 1 1 auto;
  background: var(--line-strong);
}
.mode-resolver-line:last-child { transform: scaleX(-1); }
.tracer-echo-mark-resolver {
  --mark-h: 34px;
  --bar-w: 3px;
  --bar-gap: 3px;
  width: 0;
  flex: 0 0 auto;
  overflow: hidden;
  opacity: 0;
  transform: scale(.75);
  transition: width .24s ease, margin .24s ease, opacity .24s ease, transform .24s ease;
}
.mode-resolver.is-echo .tracer-echo-mark-resolver { width: 25px; margin-left: 18px; margin-right: 11px; opacity: 1; transform: scale(1); }
.mode-resolver-label {
  width: 190px;
  flex: 0 0 190px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 50px;
  font-weight: 620;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  filter: blur(0);
  opacity: .58;
  transform: scale(1);
  transition: color .18s ease, filter .15s ease, opacity .15s ease, transform .15s ease;
}
.mode-resolver.is-defocusing .mode-resolver-label { filter: blur(10px); opacity: 0; transform: scale(.96); }
.mode-resolver.is-echo .mode-resolver-label { color: var(--ink); font-weight: 720; opacity: 1; }
.home-intro h1 {
  margin: 0;
  color: var(--ink);
  font-size: 38px;
  font-weight: 520;
  line-height: 1.13;
  text-align: center;
  letter-spacing: 0;
}
.home-intro h1 span, .home-intro h1 strong { display: block; }
.home-intro h1 strong { color: var(--echo); font-weight: 720; }
.empty-subtitle { margin: 13px 0 25px; color: var(--ink-soft); font-size: 14px; text-align: center; }
.prompt-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-strong); }
.prompt-grid button {
  min-height: 74px;
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink-mid);
  text-align: left;
  cursor: pointer;
}
.prompt-grid button:nth-child(even) { border-right: 0; }
.prompt-grid button:hover { background: var(--paper); color: var(--ink); }
.prompt-grid button:hover svg { color: var(--echo); }
.prompt-grid svg { width: 19px; height: 19px; margin-top: 1px; color: var(--ink-soft); stroke-width: 1.7; }

.emergence-section {
  --symphony-progress: 0;
  --symphony-shift: 0px;
  --symphony-gather-one: 0px;
  --symphony-gather-two: 0px;
  --symphony-gather-four: 0px;
  --symphony-gather-five: 0px;
  --emergent-offset: 24px;
  --emergent-blur: 9px;
  position: relative;
  min-height: 720px;
  padding: 38px max(28px, calc((100% - 1080px) / 2)) 74px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.emergence-copy {
  width: min(780px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .82fr);
  gap: 30px 72px;
  align-items: end;
}
.emergence-kicker {
  grid-column: 1 / -1;
  margin: 0 0 -15px;
  color: var(--echo);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}
.emergence-copy h2 { margin: 0; font-size: 36px; font-weight: 620; line-height: 1.12; letter-spacing: 0; }
.emergence-copy > p:last-child { margin: 0 0 2px; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.symphony-score {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(310px, 1.2fr) 116px minmax(250px, .75fr);
  gap: 28px;
  align-items: center;
  margin: 70px auto 60px;
}
.voice-staves { min-width: 0; display: grid; gap: 7px; padding: 0 0 0 2px; }
.score-voice {
  --voice-color: var(--tracer-sky);
  --voice-gather: 0px;
  min-width: 0;
  height: 38px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: var(--voice-color);
  opacity: .88;
  transform: translate(var(--symphony-shift), var(--voice-gather));
  transition: opacity .18s linear;
}
.score-voice > span { color: var(--ink-soft); font: 9px/1 var(--mono); font-variant-numeric: tabular-nums; opacity: var(--voice-label-opacity, 1); }
.score-voice > div {
  position: relative;
  height: 30px;
  display: flex;
  align-items: center;
  gap: clamp(7px, 1.4vw, 14px);
  border-bottom: 1px solid var(--line);
}
.score-voice i {
  position: relative;
  bottom: -1px;
  width: 4px;
  height: 36%;
  flex: 0 0 4px;
  transform-origin: center bottom;
  border-radius: 1px 1px 0 0;
  background: currentColor;
}
.score-voice i:nth-child(2), .score-voice i:nth-child(8) { height: 68%; }
.score-voice i:nth-child(3), .score-voice i:nth-child(7) { height: 42%; }
.score-voice i:nth-child(4), .score-voice i:nth-child(10) { height: 88%; }
.score-voice i:nth-child(5) { height: 54%; }
.score-voice i:nth-child(6) { height: 100%; }
.score-voice i:nth-child(9) { height: 76%; }
.score-voice i:nth-child(11) { height: 48%; }
.score-voice-one { --voice-color: var(--tracer-sky); --voice-gather: var(--symphony-gather-one); }
.score-voice-two { --voice-color: var(--echo); --voice-gather: var(--symphony-gather-two); }
.score-voice-three { --voice-color: var(--tracer-orange); }
.score-voice-four { --voice-color: var(--tracer-red); --voice-gather: var(--symphony-gather-four); }
.score-voice-five { --voice-color: var(--yellow); --voice-gather: var(--symphony-gather-five); }
.score-voice-two i:nth-child(3n), .score-voice-four i:nth-child(2n) { height: 94%; }
.score-voice-three i:nth-child(3n + 1), .score-voice-five i:nth-child(4n + 1) { height: 72%; }
.symphony-convergence {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.symphony-convergence span { height: 1px; background: var(--line-strong); transform: scaleX(var(--symphony-progress)); }
.symphony-convergence span:first-child { transform-origin: right center; }
.symphony-convergence span:last-child { transform-origin: left center; }
.symphony-convergence strong { color: var(--ink-soft); font-size: 9px; font-weight: 700; white-space: nowrap; }
.emergent-phrase {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateX(var(--emergent-offset));
  filter: blur(var(--emergent-blur));
  opacity: var(--symphony-progress);
}
.emergent-phrase p { margin: 0 0 16px; color: var(--ink); font-size: 13px; font-weight: 760; }
.emergent-phrase > span { margin-top: 15px; color: var(--ink-soft); font-size: 9px; }
.emergent-bars { height: 106px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.emergent-bars i {
  width: 5px;
  height: 44%;
  flex: 0 0 5px;
  border-radius: 1px;
  background: var(--tracer-sky);
  transform: scaleY(var(--symphony-progress));
  transform-origin: center;
}
.emergent-bars i:nth-child(5n + 1) { height: 34%; background: var(--tracer-sky); }
.emergent-bars i:nth-child(5n + 2) { height: 68%; background: var(--echo); }
.emergent-bars i:nth-child(5n + 3) { height: 92%; background: var(--tracer-orange); }
.emergent-bars i:nth-child(5n + 4) { height: 54%; background: var(--tracer-red); }
.emergent-bars i:nth-child(5n) { height: 78%; background: var(--yellow); }
.emergent-bars i:nth-child(3), .emergent-bars i:nth-child(8), .emergent-bars i:nth-child(13) { height: 100%; }
.emergence-equation {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin: 0 auto;
  padding-top: 25px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
}
.emergence-equation strong { color: var(--echo); font: 720 24px/1 var(--sans); }
.emergence-equation span:last-child { text-align: right; }

.message {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}
.message:last-child { border-bottom: 0; }
.message-avatar {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--paper);
  font: 800 9px/1 var(--mono);
}
.message.assistant .message-avatar { border-color: rgba(255, 253, 247, .16); background: var(--rail); color: var(--echo-bright); }
.message-avatar .tracer-echo-mark { --mark-h: 12px; --bar-w: 1px; --bar-gap: 1px; }
.message-main { min-width: 0; }
.message-header { min-height: 24px; display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.message-header strong { font-size: 13px; }
.message-time { color: var(--ink-soft); font: 10px/1 var(--mono); }
.message-body { color: var(--ink); font-size: 15px; line-height: 1.68; overflow-wrap: anywhere; }
.message.user .message-body { white-space: pre-wrap; }
.message-body > :first-child { margin-top: 0; }
.message-body > :last-child { margin-bottom: 0; }
.message-body p, .message-body ul, .message-body ol, .message-body blockquote, .message-body pre, .message-body table { margin: 0 0 15px; }
.message-body h1, .message-body h2, .message-body h3 { margin: 23px 0 10px; line-height: 1.25; letter-spacing: 0; }
.message-body h1 { font-size: 22px; }
.message-body h2 { font-size: 19px; }
.message-body h3 { font-size: 16px; }
.message-body ul, .message-body ol { padding-left: 23px; }
.message-body li { margin: 4px 0; }
.message-body a { color: var(--sky); text-decoration: underline; text-underline-offset: 2px; }
.message-body .web-citation-marker {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  margin: 0 1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  background: transparent;
  text-decoration: none;
  vertical-align: -0.12em;
}
.web-citation-favicon-frame,
.web-source-favicon-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 3px;
  background: var(--paper);
}
.web-citation-favicon-frame {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.web-source-favicon-frame {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1px solid var(--line);
}
.web-citation-favicon,
.web-source-favicon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--paper);
}
.favicon-unavailable { visibility: hidden; }
.message-body .web-citation-marker:hover {
  background: color-mix(in srgb, var(--sky) 14%, var(--paper));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--sky) 42%, var(--line));
}
.web-sources {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.web-sources-label {
  padding-top: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.web-sources-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.web-source-link {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
  max-width: min(100%, 330px);
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease;
}
.web-source-link:hover {
  border-color: color-mix(in srgb, var(--green) 54%, var(--line));
  background: color-mix(in srgb, var(--green) 5%, var(--paper));
}
.file-source-chip {
  cursor: default;
  grid-template-columns: 16px minmax(0, 1fr);
}
.file-source-chip:hover {
  border-color: var(--line);
  background: var(--paper);
}
.web-source-copy { min-width: 0; display: grid; gap: 2px; }
.web-source-title {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.web-source-domain {
  overflow: hidden;
  color: var(--muted);
  font: 650 8px/1.2 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.web-source-link svg { width: 13px; height: 13px; color: var(--muted); }
@media (max-width: 720px) {
  .web-sources { grid-template-columns: 1fr; gap: 7px; }
  .web-sources-label { padding-top: 0; }
  .web-source-link { max-width: 100%; }
}
.message-body blockquote { padding-left: 15px; border-left: 3px solid var(--amber); color: var(--ink-mid); }
.message-body code { padding: 1px 5px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper-soft); font: 13px/1.5 var(--mono); }
.message-body pre { position: relative; max-width: 100%; overflow: auto; padding: 42px 16px 16px; border-radius: 6px; background: var(--code-bg); color: var(--code-ink); }
.message-body pre code { padding: 0; border: 0; background: transparent; color: inherit; font-size: 12.5px; white-space: pre; }
.message-body .echo-math { color: inherit; overflow-wrap: normal; }
.message-body .echo-math-inline {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  vertical-align: -0.14em;
  -webkit-overflow-scrolling: touch;
}
.message-body .echo-math-display {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 15px 0;
  padding: 3px 0 5px;
  overflow-x: auto;
  overflow-y: hidden;
  text-align: center;
  -webkit-overflow-scrolling: touch;
}
.message-body .echo-math-display .katex-display {
  width: max-content;
  min-width: 100%;
  margin: 0;
}
.message-body .katex { font-size: 1.04em; line-height: 1.25; }
.message-body .echo-math-error { color: var(--red); font-family: var(--mono); }
.message-body.streaming::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 15px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--echo);
  animation: cursor-blink .75s steps(1, end) infinite;
}
.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 1px 0 10px;
}
.message-attachment {
  max-width: min(320px, 100%);
  min-height: 38px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper-soft);
}
.message-attachment.has-image-preview {
  min-height: 54px;
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 5px 9px 5px 5px;
}
.message-attachment > .attachment-thumbnail {
  width: 42px;
  height: 42px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 3px;
  object-fit: cover;
  background: var(--paper);
}
.message-attachment > svg { width: 16px; height: 16px; color: var(--echo); }
.message-attachment > span { min-width: 0; display: grid; gap: 1px; }
.message-attachment strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.message-attachment small { color: var(--ink-soft); font-size: 9px; }
.code-copy { position: absolute; top: 7px; right: 7px; min-height: 28px; padding: 4px 9px; border: 1px solid rgba(255,255,255,.18); border-radius: 4px; background: rgba(16,21,16,.86); color: #cad7c6; font: 11px/1 var(--mono); cursor: pointer; }
.code-copy:hover { color: white; border-color: rgba(255,255,255,.5); }
.message-body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.message-body th, .message-body td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; }
@media (max-width: 720px) {
  .message-body th, .message-body td { white-space: nowrap; }
}
.message-body th { background: var(--paper-soft); }
.message-actions { min-height: 36px; display: flex; align-items: center; gap: 2px; margin-top: 9px; }
.message-actions .icon-button { position: relative; width: 34px; height: 34px; flex-basis: 34px; color: var(--ink-soft); }
.message-actions svg { width: 15px; height: 15px; }
.message-actions .icon-button.danger:hover,
.message-actions .icon-button.danger:focus-visible { border-color: color-mix(in srgb, var(--red) 55%, var(--line)); color: var(--red); }
.message-actions .icon-button:disabled { cursor: wait; opacity: .42; }
.message-actions .icon-button::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  z-index: 5;
  width: max-content;
  max-width: 220px;
  padding: 6px 8px;
  border-radius: 4px;
  background: var(--rail);
  color: var(--rail-ink);
  box-shadow: 0 6px 18px rgba(23,26,22,.15);
  font: 10px/1.25 var(--sans);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 3px);
  transition: opacity .12s ease, transform .12s ease;
}
@media (hover: hover) and (pointer: fine) {
  .message-actions .icon-button:hover::after { opacity: 1; transform: translate(-50%, 0); }
}
.message-actions .icon-button:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.message.error .message-body { color: var(--red); }
.completion-error-actions { display: flex; margin-top: 10px; }
.completion-error-actions .completion-error-retry { min-width: 92px; }
.credit-depletion-actions { flex-wrap: wrap; gap: 8px; }
.credit-depletion-actions .primary-button,
.credit-depletion-actions .secondary-button {
  min-height: 38px;
  padding: 8px 12px;
  text-decoration: none;
}
.guest-auth-gate {
  max-width: 560px;
  display: grid;
  gap: 9px;
  padding: 17px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper-soft);
}
.guest-auth-gate > strong { font-size: 15px; line-height: 1.3; }
.guest-auth-gate > p { margin: 0; color: var(--ink-mid); font-size: 13px; line-height: 1.5; }
.guest-auth-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.guest-auth-actions button { min-height: 38px; padding: 8px 14px; }
.message.history-pending { opacity: .55; }
.message.history-mutation-target { opacity: 1; }
.message-edit-form { display: grid; gap: 10px; width: min(100%, 760px); }
.message-edit-input {
  width: 100%;
  min-height: 92px;
  max-height: 360px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid var(--echo);
  border-radius: 5px;
  outline: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
}
.message-edit-input:focus { box-shadow: 0 0 0 2px color-mix(in srgb, var(--echo) 18%, transparent); }
.message-edit-actions { display: flex; justify-content: flex-end; gap: 8px; }
.message-edit-actions button,
.message-delete-actions button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper-soft);
}
.message-edit-actions .primary-button { border-color: var(--echo); background: var(--echo); color: white; }
.message-edit-actions button:hover { border-color: var(--ink-soft); }
.message-edit-actions .primary-button:hover { border-color: var(--echo-dark); background: var(--echo-dark); }
.message-delete-confirmation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(100%, 760px);
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--red) 45%, var(--line));
  border-radius: 5px;
  background: color-mix(in srgb, var(--red) 5%, var(--paper));
}
.message-delete-confirmation > div:first-child { display: grid; gap: 3px; min-width: 0; }
.message-delete-confirmation strong { color: var(--ink); font-size: 12px; }
.message-delete-confirmation span { color: var(--ink-soft); font-size: 11px; line-height: 1.35; }
.message-delete-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.message-delete-actions .danger-button { border-color: var(--red); background: var(--red); color: white; }
.message-delete-actions .danger-button:hover { filter: brightness(.92); }
.message-action-status,
.message-action-error {
  width: min(100%, 760px);
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.4;
}
.message-action-status { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); }
.message-action-status svg { width: 14px; height: 14px; animation: message-action-spin .85s linear infinite; }
.message-action-error { color: var(--red); }
@keyframes message-action-spin { to { transform: rotate(360deg); } }

.thinking-state {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 12px;
}
.thinking-glyph {
  --mark-h: 18px;
  --bar-w: 2px;
  --bar-gap: 1px;
  width: 24px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.thinking-glyph i {
  animation: echo-thinking-dot 1.35s ease-in-out infinite;
}
.thinking-glyph i:nth-child(1) { animation-delay: 0s; }
.thinking-glyph i:nth-child(2) { animation-delay: .06s; }
.thinking-glyph i:nth-child(3) { animation-delay: .12s; }
.thinking-glyph i:nth-child(4) { animation-delay: .18s; }
.thinking-glyph i:nth-child(5) { animation-delay: .24s; }
.thinking-label { color: var(--ink-mid); font-weight: 650; }
.thinking-elapsed { color: var(--ink-soft); font: 10px/1 var(--mono); }
@keyframes echo-thinking-dot { 0%, 70%, 100% { transform: scaleY(.6); opacity: .48; } 28% { transform: scaleY(1); opacity: 1; } }
@keyframes cursor-blink { 0%, 48% { opacity: 1; } 49%, 100% { opacity: 0; } }
@keyframes symphony-arrive { from { transform: scaleY(.25); opacity: .25; } to { transform: scaleY(1); opacity: 1; } }

.composer-shell { padding: 12px 24px calc(14px + env(safe-area-inset-bottom)); background: var(--bg); }
.long-wait-game-prompt,
.echo-runner {
  width: min(var(--composer-max), 100%);
  margin-right: auto;
  margin-left: auto;
}
.long-wait-game-prompt[hidden], .echo-runner[hidden],
.echo-runner-leaderboard-panel[hidden], .echo-runner-join-form[hidden] { display: none; }
.long-wait-game-prompt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 4px 34px 7px 2px;
  border: 0;
  background: transparent;
  color: var(--ink-mid);
  font-size: 10px;
  line-height: 1.4;
}
.long-wait-game-prompt::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong) 12%, var(--line-strong) 88%, transparent); }
.long-wait-game-art {
  width: 46px;
  height: 28px;
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(134,185,142,.35);
  border-radius: 999px;
  background: linear-gradient(145deg, #0b110d, #17271c);
  box-shadow: inset 0 0 16px rgba(79,139,89,.13);
}
.long-wait-game-art::after { content: ""; position: absolute; right: 5px; bottom: 7px; width: 6px; height: 9px; border-radius: 1px; background: var(--echo-red); box-shadow: 0 -3px 0 -1px var(--echo-orange); }
.long-wait-game-art > i { position: absolute; bottom: 8px; width: 3px; border-radius: 1px; transform-origin: bottom; animation: runner-mini-pulse 1.1s ease-in-out infinite alternate; }
.long-wait-game-art > i:nth-child(1) { left: 10px; height: 8px; background: var(--echo-blue); }
.long-wait-game-art > i:nth-child(2) { left: 14px; height: 13px; background: var(--echo-orange); animation-delay: .12s; }
.long-wait-game-art > i:nth-child(3) { left: 18px; height: 10px; background: var(--echo-red); animation-delay: .24s; }
.long-wait-game-art > i:nth-child(4) { left: 22px; height: 15px; background: var(--echo-green); animation-delay: .36s; }
.long-wait-game-art > b { position: absolute; right: 0; bottom: 5px; left: 0; height: 1px; background: rgba(238,244,236,.22); }
.long-wait-game-copy { min-width: 0; flex: 1 1 auto; display: flex; align-items: baseline; gap: 6px; }
.long-wait-game-copy strong { color: var(--ink); font-size: 10.5px; }
.long-wait-game-copy span { color: var(--ink-soft); }
.long-wait-game-prompt button { border: 0; background: transparent; color: var(--echo-dark); font: 760 10.5px/1.3 var(--sans); cursor: pointer; white-space: nowrap; }
.long-wait-game-prompt button:hover { text-decoration: underline; text-underline-offset: 3px; }
.long-wait-game-dismiss { position: absolute; top: 1px; right: 0; width: 28px; height: 28px; color: var(--ink-soft) !important; font-size: 18px !important; }
@keyframes runner-mini-pulse { from { transform: scaleY(.72); opacity: .72; } to { transform: scaleY(1); opacity: 1; } }
.echo-runner {
  max-height: min(470px, calc(100dvh - var(--topbar) - 150px));
  margin-bottom: 10px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 18px 46px rgba(10,14,11,.16);
}
.echo-runner-header, .echo-runner-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; }
.echo-runner-header { min-height: 58px; border-bottom: 1px solid var(--line); background: linear-gradient(105deg, color-mix(in srgb, var(--paper) 92%, var(--echo-green) 8%), var(--paper)); }
.echo-runner-title { min-width: 0; display: flex; align-items: center; gap: 10px; }
.echo-runner-title > span:last-child { min-width: 0; display: grid; gap: 3px; }
.echo-runner-title small { color: var(--echo); font: 760 7.5px/1 var(--mono); letter-spacing: .09em; }
.echo-runner-header strong { font-size: 13px; }
.echo-runner-readout { display: flex; align-items: center; gap: 0; margin-left: auto; color: var(--ink-soft); font: 700 7.5px/1 var(--mono); letter-spacing: .04em; }
.echo-runner-readout > span { min-width: 72px; display: grid; gap: 5px; padding: 2px 11px; border-left: 1px solid var(--line); }
.echo-runner-readout b { color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.echo-runner-close { width: 32px; height: 32px; padding: 0; border: 0; background: transparent; color: var(--ink-soft); font-size: 20px; cursor: pointer; }
.echo-runner-close:hover { color: var(--ink); }
.echo-runner-stage { position: relative; overflow: hidden; background: #0b100d; }
.echo-runner-stage-label, .echo-runner-stage-live { position: absolute; z-index: 1; top: 10px; color: rgba(238,244,236,.56); font: 700 7.5px/1 var(--mono); letter-spacing: .08em; pointer-events: none; }
.echo-runner-stage-label { left: 12px; }
.echo-runner-stage-live { right: 12px; display: inline-flex; align-items: center; gap: 5px; }
.echo-runner-stage-live i { width: 5px; height: 5px; border-radius: 50%; background: var(--echo-green); box-shadow: 0 0 8px rgba(79,139,89,.8); animation: runner-live-pulse 1.3s ease-in-out infinite; }
.echo-runner canvas { width: 100%; height: 190px; display: block; touch-action: manipulation; cursor: pointer; }
@keyframes runner-live-pulse { 50% { opacity: .35; transform: scale(.75); } }
.echo-runner-footer { min-height: 50px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 9.5px; }
.echo-runner-footer > div { display: flex; gap: 7px; }
.echo-runner-footer button, .echo-runner-join-form button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-mid);
  font: 740 9.5px/1 var(--sans);
  cursor: pointer;
}
.echo-runner-footer button:first-child { min-width: 86px; border-color: #1b3421; background: linear-gradient(135deg, #102116, #21402a); color: #f3f7f2; box-shadow: 0 5px 14px rgba(20,48,28,.18); }
.echo-runner-leaderboard-panel, .echo-runner-join-form { padding: 12px; border-top: 1px solid var(--line); }
.echo-runner-leaderboard-panel > strong { font-size: 11px; }
.echo-runner-leaderboard-panel ol { max-height: 132px; margin: 8px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.echo-runner-leaderboard-panel li { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 10px; }
.echo-runner-leaderboard-panel li span { color: var(--ink-soft); font: 700 9px/1.4 var(--mono); }
.echo-runner-leaderboard-panel li b { font-variant-numeric: tabular-nums; }
.echo-runner-join-form { display: grid; grid-template-columns: minmax(150px,.8fr) minmax(220px,1.4fr) auto; align-items: end; gap: 9px 14px; }
.echo-runner-join-form > label:first-child { display: grid; gap: 5px; color: var(--ink-soft); font-size: 9px; font-weight: 720; }
.echo-runner-join-form input[type="text"], .echo-runner-join-form input:not([type]) { min-height: 34px; padding: 7px 9px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); }
.echo-runner-consent { align-self: center; color: var(--ink-mid); font-size: 9.5px; line-height: 1.35; }
.echo-runner-join-form small { grid-column: 1 / -1; color: var(--ink-soft); font-size: 8.5px; }
.chat-lane-switcher {
  position: relative;
  width: auto;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0 1px 0 0;
  padding-right: 8px;
  border-right: 1px solid var(--line);
}
.chat-lane-switcher[hidden] { display: none; }
.chat-lane-buttons { min-height: 32px; display: inline-flex; align-items: center; gap: 3px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.chat-lane-buttons button { position: relative; min-width: 34px; min-height: 28px; padding: 0 3px; border: 0; border-radius: 0; background: transparent; color: var(--ink-soft); text-align: center; cursor: pointer; transition: color .18s ease, opacity .18s ease; }
.chat-lane-buttons button::after { content: ""; position: absolute; right: 5px; bottom: 1px; left: 5px; height: 1.5px; border-radius: 2px; background: transparent; transform: scaleX(.25); transition: background .18s ease, transform .22s cubic-bezier(.2,.8,.2,1); }
.chat-lane-buttons button[aria-pressed="true"] { color: var(--ink); }
.chat-lane-buttons button[aria-pressed="true"]::after { background: var(--echo); transform: scaleX(1); }
.chat-lane-buttons[data-active-lane="lite"] button[aria-pressed="true"]::after { background: var(--echo-blue); }
.chat-lane-buttons button:disabled { cursor: not-allowed; opacity: .5; }
.chat-lane-buttons button[aria-disabled="true"]:not(:disabled) { opacity: .68; }
.chat-lane-buttons button span { font-size: 10px; font-weight: 720; line-height: 1; }
.chat-lane-signal { width: 28px; height: 24px; position: relative; flex: 0 0 auto; overflow: hidden; border: 0; border-radius: 8px; background: color-mix(in srgb, var(--echo-dark) 92%, #08100a); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); transition: background .24s ease, box-shadow .24s ease; }
.chat-lane-signal > span { position: absolute; top: 5px; left: 5px; width: 18px; height: 14px; display: flex; align-items: center; justify-content: center; gap: 1.5px; transition: transform .26s cubic-bezier(.2,.8,.2,1); }
.chat-lane-signal i { width: 2px; border-radius: 2px; transform-origin: center; animation: chat-lane-pulse 1.8s ease-in-out infinite; }
.chat-lane-signal i:nth-child(1) { height: 5px; background: var(--echo-blue); }
.chat-lane-signal i:nth-child(2) { height: 9px; background: var(--echo-orange); animation-delay: .08s; }
.chat-lane-signal i:nth-child(3) { height: 13px; background: var(--echo-red); animation-delay: .16s; }
.chat-lane-signal i:nth-child(4) { height: 10px; background: var(--echo-green); animation-delay: .24s; }
.chat-lane-signal i:nth-child(5) { height: 6px; background: var(--echo-blue); animation-delay: .32s; }
.chat-lane-buttons[data-active-lane="lite"] .chat-lane-signal { background: color-mix(in srgb, var(--echo-blue) 20%, var(--paper)); box-shadow: inset 0 0 0 1px rgba(63,168,232,.34); }
.chat-lane-buttons[data-active-lane="lite"] .chat-lane-signal i { transform: scaleY(.62); opacity: .88; }
@keyframes chat-lane-pulse { 0%,100% { filter: brightness(.9); } 50% { filter: brightness(1.25); } }
.chat-lane-detail { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.chat-lane-nudge { position: absolute; right: -54px; bottom: calc(100% + 13px); z-index: 8; width: min(300px, calc(100vw - 32px)); display: grid; grid-template-columns: minmax(0,1fr) auto 24px; align-items: center; gap: 9px; padding: 10px 9px 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); box-shadow: 0 14px 36px rgba(20,25,20,.16); color: var(--ink-mid); }
.chat-lane-nudge::after { content: ""; position: absolute; right: 67px; bottom: -5px; width: 9px; height: 9px; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); background: var(--paper); transform: rotate(45deg); }
.chat-lane-nudge[hidden] { display: none; }
.chat-lane-nudge > span { min-width: 0; display: grid; gap: 2px; }
.chat-lane-nudge strong { color: var(--ink); font-size: 10.5px; line-height: 1.2; }
.chat-lane-nudge small { color: var(--ink-soft); font-size: 9px; line-height: 1.35; }
.chat-lane-nudge a { position: relative; z-index: 1; color: var(--echo); font-size: 9.5px; font-weight: 780; white-space: nowrap; }
.chat-lane-nudge button { position: relative; z-index: 1; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--ink-soft); font: 400 18px/1 var(--sans); cursor: pointer; }
.composer {
  width: min(var(--composer-max), 100%);
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin: 0 auto;
  padding: 9px 9px 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(23,26,22,.06);
}
.composer:focus-within { border-color: var(--echo); box-shadow: 0 8px 28px rgba(39,78,48,.1); }
.attachment-tray {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 0 3px;
}
.attachment-tray[hidden] { display: none; }
.pending-attachment {
  width: min(260px, 100%);
  min-height: 40px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 7px;
  padding: 5px 5px 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper-soft);
}
.pending-attachment.has-image-preview {
  min-height: 46px;
  grid-template-columns: 36px minmax(0, 1fr) 28px;
  padding-left: 5px;
}
.pending-attachment > .attachment-thumbnail {
  width: 36px;
  height: 36px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 3px;
  object-fit: cover;
  background: var(--paper);
}
.pending-attachment > svg { width: 16px; height: 16px; color: var(--echo); }
.pending-attachment > span { min-width: 0; display: grid; gap: 1px; }
.pending-attachment strong { overflow: hidden; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.pending-attachment small { color: var(--ink-soft); font-size: 9px; }
.pending-attachment .icon-button { width: 28px; height: 28px; flex-basis: 28px; }
.composer textarea {
  width: 100%;
  min-height: 36px;
  max-height: 190px;
  resize: none;
  overflow-y: auto;
  padding: 7px 0 5px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  line-height: 1.45;
}
.composer textarea::placeholder { color: #969d93; }
.composer-actions { display: flex; align-items: center; gap: 7px; }
.composer-attachment-button { width: 36px; height: 36px; flex-basis: 36px; }
.composer-attachment-button svg { width: 17px; height: 17px; }
.input-count { color: var(--ink-soft); font: 10px/1 var(--mono); }
.input-count.warn { color: var(--red); }
.send-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--rail);
  color: white;
  cursor: pointer;
}
.send-button:hover { background: var(--echo); }
.send-button:disabled { background: var(--line); color: var(--ink-soft); cursor: default; }
.send-button.stop { background: var(--red); }
.send-button svg { width: 18px; height: 18px; stroke-width: 2.1; }
.composer-note { width: min(var(--composer-max), 100%); margin: 7px auto 0; color: var(--ink-soft); font-size: 10.5px; text-align: center; }
.composer-note strong { color: var(--ink-mid); }
.composer-legal-links { margin-left: .35em; white-space: nowrap; }
.composer-legal-links a { color: inherit; text-underline-offset: 2px; }
.composer-legal-links a:hover, .composer-legal-links a:focus-visible { color: var(--ink); }
.chat-start {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px 130px;
  text-align: center;
}
.tracer-echo-mark-chat-start { --mark-h: 42px; --bar-w: 4px; --bar-gap: 4px; }
.chat-start h1 { margin: 4px 0 0; font-size: 38px; line-height: 1; }
.chat-start p { margin: 0; color: var(--ink-soft); font-size: 14px; }

.settings-dialog {
  width: min(720px, calc(100% - 32px));
  height: min(720px, calc(100dvh - 32px));
  max-width: 720px;
  max-height: 720px;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(23,26,22,.24);
}
.settings-dialog::backdrop { background: rgba(15,18,14,.58); }
.invite-welcome-dialog {
  position: fixed;
  inset: auto max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) auto;
  width: min(410px, calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  max-width: 410px;
  max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--echo);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 36px rgba(23,26,22,.2);
}
.invite-welcome-dialog::backdrop { background: transparent; }
.invite-welcome-layout { display: grid; }
.invite-welcome-header { min-height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 0 15px; }
.invite-welcome-header .icon-button { width: 36px; height: 36px; flex-basis: 36px; }
.invite-welcome-body { padding: 2px 18px 16px; }
.invite-welcome-body h2 { max-width: 340px; margin: 3px 0 7px; font-size: 18px; line-height: 1.2; letter-spacing: 0; }
.invite-welcome-body > p:not(.settings-kicker) { max-width: 360px; margin: 0; color: var(--ink-mid); font-size: 12px; line-height: 1.5; }
.invite-welcome-count { width: max-content; display: flex; align-items: baseline; gap: 7px; margin-top: 12px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper-soft); }
.invite-welcome-count strong { font-size: 19px; font-weight: 690; line-height: 1; }
.invite-welcome-count span { color: var(--ink-mid); font-size: 10px; font-weight: 720; }
.invite-welcome-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--paper-soft); }
.invite-welcome-actions > div { display: flex; align-items: center; gap: 8px; }
.invite-welcome-actions .quiet-action { padding-inline: 5px; border-color: transparent; background: transparent; color: var(--ink-soft); font-size: 10px; }
.invite-welcome-actions .quiet-action:hover { color: var(--ink); }
.settings-layout { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.settings-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px 12px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.settings-title-lockup { min-width: 0; display: flex; align-items: center; gap: 11px; }
.settings-title-lockup > div { min-width: 0; }
.settings-title-lockup p, .settings-title-lockup h2 { margin: 0; letter-spacing: 0; }
.settings-title-lockup p { color: var(--echo); font-size: 10px; font-weight: 750; }
.settings-title-lockup h2 { font-size: 18px; line-height: 1.25; }
.settings-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.account-summary {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-soft);
}
.settings-kicker { margin: 0 0 4px; color: var(--ink-soft); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: 0; }
.account-summary strong { display: block; max-width: 460px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.session-status { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; color: var(--ink-mid); font-size: 11px; font-weight: 700; }
.session-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--echo-bright); box-shadow: 0 0 0 3px rgba(114,167,120,.13); }
.usage-section, .api-key-section { padding: 25px 24px 32px; border-bottom: 1px solid var(--line); }
.settings-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.settings-section-heading h3 { margin: 0; font-size: 19px; line-height: 1.25; letter-spacing: 0; }
.billing-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
}
.billing-badge.active { border-color: #a9c2a4; color: var(--echo); }
.account-loading { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); }
.account-loading span { display: block; height: 72px; background: var(--paper-soft); animation: key-loading-pulse 1.15s ease-in-out infinite alternate; }
.account-loading span:nth-child(2) { animation-delay: .12s; }
.account-loading span:nth-child(3) { animation-delay: .24s; }
.account-error-state { min-height: 128px; border: 1px solid var(--line); }
.billing-notice {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0 15px;
  border-bottom: 1px solid var(--line);
}
.billing-notice > svg { width: 19px; height: 19px; color: var(--echo); stroke-width: 1.7; }
.billing-notice > div { min-width: 0; display: flex; flex-direction: column; }
.billing-notice strong { font-size: 12px; }
.billing-notice span { color: var(--ink-soft); font-size: 10px; }
.usage-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.usage-metrics > div { min-width: 0; padding: 17px 14px 17px 0; }
.usage-metrics > div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.usage-metrics span { display: block; margin-bottom: 5px; color: var(--ink-soft); font-size: 10px; }
.usage-metrics strong { display: block; overflow: hidden; font-size: 17px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.usage-limit-list { display: grid; gap: 15px; padding: 17px 0 7px; }
.usage-limit-list > div > span { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 7px; color: var(--ink-soft); font-size: 10px; }
.usage-limit-list > div > span strong { color: var(--ink-mid); font-weight: 700; }
.usage-limit-list progress { width: 100%; height: 5px; display: block; overflow: hidden; border: 0; border-radius: 2px; background: var(--paper-soft); color: var(--echo); }
.usage-limit-list progress::-webkit-progress-bar { background: var(--paper-soft); }
.usage-limit-list progress::-webkit-progress-value { background: var(--echo); }
.usage-limit-list progress::-moz-progress-bar { background: var(--echo); }
.usage-footnote { margin: 7px 0 0; color: var(--ink-soft); font-size: 9.5px; line-height: 1.5; }
.legal-account-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px calc(24px + env(safe-area-inset-bottom));
}
.legal-account-section h3 { margin: 0 0 5px; font-size: 15px; letter-spacing: 0; }
.legal-account-section p:not(.settings-kicker) { margin: 0; color: var(--ink-soft); font-size: 10px; }
.legal-account-section nav { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px 14px; }
.legal-account-section a { color: var(--ink-mid); font-size: 10px; text-underline-offset: 2px; }
.legal-account-section a:hover { color: var(--echo); }
.key-create-form { margin-bottom: 24px; }
.key-create-form > label { display: block; margin-bottom: 7px; color: var(--ink-mid); font-size: 12px; font-weight: 700; }
.key-create-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.key-create-controls input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  outline: 0;
  background: var(--paper);
  color: var(--ink);
}
.key-create-controls input:focus { border-color: var(--echo); box-shadow: 0 0 0 3px rgba(77,120,83,.1); }
.key-create-controls input::placeholder { color: #969d93; }
.primary-button, .secondary-button, .copy-key-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.primary-button { border: 1px solid var(--rail); background: var(--rail); color: white; }
.primary-button:hover { border-color: var(--echo); background: var(--echo); }
.secondary-button, .copy-key-button { border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-mid); }
.secondary-button:hover, .copy-key-button:hover { border-color: var(--echo); color: var(--echo); }
.primary-button:disabled, .secondary-button:disabled, .copy-key-button:disabled { opacity: .55; cursor: default; }
.primary-button svg, .secondary-button svg, .copy-key-button svg { width: 16px; height: 16px; }
.key-reveal {
  margin: 0 0 22px;
  padding: 15px;
  border: 1px solid #b9cbb7;
  border-radius: 6px;
  background: #f1f6ef;
}
.key-reveal-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.key-reveal-heading > div { min-width: 0; display: flex; flex-direction: column; }
.key-reveal-heading strong { font-size: 13px; }
.key-reveal-heading span { color: var(--ink-soft); font-size: 11px; }
.key-secret-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.key-secret-row code { min-width: 0; overflow-x: auto; padding: 10px 11px; border: 1px solid #cbd8c8; border-radius: 4px; background: var(--paper); color: var(--ink); font: 12px/1.4 var(--mono); white-space: nowrap; scrollbar-width: thin; }
.settings-feedback { margin: 0 0 18px; padding: 10px 12px; border-left: 3px solid var(--red); background: #fff4f2; color: #8e2f29; font-size: 12px; }
.settings-feedback.success { border-left-color: var(--echo); background: #f1f6ef; color: #355b3e; }
.key-loading { display: grid; gap: 1px; border-top: 1px solid var(--line); }
.key-loading span { display: block; height: 70px; border-bottom: 1px solid var(--line); background: var(--paper-soft); animation: key-loading-pulse 1.15s ease-in-out infinite alternate; }
.key-loading span:nth-child(2) { animation-delay: .15s; }
@keyframes key-loading-pulse { from { opacity: .42; } to { opacity: 1; } }
.key-error-state, .key-empty-state { min-height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border-top: 1px solid var(--line); color: var(--ink-soft); text-align: center; }
.key-error-state > svg, .key-empty-state > svg { width: 22px; height: 22px; stroke-width: 1.6; }
.key-error-state p, .key-empty-state p { margin: 0; font-size: 12px; }
.api-key-list { border-top: 1px solid var(--line); }
.api-key-row { min-height: 76px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.api-key-row:last-child { border-bottom: 0; }
.api-key-main { min-width: 0; }
.api-key-title { display: flex; align-items: center; gap: 9px; min-width: 0; margin-bottom: 5px; }
.api-key-title strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.api-key-status { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; color: var(--ink-soft); font-size: 10px; }
.api-key-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--echo-bright); }
.api-key-status.revoked i { background: var(--red); }
.api-key-status.expired i { background: var(--amber); }
.api-key-prefix { display: block; overflow: hidden; margin-bottom: 3px; color: var(--ink-mid); font: 11px/1.35 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.api-key-meta { color: var(--ink-soft); font-size: 10px; }
.api-key-revoke { color: var(--ink-soft); }
.api-key-revoke:hover { border-color: #e4bbb7; background: #fff4f2; color: var(--red); }

.menu-popover {
  position: fixed;
  top: 58px;
  right: auto;
  left: auto;
  width: 264px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 14px 38px rgba(23,26,22,.15);
  z-index: 60;
}
.menu-popover [hidden] { display: none !important; }
.menu-account-summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 7px 9px 9px;
}
.menu-account-avatar { width: 34px; height: 34px; font-size: 12px; }
.menu-account-copy { min-width: 0; display: grid; gap: 2px; }
.menu-account-copy strong { color: var(--ink); font-size: 11px; line-height: 1.2; }
.menu-account-copy small { overflow: hidden; color: var(--ink-soft); font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.menu-divider { height: 1px; margin: 5px 4px; background: var(--line); }
.menu-section-label { margin: 10px 10px 3px; color: var(--ink-soft); font: 700 8px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.menu-popover button { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; }
.menu-popover button:hover { background: var(--paper-soft); }
.menu-popover button > span { color: var(--ink-mid); font-size: 11.5px; font-weight: 650; }
.menu-popover button:hover > span { color: var(--ink); }
.menu-popover svg { width: 16px; height: 16px; color: var(--ink-soft); stroke-width: 1.8; }
.menu-legal-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 5px 4px 1px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.menu-legal-links a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 650;
  text-underline-offset: 2px;
}
.menu-legal-links a:hover, .menu-legal-links a:focus-visible { background: var(--paper-soft); color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: calc(102px + env(safe-area-inset-bottom)); max-width: min(420px, calc(100% - 32px)); transform: translateX(-50%); padding: 9px 13px; border-radius: 5px; background: var(--rail); color: white; font-size: 12px; box-shadow: 0 10px 30px rgba(23,26,22,.2); z-index: 80; }
.mobile-only { display: none; }
.mobile-backdrop { position: fixed; inset: 0; background: rgba(15,18,14,.5); z-index: 20; }

html[data-theme="dark"] body {
  --bg: #0d100e;
  --paper: #151916;
  --paper-soft: #1b211c;
  --ink: #f3f1e9;
  --ink-mid: #c8c7bf;
  --ink-soft: #92968f;
  --line: rgba(241,239,231,.13);
  --line-strong: rgba(241,239,231,.24);
  --rail: #090b09;
  --rail-soft: #141814;
  --rail-ink: #f5f2e9;
  --rail-muted: #979b94;
  --green: #8fbe8d;
  --echo: #81ad82;
  --echo-bright: #9bcf99;
  --echo-dark: #a2c6a3;
  --echo-green: #81ad82;
  --amber: #ec9c54;
  --sky: #70b7d3;
  --red: #ee7770;
  --yellow: #e3be5c;
  --code-bg: #090b09;
  --code-ink: #e9e7df;
}
html[data-theme="dark"] .topbar { background: rgba(15,18,16,.9); }
html[data-theme="dark"] .cost-info-panel { background: var(--paper); box-shadow: 0 20px 55px rgba(0,0,0,.45); }
html[data-theme="dark"] .new-chat-button { border-color: #354237; background: #1a231b; color: var(--rail-ink); }
html[data-theme="dark"] .new-chat-button:hover { border-color: var(--echo); background: #223025; }
html[data-theme="dark"] .icon-button[aria-pressed="true"] { border-color: #4d6b51; background: #233126; color: var(--echo-bright); }
html[data-theme="dark"] .composer,
html[data-theme="dark"] .message-edit-form textarea,
html[data-theme="dark"] .key-create-controls input,
html[data-theme="dark"] .key-secret-row code { background: var(--paper); }
html[data-theme="dark"] .send-button:disabled { background: #2a302b; color: #727972; }
html[data-theme="dark"] .key-reveal { border-color: var(--line-strong); background: #172019; }
html[data-theme="dark"] .settings-feedback { background: #2c1716; color: #f09b93; }
html[data-theme="dark"] .settings-feedback.success { background: #172419; color: var(--echo-bright); }
html[data-theme="dark"] .api-key-revoke:hover { border-color: #65403d; background: #2c1716; }
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .copy-key-button { background: var(--paper); }
html[data-theme="dark"] .menu-popover,
html[data-theme="dark"] .settings-dialog { box-shadow: 0 24px 70px rgba(0,0,0,.55); }
html[data-theme="dark"] .landing-pricing { background: var(--paper); }
html[data-theme="dark"] .emergence-section,
html[data-theme="dark"] .emergence-sticky { background: var(--bg); }
html[data-theme="dark"] .score-chapters > span.is-active { background: rgba(255,255,255,.06); }

@media (max-width: 900px) {
  :root { --sidebar: 252px; }
  .topbar { padding: 0 12px 0 16px; gap: 9px; }
  .account-menu-button { width: 58px; min-width: 58px; height: 46px; flex-direction: column; gap: 1px; padding: 3px 2px 2px; border-color: transparent; font-size: 10px; }
  .topbar-personal-controls .account-menu-button { width: auto; min-width: 72px; height: 42px; flex-direction: row; gap: 6px; padding: 0 8px; }
  .topbar-personal-controls .theme-toggle { min-height: 42px; }
  .topbar-action-link { min-height: 42px; padding: 0 9px; font-size: 10px; }
  .account-menu-button .account-menu-chevron { display: none; }
  .symphony-score { grid-template-columns: minmax(270px, 1.15fr) 90px minmax(220px, .8fr); gap: 18px; }
}

@media (max-width: 720px) {
  .app-shell { display: block; }
  .mobile-only { display: inline-flex; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(86vw, 320px); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 12px 0 35px rgba(8,10,7,.32); }
  .sidebar.open { transform: translateX(0); }
  .workspace { width: 100%; height: 100vh; height: 100dvh; }
  .topbar { grid-template-columns: minmax(68px, 1fr) minmax(72px, auto) auto; min-height: 70px; height: auto; padding: env(safe-area-inset-top) 12px 0; gap: 8px; }
  .topbar-leading { gap: 7px; }
  .cost-comparison summary { width: 31px; height: 31px; }
  .cost-info-panel { position: fixed; top: calc(74px + env(safe-area-inset-top)); right: 10px; left: 10px; width: auto; max-height: calc(100dvh - 90px - env(safe-area-inset-top)); }
  .topbar-actions { gap: 7px; }
  .topbar-action-link { min-width: 54px; min-height: 44px; padding: 0 9px; }
  .landing-signin-action { min-width: 64px; border-color: currentColor; }
  .topbar-code-action { flex-direction: column; gap: 2px; }
  .topbar-code-action > svg { width: 15px; height: 15px; }
  .topbar-personal-controls { min-height: 44px; }
  .topbar-personal-controls .account-menu-button { min-width: 70px; height: 44px; }
  .topbar-personal-controls .theme-toggle { min-height: 44px; }
  .product-name strong { font-size: 11px; }
  .product-name span { max-width: 105px; font-size: 9px; }
  .message-list { padding: 18px 16px 14px; }
  .home-intro { min-height: calc(100dvh - 238px); padding: 27px 16px 23px; }
  .mode-resolver { width: min(430px, 100%); height: 56px; margin-bottom: 17px; }
  .mode-resolver-label { width: 138px; flex-basis: 138px; font-size: 38px; }
  .tracer-echo-mark-resolver { --mark-h: 28px; --bar-w: 2px; --bar-gap: 2px; }
  .mode-resolver.is-echo .tracer-echo-mark-resolver { width: 18px; margin-left: 12px; margin-right: 8px; }
  .home-intro h1 { font-size: 27px; }
  .empty-subtitle { margin: 10px 0 18px; font-size: 13px; }
  .prompt-grid { grid-template-columns: 1fr 1fr; }
  .prompt-grid button, .prompt-grid button:nth-child(even) { min-height: 64px; padding: 11px 8px; border-right: 1px solid var(--line); font-size: 12px; line-height: 1.35; }
  .prompt-grid button:nth-child(even) { border-right: 0; }
  .prompt-grid svg { width: 17px; height: 17px; }
  .emergence-section { min-height: 760px; padding: 28px 18px 48px; }
  .emergence-copy { grid-template-columns: 1fr; gap: 12px; }
  .emergence-kicker { grid-column: auto; margin: 0 0 4px; }
  .emergence-copy h2 { font-size: 29px; }
  .emergence-copy > p:last-child { max-width: 480px; font-size: 13px; }
  .symphony-score { grid-template-columns: 1fr; gap: 22px; margin: 48px auto 42px; }
  .voice-staves { width: 100%; max-width: 560px; min-height: 218px; margin: 0 auto; }
  .score-voice > div { gap: clamp(7px, 3.2vw, 16px); }
  .symphony-convergence { width: min(300px, 82%); margin: 0 auto; }
  .emergent-phrase { min-height: 138px; }
  .emergent-bars { height: 88px; gap: 5px; }
  .emergent-bars i { width: 4px; flex-basis: 4px; }
  .emergence-equation { gap: 12px; font-size: 9px; }
  .emergence-equation strong { font-size: 21px; }
  .message { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 18px 0; }
  .message-avatar { width: 26px; height: 26px; }
  .message-body { font-size: 14.5px; }
  .message-actions { gap: 4px; }
  .message-actions .icon-button { width: 44px; height: 44px; flex-basis: 44px; }
  .message-actions .icon-button::after { display: none; }
  .message-edit-input { min-height: 116px; max-height: 42dvh; font-size: 16px; }
  .message-edit-actions button,
  .message-delete-actions button { min-height: 44px; padding: 8px 13px; }
  .message-delete-confirmation { align-items: stretch; flex-direction: column; gap: 10px; }
  .message-delete-actions { justify-content: flex-end; }
  .message-body .echo-math-display { margin: 12px 0; text-align: left; }
  .message-body .echo-math-display .katex-display { min-width: 0; text-align: left; }
  .message-body .echo-math-display .katex { font-size: 1em; }
  .composer-shell { padding: 12px 12px calc(13px + env(safe-area-inset-bottom)); }
  .long-wait-game-prompt { display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 5px 10px; padding: 4px 34px 8px 2px; }
  .long-wait-game-art { grid-row: 1 / span 2; }
  .long-wait-game-copy { display: grid; gap: 1px; }
  .long-wait-game-prompt > button:not(.long-wait-game-dismiss) { grid-column: 2; justify-self: start; padding: 0; }
  .echo-runner { max-height: min(430px, calc(100dvh - 160px)); }
  .echo-runner-header { gap: 8px; padding: 9px 10px; }
  .echo-runner-title small { display: none; }
  .echo-runner-readout { gap: 8px; }
  .echo-runner-readout > span { min-width: 58px; padding: 2px 7px; }
  .echo-runner canvas { height: 160px; }
  .echo-runner-footer { align-items: flex-start; flex-direction: column; padding: 10px; }
  .echo-runner-footer > div { width: 100%; }
  .echo-runner-footer button { min-height: 40px; flex: 1; }
  .echo-runner-join-form { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .echo-runner-join-form small { grid-column: 1; }
  .chat-lane-switcher { width: auto; flex: 0 0 auto; margin: 0; padding-right: 6px; }
  .chat-lane-buttons { width: auto; flex: 0 0 auto; }
  .chat-lane-buttons button { min-width: 31px; min-height: 28px; flex: 0 0 auto; padding: 0 2px; }
  .chat-lane-buttons button span { font-size: 9px; }
  .chat-lane-signal { width: 26px; }
  .chat-lane-signal > span { left: 4px; }
  .chat-lane-nudge { right: -54px; width: min(280px, calc(100vw - 24px)); }
  .composer { min-height: 56px; padding: 9px 9px 9px 13px; }
  .composer textarea { max-height: 130px; }
  .composer textarea { font-size: 16px; }
  .composer-note { margin-top: 5px; padding: 0 8px; font-size: 9.5px; line-height: 1.35; }
  .menu-popover { top: calc(72px + env(safe-area-inset-top)); right: 10px; }
  .toast { bottom: calc(94px + env(safe-area-inset-bottom)); }
  .settings-dialog { width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; }
  .settings-header { min-height: calc(64px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0 16px; }
  .account-summary { min-height: 82px; padding: 17px 18px; }
  .account-summary strong { max-width: calc(100vw - 150px); }
  .usage-section, .api-key-section { padding: 22px 18px; }
  .usage-metrics > div { padding: 15px 9px 15px 0; }
  .usage-metrics > div + div { padding-left: 9px; }
  .usage-metrics strong { font-size: 14px; }
  .legal-account-section { align-items: start; flex-direction: column; padding: 20px 18px calc(30px + env(safe-area-inset-bottom)); }
  .legal-account-section nav { justify-content: start; }
  .key-create-controls { grid-template-columns: 1fr; }
  .invite-welcome-dialog {
    inset: auto max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) auto;
    width: calc(100% - 20px - env(safe-area-inset-left) - env(safe-area-inset-right));
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
  .invite-welcome-body { padding: 2px 16px 14px; }
  .invite-welcome-body h2 { font-size: 18px; }
  .invite-welcome-actions { align-items: stretch; flex-direction: column-reverse; padding: 10px 12px; }
  .invite-welcome-actions > div { width: 100%; }
  .invite-welcome-actions > div > button { min-width: 0; flex: 1 1 0; }
  .invite-welcome-actions .quiet-action { width: auto; align-self: center; }
  .primary-button { width: 100%; }
  .api-key-row { gap: 8px; padding: 14px 0; }
}

@media (max-width: 380px) {
  .product-name > #connection-label { display: none; }
  .topbar .icon-button { width: 38px; height: 38px; flex-basis: 38px; }
  .topbar-personal-controls .account-menu-label { display: none; }
  .topbar-personal-controls .account-menu-button { min-width: 44px; width: 44px; padding: 0; }
  .mode-resolver-label { width: 118px; flex-basis: 118px; font-size: 34px; }
  .home-intro h1 { font-size: 24px; }
  .empty-subtitle { font-size: 12px; }
  .prompt-grid button, .prompt-grid button:nth-child(even) { min-height: 62px; grid-template-columns: 17px minmax(0, 1fr); gap: 7px; padding: 10px 6px; font-size: 11px; }
  .emergence-section { padding-left: 14px; padding-right: 14px; }
  .score-voice { grid-template-columns: 20px minmax(0, 1fr); gap: 7px; }
  .score-voice > div { gap: 6px; }
  .emergence-equation span { max-width: 80px; }
  .input-count { display: none; }
  .chat-lane-switcher { padding-right: 4px; }
  .account-summary { align-items: start; flex-direction: column; gap: 8px; }
  .account-summary strong { max-width: calc(100vw - 36px); }
  .usage-metrics { grid-template-columns: 1fr; }
  .usage-metrics > div, .usage-metrics > div + div { padding: 11px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .usage-metrics > div:last-child { border-bottom: 0; }
  .key-reveal { padding: 12px; }
  .copy-key-button { width: 40px; padding: 0; }
  .copy-key-button span { display: none; }
}

@media (max-width: 720px) and (max-height: 650px) {
  .home-intro { min-height: auto; padding-top: 16px; padding-bottom: 14px; }
  .mode-resolver { height: 48px; margin-bottom: 11px; }
  .home-intro h1 { font-size: 23px; }
  .empty-subtitle { margin: 8px 0 12px; line-height: 1.4; }
  .prompt-grid button:nth-child(n + 3) { display: none; }
  .emergence-section { padding-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .mode-resolver-label { filter: none !important; opacity: 1 !important; transform: none !important; }
  .score-voice { transform: none !important; }
  .symphony-convergence span { transform: scaleX(1) !important; }
  .emergent-phrase { filter: none !important; opacity: 1 !important; transform: none !important; }
  .emergent-bars i { transform: none !important; }
}

/* Public arrival experience. The conversation shell returns after the first prompt. */
.app-shell.home-active { grid-template-columns: minmax(0, 1fr); }
.home-active .sidebar { display: none; }
.home-active .workspace { position: relative; grid-template-rows: var(--topbar) minmax(0, 1fr); }
.home-active .topbar {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0 max(22px, calc((100% - 1240px) / 2));
  border-bottom-color: rgba(255,253,247,.12);
  background: rgba(17,17,15,.92);
}
.home-active .topbar-leading { min-width: 120px; }
.home-active #open-sidebar, .home-active .cost-comparison { display: none !important; }
.home-active .product-name { flex-direction: row; align-items: center; gap: 10px; }
.home-active .product-name strong { font-size: 15px; }
.home-active .product-name strong > span:nth-child(2) { color: var(--rail-ink); }
.home-active .product-name strong .brand-by { color: rgba(255,253,247,.5); font-size: 10px; }
.home-active .product-name > span { padding-left: 10px; border-left: 1px solid rgba(255,253,247,.2); color: rgba(255,253,247,.5); }
.home-active .topbar .icon-button { color: rgba(255,253,247,.68); }
.home-active .topbar .icon-button:hover { border-color: rgba(255,253,247,.2); background: rgba(255,253,247,.08); color: var(--rail-ink); }
.home-active .topbar-action-link { border-color: rgba(255,253,247,.26); color: var(--rail-ink); }
.home-active .landing-pricing-action { border-color: transparent; }
.home-active .topbar-action-link:hover, .home-active .topbar-action-link:focus-visible { border-color: rgba(255,253,247,.5); background: rgba(255,253,247,.08); color: var(--rail-ink); }
.home-active .theme-picker > summary { border-color: rgba(255,253,247,.2); background: rgba(255,253,247,.07); color: var(--rail-ink); }
.home-active .theme-picker > summary:hover,
.home-active .theme-picker[open] > summary { border-color: rgba(255,253,247,.38); background: rgba(255,253,247,.12); color: var(--rail-ink); }
.home-active .account-menu-button { border-color: rgba(255,253,247,.16); color: rgba(255,253,247,.72); }
.home-active .account-menu-button:hover { border-color: rgba(255,253,247,.3); background: rgba(255,253,247,.08); color: var(--rail-ink); }
.home-active .account-menu-avatar { background: var(--paper); color: var(--ink); }
.home-active .account-menu-button .account-menu-chevron { color: rgba(255,253,247,.48); }
.home-active .thread { background: var(--rail); }
.home-active .empty-state { min-height: 100%; }

.landing-pricing {
  display: none;
  width: 100%;
  padding: 84px max(24px, calc((100% - 1180px) / 2)) 78px;
  color: var(--ink);
  background: var(--paper);
}
.home-active .landing-pricing { display: block; }
.landing-pricing-heading { max-width: 800px; margin-bottom: 42px; }
.landing-pricing-heading > p { margin: 0 0 12px; color: var(--echo); font: 760 9px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.landing-pricing-heading h2 { max-width: 720px; margin: 0; color: var(--ink); font-size: clamp(35px, 4.5vw, 58px); font-weight: 650; letter-spacing: -.035em; line-height: 1.02; }
.landing-pricing-heading > span { display: block; max-width: 700px; margin-top: 16px; color: var(--ink-mid); font-size: 16px; line-height: 1.5; }
.landing-plan-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.landing-plan { min-width: 0; padding: 30px 28px 28px; }
.landing-plan + .landing-plan { border-left: 1px solid var(--line); }
.landing-plan > header { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.landing-plan > header > span { color: var(--ink-soft); font: 720 9px/1 var(--mono); }
.landing-plan h3 { margin: 0; color: var(--ink); font-size: 23px; font-weight: 690; }
.landing-plan > header p { margin: 5px 0 0; color: var(--ink-soft); font-size: 11px; }
.landing-plan-price { display: flex; align-items: baseline; gap: 10px; margin: 30px 0 26px; padding-bottom: 23px; border-bottom: 1px solid var(--line); }
.landing-plan-price strong { color: var(--ink); font-size: 43px; line-height: 1; letter-spacing: -.05em; }
.landing-plan-price span { color: var(--ink-soft); font-size: 10px; line-height: 1.4; }
.landing-plan ul { min-height: 190px; display: grid; align-content: start; gap: 0; margin: 0; padding: 0; list-style: none; }
.landing-plan li { display: grid; gap: 3px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.landing-plan li strong { color: var(--ink); font-size: 17px; font-weight: 700; }
.landing-plan li span { color: var(--ink-mid); font-size: 11px; }
.landing-plan > a { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 25px; padding: 0 2px; color: var(--echo-dark); font-size: 12px; font-weight: 760; text-decoration: none; }
.landing-plan > a:hover, .landing-plan > a:focus-visible { color: var(--echo); }
.landing-plan > a:focus-visible { outline: 2px solid var(--echo); outline-offset: 4px; }
.landing-plan > a svg { width: 17px; height: 17px; }
.landing-pricing-footnote { max-width: 940px; margin: 24px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.55; }
.landing-pricing-footnote strong { color: var(--ink-mid); }

.home-intro {
  position: relative;
  width: 100%;
  min-height: min(690px, calc(100dvh - var(--topbar) - 72px));
  justify-content: center;
  padding: 62px max(24px, calc((100% - 1180px) / 2)) 70px;
  overflow: hidden;
  color: var(--rail-ink);
  background: var(--rail);
}
.home-intro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(1180px, calc(100% - 48px));
  height: 1px;
  background: rgba(255,253,247,.2);
  transform: translateX(-50%);
}
.hero-brand-signal {
  width: min(650px, 86%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin: 0 auto 30px;
}
.hero-brand-signal > span:first-child,
.hero-brand-signal > span:last-child { height: 1px; background: rgba(255,253,247,.2); }
.hero-brand-lockup { display: flex; align-items: center; gap: 17px; }
.hero-brand-lockup h1 { margin: 0; color: var(--rail-ink); font-size: 72px; font-weight: 720; line-height: .92; }
.tracer-echo-mark-hero { --mark-h: 56px; --bar-w: 5px; --bar-gap: 5px; }
.tracer-echo-mark-hero i { transform-origin: center; animation: echo-breathe 4.8s ease-in-out infinite; }
.tracer-echo-mark-hero i:nth-child(2) { animation-delay: -.65s; }
.tracer-echo-mark-hero i:nth-child(3) { animation-delay: -1.3s; }
.tracer-echo-mark-hero i:nth-child(4) { animation-delay: -1.95s; }
.tracer-echo-mark-hero i:nth-child(5) { animation-delay: -2.6s; }
@keyframes echo-breathe {
  0%, 100% { transform: scaleY(.78); opacity: .76; }
  50% { transform: scaleY(1); opacity: 1; }
}
.mode-choice-section {
  min-height: 350px;
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(520px, 1.28fr);
  gap: 72px;
  align-items: center;
  padding: 70px max(28px, calc((100% - 1180px) / 2));
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.mode-choice-copy p { margin: 0 0 15px; color: var(--echo); font: 760 9px/1 var(--mono); text-transform: uppercase; }
.mode-choice-copy h2 { max-width: 390px; margin: 0; font-size: 36px; font-weight: 620; line-height: 1.08; }
.mode-resolver {
  position: relative;
  width: min(650px, 100%);
  min-height: 102px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 0 auto;
}
.selector-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: 14px 46px 13px;
  gap: 7px;
  align-items: center;
}
.model-menu-heading {
  color: var(--ink-soft);
  font: 700 9px/1 var(--mono);
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}
.model-menu-list {
  position: relative;
  width: 100%;
  height: 46px;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 8px 24px rgba(23,26,22,.035);
}
.model-menu-list > span {
  position: absolute;
  inset: 0 38px 0 13px;
  display: flex;
  align-items: center;
  padding: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity .16s ease, transform .16s ease;
}
.model-menu-list small { margin-right: 8px; color: var(--ink-soft); font: 700 7px/1 var(--mono); }
.model-menu-list > span.is-active {
  color: var(--ink);
  opacity: 1;
  transform: translateY(0);
}
.model-menu-list > span.is-active small { color: var(--amber); }
.mode-resolver.is-defocusing .model-menu-list > span.is-active { opacity: 0; transform: translateY(-6px); }
.model-menu-chevron { position: absolute; top: 14px; right: 12px; width: 15px; height: 15px; color: var(--ink-soft); stroke-width: 1.8; }
.selector-caption {
  overflow: hidden;
  color: var(--ink-soft);
  font: 650 8px/1 var(--mono);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selector-bridge {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  margin-top: -4px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--echo);
  background: var(--paper);
}
.selector-bridge svg { width: 16px; height: 16px; stroke-width: 1.8; }
.echo-selector-heading {
  color: var(--echo);
  font: 760 9px/1 var(--mono);
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}
.echo-resolution {
  position: relative;
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #9cac98;
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 9px 26px rgba(66,107,74,.09);
  pointer-events: none;
  opacity: 1;
  transform: none;
}
.tracer-echo-mark-resolver {
  --mark-h: 20px;
  --bar-w: 2px;
  --bar-gap: 2px;
  width: auto;
  overflow: visible;
  opacity: 1;
  transform: none;
}
.echo-resolution > span:last-child { min-width: 0; display: flex; align-items: baseline; gap: 7px; }
.echo-resolution small { display: none; }
.echo-resolution strong { color: var(--ink); font-size: 14px; line-height: 1; }
.echo-resolution em { color: var(--echo); font: 700 7px/1 var(--mono); text-transform: uppercase; white-space: nowrap; }
.hero-message { position: relative; width: min(1060px, 100%); margin: 0 auto 40px; text-align: center; }
.hero-motif { display: block; width: 78px; height: 62px; margin: 0 auto 26px; color: rgba(255, 253, 247, .5); }
.hero-motif-circles circle { mix-blend-mode: normal; }
.resolved-thesis {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transform: none;
}
.resolved-thesis > p { margin: 0 0 11px; color: var(--tracer-sky); font: 760 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.resolved-thesis h2 { max-width: 980px; margin: 0; color: var(--rail-ink); font-family: var(--display); font-size: 46px; font-weight: 600; letter-spacing: -.03em; line-height: .98; }
.resolved-thesis h2 > span { display: block; }
.hero-explainer {
  max-width: 820px;
  margin-top: 15px;
  color: rgba(255,253,247,.7);
  font-size: 14px;
  line-height: 1.5;
}
.hero-explainer > span, .hero-explainer > strong { display: block; }
.hero-explainer > strong { margin-top: 3px; color: rgba(255,253,247,.82); font-weight: 560; }
.home-composer-slot { width: min(840px, 100%); margin: 0 auto; }
.home-composer-slot .composer-shell { display: block; padding: 0; background: transparent; }
.home-composer-slot .composer { width: 100%; min-height: 66px; padding: 12px 12px 12px 18px; border-color: rgba(255,253,247,.28); box-shadow: 0 22px 60px rgba(0,0,0,.28); }
.home-composer-slot .composer textarea { min-height: 40px; font-size: 16px; }
.home-composer-slot .composer-note { display: none; }
.guest-trust-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  color: rgba(255,253,247,.58);
}
.guest-trust-row .composer-note {
  width: auto;
  margin: 0;
  color: inherit;
  font-size: 10px;
  line-height: 1.45;
}
.guest-trust-separator { color: rgba(255,253,247,.24); }
#guest-trial-legal a {
  color: inherit;
  text-decoration-color: rgba(255,253,247,.36);
  text-underline-offset: 3px;
}
#guest-trial-legal a:hover, #guest-trial-legal a:focus-visible { color: var(--rail-ink); }
.open-model-ecosystem {
  width: min(940px, 100%);
  margin: 27px auto 0;
  padding: 19px 0 0;
  border-top: 1px solid rgba(255,253,247,.14);
  text-align: center;
}
.open-model-ecosystem p {
  margin: 0 0 12px;
  color: rgba(255,253,247,.48);
  font: 600 9px/1.2 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.open-model-ecosystem ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.open-model-ecosystem li {
  color: rgba(255,253,247,.62);
  font: 650 11px/1.35 var(--sans);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.echo-credibility {
  width: min(680px, 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,253,247,.14);
}
.echo-yc-chip {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 10px 17px 10px 10px;
  border: 1px solid rgba(255,253,247,.2);
  border-radius: 3px;
  color: rgba(255,253,247,.82);
  background: rgba(255,253,247,.07);
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.echo-yc-monogram {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #ff5a1f;
  color: #fff;
  font: 500 21px/1 Arial, sans-serif;
}
.echo-yc-copy { display: grid; gap: 2px; text-align: left; }
.echo-yc-copy small { color: rgba(255,253,247,.52); font: 700 8px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.echo-yc-copy strong { color: var(--rail-ink); font-size: 14px; font-weight: 620; line-height: 1.1; }
.echo-yc-chip:hover, .echo-yc-chip:focus-visible { color: var(--rail-ink); border-color: rgba(255,253,247,.38); background: rgba(255,253,247,.11); }
.echo-tracer-invite { max-width: 340px; padding-left: 18px; border-left: 1px solid rgba(255,253,247,.18); color: rgba(255,253,247,.66); font-size: 11px; font-weight: 560; line-height: 1.45; text-align: left; text-decoration: none; transition: color .18s ease; }
.echo-tracer-invite > span { display: block; }
.echo-tracer-invite b { font-weight: inherit; white-space: nowrap; }
.echo-tracer-invite:hover, .echo-tracer-invite:focus-visible { color: var(--rail-ink); }
.legacy-mode-demo {
  position: relative;
  width: 154px;
  height: 40px;
  display: none;
  grid-template-columns: auto minmax(0, 1fr) 12px;
  gap: 5px;
  align-items: center;
  overflow: hidden;
  padding: 0 8px;
  border: 1px solid #aab4a6;
  border-radius: 5px;
  color: var(--ink-mid);
  background: #fff;
  box-shadow: 0 7px 18px rgba(26,31,25,.08);
  opacity: 1;
  transform: scale(1);
  transition: width .44s cubic-bezier(.22, 1, .36, 1), padding .38s ease, border-width .2s ease, opacity .24s ease .08s, transform .44s cubic-bezier(.22, 1, .36, 1), filter .3s ease;
}
.home-active .legacy-mode-demo { display: grid; }
.legacy-mode-demo::before,
.legacy-mode-demo::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 7px;
  left: 7px;
  height: 1px;
  background: rgba(189, 67, 58, .68);
  pointer-events: none;
  transform-origin: center;
}
.legacy-mode-demo::before { transform: rotate(9deg); }
.legacy-mode-demo::after { transform: rotate(-9deg); }
.legacy-mode-demo.is-struck { border-color: var(--line); background: var(--paper-soft); opacity: .62; transform: scale(.94); }
.legacy-mode-demo.is-dismissed { width: 0; padding-right: 0; padding-left: 0; border-width: 0; opacity: 0; filter: blur(5px); transform: translateX(10px) scale(.58); }
.legacy-mode-demo > small { color: var(--amber); font: 700 6px/1 var(--mono); }
.legacy-mode-demo > svg { width: 12px; height: 12px; color: var(--ink-soft); stroke-width: 1.8; }
.legacy-mode-demo-list { position: relative; min-width: 0; height: 16px; }
.legacy-mode-demo-list > span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease;
}
.legacy-mode-demo-list > span.is-active { opacity: 1; transform: translateY(0); }
.one-endpoint-note { display: none; white-space: nowrap; }
.home-active .one-endpoint-note {
  width: 0;
  display: inline-flex;
  overflow: hidden;
  justify-content: flex-end;
  color: var(--echo);
  font: 760 9px/1 var(--mono);
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(8px);
  transition: width .44s cubic-bezier(.22, 1, .36, 1), opacity .28s ease .12s, transform .44s cubic-bezier(.22, 1, .36, 1);
}
.home-active .composer.mode-resolved .one-endpoint-note { width: 92px; opacity: 1; transform: translateX(0); }
.composer.mode-resolved .send-button:not(.stop) { animation: echo-release .72s cubic-bezier(.2, .9, .25, 1); }
@keyframes echo-release {
  0% { transform: scale(.92); box-shadow: 0 0 0 0 rgba(77,120,83,0); }
  45% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(77,120,83,.10); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(77,120,83,0); }
}
.prompt-grid {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 17px auto 0;
  border: 0;
}
.prompt-grid button, .prompt-grid button:nth-child(even) {
  min-height: 38px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}
.prompt-grid button:last-child { border-right: 0; }
.prompt-grid button > svg { width: 16px; height: 16px; }
.prompt-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left; }
.prompt-copy strong { overflow: hidden; color: var(--ink-mid); font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.prompt-copy small { color: var(--ink-soft); font: 650 7px/1 var(--mono); text-transform: uppercase; }
.prompt-depth { height: 20px; display: flex; align-items: center; gap: 2px; }
.prompt-depth i { width: 2px; height: 7px; border-radius: 1px; background: var(--line-strong); }
.prompt-depth i:nth-child(2) { height: 12px; background: var(--tracer-sky); }
.prompt-depth-deep i:nth-child(1) { background: var(--tracer-sky); }
.prompt-depth-deep i:nth-child(2) { background: var(--echo); }
.prompt-depth-deep i:nth-child(3) { height: 17px; background: var(--tracer-orange); }
.prompt-depth-deep i:nth-child(4) { height: 11px; background: var(--tracer-red); }
.prompt-depth-full i:nth-child(1) { background: var(--tracer-sky); }
.prompt-depth-full i:nth-child(2) { background: var(--echo); }
.prompt-depth-full i:nth-child(3) { height: 17px; background: var(--tracer-orange); }
.prompt-depth-full i:nth-child(4) { height: 11px; background: var(--tracer-red); }
.prompt-depth-full i:nth-child(5) { height: 15px; background: var(--yellow); }
.prompt-grid button:hover { background: transparent; color: var(--ink); }
.prompt-grid svg { width: 15px; height: 15px; margin: 0; }

.emergence-section { --symphony-progress: 0; min-height: 260vh; padding: 0; overflow: visible; background: #f7f8f3; }
.emergence-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: calc(100dvh - var(--topbar));
  min-height: 0;
  padding: 34px max(28px, calc((100% - 1240px) / 2)) 18px;
  overflow: hidden;
  background: #f7f8f3;
}
.emergence-copy { width: min(980px, 100%); display: block; opacity: var(--section-copy-opacity, 1); transition: opacity .16s linear; }
.emergence-kicker { margin: 0 0 17px; color: var(--echo); font: 760 10px/1 var(--mono); text-transform: uppercase; }
.emergence-copy h2 { margin: 0; color: var(--ink); font-size: 43px; font-weight: 690; line-height: 1.02; }
.emergence-copy h2 span { color: var(--echo); }
.emergence-copy > p:last-child { max-width: 760px; margin: 12px 0 0; color: var(--ink-mid); font-size: 15px; line-height: 1.45; }
.symphony-stage {
  position: relative;
  width: min(1240px, 100%);
  height: clamp(240px, calc(100% - 190px), 690px);
  margin: 10px auto 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  transform: translateY(0);
  transform-origin: top center;
  transition: height .56s cubic-bezier(.22, 1, .36, 1), transform .56s cubic-bezier(.22, 1, .36, 1), border-color .3s ease;
}
.emergence-section.is-resolved .symphony-stage {
  height: calc(100% - 88px);
  border-top-color: transparent;
  transform: translateY(-286px);
}
.symphony-canvas { position: absolute; inset: 0 0 118px; width: 100%; height: calc(100% - 118px); display: block; opacity: 0; transition: opacity .4s ease; }
.symphony-stage.is-webgl .symphony-canvas { opacity: 1; }
.symphony-stage.is-webgl .frequency-key { opacity: 0; }
.score-scroll-cue {
  position: absolute;
  z-index: 4;
  top: 25px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font: 700 8px/1 var(--mono);
  text-transform: uppercase;
  opacity: var(--scroll-cue-opacity, 1);
  transform: translateX(-50%);
  transition: opacity .16s linear;
}
.score-scroll-cue svg { width: 14px; height: 14px; color: var(--echo); animation: score-cue-drop 1.45s ease-in-out infinite; }
@keyframes score-cue-drop {
  0%, 100% { transform: translateY(-2px); opacity: .55; }
  50% { transform: translateY(3px); opacity: 1; }
}
.score-progress-rail {
  position: absolute;
  z-index: 4;
  top: 92px;
  right: 2px;
  bottom: 145px;
  width: 14px;
}
.score-progress-rail::before,
.score-progress-rail > span {
  content: "";
  position: absolute;
  top: 0;
  left: 6px;
  width: 1px;
  height: 100%;
  background: var(--line-strong);
}
.score-progress-rail > span { background: var(--echo); transform: scaleY(var(--symphony-progress)); transform-origin: top center; }
.score-progress-rail i { position: absolute; right: 4px; width: 5px; height: 2px; background: var(--ink-soft); }
.score-progress-rail i:nth-of-type(1) { top: 0; }
.score-progress-rail i:nth-of-type(2) { top: 50%; }
.score-progress-rail i:nth-of-type(3) { bottom: 0; }
.symphony-fallback { position: absolute; inset: 0 0 60px; transition: opacity .25s ease; }
.symphony-stage.is-webgl .symphony-fallback { opacity: 0; }
.fallback-frequencies {
  position: absolute;
  top: 95px;
  left: 3%;
  width: 55%;
  height: 230px;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  perspective: 700px;
  transform: rotateY(8deg);
  transform-origin: left center;
}
.fallback-phrase { display: flex; align-items: center; gap: clamp(6px, .7vw, 10px); color: var(--tracer-sky); opacity: .92; }
.fallback-phrase i { width: 4px; height: 12px; flex: 0 0 4px; background: currentColor; transform-origin: center; }
.fallback-phrase i:nth-child(3n) { height: 22px; }
.fallback-phrase i:nth-child(5n) { height: 31px; }
.fallback-phrase i:nth-child(7n) { height: 17px; }
.phrase-focused { color: var(--echo); }
.phrase-deep { color: var(--tracer-orange); }
.phrase-expansive { color: var(--tracer-red); }
.phrase-expansive i { height: 7px; }
.phrase-expansive i:nth-child(4n) { height: 29px; }
.tracer-echo-mark-stage { --mark-h: 72px; --bar-w: 7px; --bar-gap: 6px; }
.symphony-fallback > .tracer-echo-mark-stage { position: absolute; top: 178px; right: 7%; }
.conductor-overlay { position: absolute; inset: 0 0 60px; pointer-events: none; }
.frequency-key {
  position: absolute;
  top: 76px;
  bottom: 42px;
  left: 0;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  align-items: center;
  color: var(--ink-soft);
  opacity: var(--voice-key-opacity, 1);
  transition: opacity .16s linear;
}
.frequency-key > span { display: flex; align-items: center; gap: 7px; font: 700 8px/1 var(--mono); text-transform: uppercase; }
.frequency-key svg { width: 16px; height: 16px; stroke-width: 1.6; }
.frequency-key b { font-weight: 700; }
.frequency-quick { color: var(--sky); }
.frequency-focused { color: var(--echo); }
.frequency-deep { color: var(--amber); }
.frequency-expansive { color: var(--red); }
.coherent-output { position: absolute; bottom: 32px; left: 50%; display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0; transform: translate(-50%, 10px); transition: opacity .32s ease, transform .32s ease; }
.emergence-section.is-resolved .coherent-output {
  top: 70%;
  bottom: auto;
  opacity: 1;
  transform: translate(-50%, 0);
}
.coherent-output strong { color: var(--ink); font-size: 22px; line-height: 1; }
.coherent-output small { color: var(--ink-soft); font: 700 9px/1 var(--mono); text-transform: uppercase; }
.score-chapters {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.score-chapters > span { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-right: 1px solid var(--line); color: #a0a69d; font-size: 11px; transition: color .25s ease, background .25s ease; }
.score-chapters > span:first-child { padding-left: 0; }
.score-chapters > span:last-child { border-right: 0; }
.score-chapters > span.is-active { color: var(--ink); background: rgba(255,255,255,.5); }
.score-chapters small { color: var(--echo); font: 700 8px/1 var(--mono); }

.your-echo-section {
  min-height: 560px;
  display: grid;
  grid-template-columns: 120px minmax(260px, .9fr) minmax(320px, 1.1fr);
  gap: 48px;
  align-items: center;
  padding: 88px max(28px, calc((100% - 1180px) / 2));
  background: var(--rail);
  color: var(--rail-ink);
}
.your-echo-index { align-self: start; padding-top: 14px; color: var(--rail-muted); font: 700 9px/1 var(--mono); }
.your-echo-copy p { margin: 0 0 22px; color: var(--echo-bright); font: 760 10px/1 var(--mono); text-transform: uppercase; }
.your-echo-copy h2 { margin: 0; font-size: 64px; line-height: 1; }
.your-echo-copy strong { display: block; margin-top: 18px; color: var(--rail-muted); font-size: 18px; font-weight: 560; }
.your-echo-detail { max-width: 520px; }
.your-echo-detail > p:first-child { margin: 0; color: #d7ddd2; font-size: 22px; line-height: 1.48; }
.your-echo-rule { height: 94px; display: flex; align-items: center; gap: 10px; margin: 36px 0 24px; }
.your-echo-rule span { height: 1px; flex: 1 1 auto; background: #394136; }
.your-echo-rule i { width: 5px; background: var(--tracer-sky); }
.your-echo-rule i:nth-of-type(1) { height: 24px; }
.your-echo-rule i:nth-of-type(2) { height: 58px; background: var(--tracer-orange); }
.your-echo-rule i:nth-of-type(3) { height: 82px; background: var(--tracer-red); }
.your-echo-rule i:nth-of-type(4) { height: 46px; background: var(--echo-bright); }
.your-echo-rule i:nth-of-type(5) { height: 30px; background: var(--tracer-sky); }
.your-echo-footnote { margin: 0; color: var(--rail-muted); font: 700 10px/1 var(--mono); text-transform: uppercase; }

@media (max-width: 900px) {
  .home-intro { padding-top: 38px; }
  .landing-plan { padding-right: 19px; padding-left: 19px; }
  .mode-choice-section { grid-template-columns: minmax(220px, .62fr) minmax(470px, 1.38fr); gap: 36px; }
  .model-menu-list > span { font-size: 14px; }
  .emergence-copy h2 { font-size: 40px; }
  .symphony-stage { height: clamp(240px, calc(100% - 185px), 610px); }
  .emergence-section.is-resolved .symphony-stage { height: calc(100% - 56px); transform: translateY(-220px); }
  .your-echo-section { grid-template-columns: 70px minmax(220px, .9fr) minmax(280px, 1.1fr); gap: 28px; }
}

@media (max-width: 720px) {
  .home-active .topbar { grid-template-columns: minmax(0, 1fr) auto; padding: env(safe-area-inset-top) 10px 0 14px; }
  .home-active .product-name { margin-left: 3px; }
  .home-intro { min-height: calc(100dvh - var(--topbar) - 58px); padding: 38px 16px 46px; }
  .home-intro::before { width: calc(100% - 32px); }
  .hero-brand-signal { width: min(330px, 86%); gap: 15px; margin-bottom: 26px; }
  .hero-brand-lockup { gap: 12px; }
  .hero-brand-lockup h1 { font-size: 52px; }
  .tracer-echo-mark-hero { --mark-h: 44px; --bar-w: 4px; --bar-gap: 4px; }
  .mode-choice-section { min-height: 430px; grid-template-columns: 1fr; gap: 34px; padding: 54px 16px 58px; }
  .mode-choice-copy { text-align: center; }
  .mode-choice-copy p { margin-bottom: 11px; font-size: 8px; }
  .mode-choice-copy h2 { max-width: 330px; margin: 0 auto; font-size: 30px; }
  .mode-resolver { width: 100%; min-height: 90px; grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr); gap: 6px; margin: 0; }
  .selector-panel { grid-template-rows: 12px 42px 11px; gap: 5px; }
  .model-menu-heading, .echo-selector-heading { font-size: 7px; }
  .model-menu-list { top: auto; left: auto; width: 100%; height: 42px; transform: none; }
  .model-menu-list > span { inset: 0 36px 0 12px; padding: 0; font-size: 13px; }
  .model-menu-list small { margin: 0 7px 0 0; font-size: 7px; }
  .selector-caption { font-size: 6.5px; }
  .selector-bridge { width: 27px; height: 27px; margin-top: -2px; }
  .selector-bridge svg { width: 13px; height: 13px; }
  .tracer-echo-mark-resolver { --mark-h: 18px; --bar-w: 2px; --bar-gap: 2px; }
  .echo-resolution { top: auto; width: 100%; height: 42px; gap: 7px; padding: 0 9px; }
  .echo-resolution strong { font-size: 13px; }
  .echo-resolution em { font-size: 6px; }
  .hero-message { margin-bottom: 24px; }
  .hero-motif { width: 60px; height: 48px; margin-bottom: 18px; }
  .choice-thesis { padding: 0 14px; font-size: 23px; }
  .resolved-thesis > p { margin-bottom: 10px; font-size: 8px; }
  .resolved-thesis h2 { max-width: 350px; font-size: 30px; line-height: .98; }
  .hero-explainer { max-width: 360px; margin-top: 13px; font-size: 12px; line-height: 1.42; }
  .home-composer-slot .composer { min-height: 58px; padding: 8px 8px 8px 14px; }
  .home-composer-slot .composer {
    min-height: 78px;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 2px;
    padding: 6px 7px 6px 12px;
  }
  .home-composer-slot .composer textarea { min-height: 28px; max-height: 44px; padding: 2px 0; line-height: 1.35; }
  .home-composer-slot .composer-actions { width: 100%; min-height: 32px; justify-content: flex-end; gap: 5px; }
  .home-composer-slot .legacy-mode-demo { height: 32px; }
  .home-composer-slot .send-button { width: 34px; height: 34px; }
  .guest-trust-row { flex-direction: column; align-items: center; gap: 3px; margin-top: 14px; }
  .guest-trust-separator { display: none; }
  .open-model-ecosystem { margin-top: 20px; padding-top: 15px; }
  .open-model-ecosystem p { margin-bottom: 10px; font-size: 8px; }
  .open-model-ecosystem ul { gap: 6px 14px; }
  .open-model-ecosystem li { font-size: 10px; }
  .echo-credibility { max-width: 100%; flex-direction: column; gap: 10px; margin-top: 24px; padding-top: 20px; }
  .echo-tracer-invite { max-width: 280px; padding: 0; border-left: 0; font-size: 10px; text-align: center; }
  .landing-pricing { padding: 58px 16px 52px; }
  .landing-pricing-heading { margin-bottom: 30px; }
  .landing-pricing-heading h2 { font-size: 35px; }
  .landing-pricing-heading > span { font-size: 14px; }
  .landing-plan-list { grid-template-columns: minmax(0, 1fr); }
  .landing-plan { padding: 28px 0 26px; }
  .landing-plan + .landing-plan { border-top: 1px solid var(--line-strong); border-left: 0; }
  .landing-plan-price { margin: 23px 0 17px; }
  .landing-plan ul { min-height: 0; }
  .landing-pricing-footnote { margin-top: 20px; }
  .chat-start { padding-bottom: 105px; }
  .tracer-echo-mark-chat-start { --mark-h: 36px; }
  .chat-start h1 { font-size: 32px; }
  .prompt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
  .prompt-grid button, .prompt-grid button:nth-child(even) { min-height: 58px; grid-template-columns: 1fr; justify-items: center; gap: 4px; padding: 6px 5px; border-right: 1px solid var(--line); font-size: 10px; line-height: 1.2; }
  .prompt-grid button:last-child { border-right: 0; }
  .prompt-grid button > svg { display: none; }
  .prompt-copy { align-items: center; gap: 2px; text-align: center; }
  .prompt-copy strong { max-width: 100%; font-size: 9.5px; }
  .prompt-copy small { font-size: 6.5px; }
  .prompt-depth { height: 17px; }
  .emergence-section { min-height: 285vh; padding: 0; }
  .emergence-sticky { height: calc(100dvh - var(--topbar)); min-height: 0; padding: 18px 16px 8px; }
  .emergence-kicker { margin-bottom: 11px; font-size: 8px; }
  .emergence-copy h2 { font-size: 30px; line-height: 1.02; }
  .emergence-copy > p:last-child { margin-top: 11px; font-size: 13.5px; line-height: 1.38; }
  .symphony-stage { height: clamp(220px, calc(100% - 155px), 560px); margin-top: 6px; }
  .emergence-section.is-resolved .symphony-stage { height: calc(100% - 24px); transform: translateY(-128px); }
  .score-scroll-cue { top: 113px; font-size: 7px; }
  .score-progress-rail { top: 165px; right: 0; bottom: 152px; }
  .symphony-canvas { bottom: 138px; height: calc(100% - 138px); }
  .symphony-fallback { bottom: 74px; height: calc(100% - 74px); }
  .fallback-frequencies { top: 116px; left: 2%; width: 75%; height: 210px; }
  .fallback-conductor { top: 176px; left: 76%; height: 88px; }
  .symphony-fallback > .tracer-echo-mark-stage { top: 188px; right: 2%; }
  .tracer-echo-mark-stage { --mark-h: 52px; --bar-w: 5px; --bar-gap: 4px; }
  .conductor-overlay { bottom: 74px; }
  .frequency-key { top: 142px; bottom: 52px; }
  .frequency-key > span { gap: 5px; font-size: 7px; }
  .frequency-key svg { width: 13px; height: 13px; }
  .coherent-output { right: auto; bottom: 24px; }
  .emergence-section.is-resolved .coherent-output { top: 69%; bottom: auto; }
  .score-chapters { bottom: 0; height: 74px; }
  .score-chapters > span { flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 0 8px; font-size: 9px; line-height: 1.15; }
  .score-chapters > span:first-child { padding-left: 0; }
  .your-echo-section { min-height: 610px; grid-template-columns: 1fr; gap: 24px; padding: 64px 22px 70px; }
  .your-echo-index { padding: 0; }
  .your-echo-copy h2 { font-size: 52px; }
  .your-echo-detail > p:first-child { font-size: 19px; }
}

@media (max-width: 380px) {
  .mode-resolver { grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); gap: 4px; }
  .model-menu-heading, .echo-selector-heading { font-size: 6.5px; }
  .selector-caption { font-size: 5.8px; }
  .echo-resolution em { display: none; }
  .hero-brand-lockup h1 { font-size: 50px; }
  .resolved-thesis h2 { font-size: 27px; }
  .legacy-mode-demo { width: 132px; padding-right: 6px; padding-left: 6px; }
  .prompt-grid button span { max-width: 84px; }
  .emergence-copy h2 { font-size: 28px; }
}

@media (max-width: 720px) and (max-height: 700px) {
  .emergence-sticky { padding: 10px 12px 5px; }
  .emergence-kicker { margin-bottom: 7px; }
  .emergence-copy h2 { font-size: 25px; }
  .emergence-copy > p:last-child { margin-top: 7px; font-size: 12px; line-height: 1.3; }
  .symphony-stage { height: calc(100% - 130px); min-height: 0; }
  .emergence-section.is-resolved .symphony-stage { height: calc(100% - 40px); transform: translateY(-92px); }
  .score-scroll-cue { top: 72px; }
  .score-progress-rail { top: 116px; bottom: 112px; }
}

@media (max-height: 460px) {
  .emergence-section { min-height: 0; }
  .emergence-sticky { position: relative; top: auto; height: auto; min-height: 0; overflow: visible; }
  .symphony-stage,
  .emergence-section.is-resolved .symphony-stage {
    height: clamp(380px, 50vw, 500px);
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .model-menu-heading, .model-menu-list { display: block; }
  .echo-resolution { opacity: 1; transform: none; }
  .choice-thesis { display: none; }
  .resolved-thesis { opacity: 1; transform: none; }
  .tracer-echo-mark-hero i { animation: none; transform: none; opacity: 1; }
  .score-scroll-cue svg { animation: none; }
  .symphony-canvas { display: none; }
  .symphony-fallback { opacity: 1 !important; }
  .emergence-section { min-height: auto !important; }
  .emergence-sticky { position: relative; height: auto; min-height: calc(100dvh - var(--topbar)); overflow: visible; }
  .emergence-copy { opacity: 1 !important; }
  .emergence-section.is-resolved .symphony-stage { height: clamp(380px, calc(100dvh - 230px), 690px); transform: none; }
  .score-scroll-cue, .score-progress-rail { display: none; }
}


/* Conversation deletion is always explicit and reversible until confirmation. */
.conversation-delete-dialog {
  width: min(430px, calc(100% - 32px));
  max-width: 430px;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(23,26,22,.24);
}
.conversation-delete-dialog::backdrop { background: rgba(15,18,14,.58); }
.conversation-delete-layout { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 13px; padding: 20px; }
.conversation-delete-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--red) 10%, var(--paper));
  color: var(--red);
}
.conversation-delete-mark svg { width: 17px; height: 17px; }
.conversation-delete-copy { min-width: 0; }
.conversation-delete-copy .settings-kicker { margin: 0 0 4px; color: var(--red); }
.conversation-delete-copy h2 { margin: 0; font-size: 19px; line-height: 1.25; letter-spacing: -.02em; }
.conversation-delete-copy > p:last-child { margin: 8px 0 0; color: var(--ink-mid); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.conversation-delete-dialog-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 5px; }
.conversation-delete-dialog-actions button { min-height: 38px; padding: 8px 13px; border-radius: 6px; }
.conversation-delete-dialog-actions .danger-button { border: 1px solid var(--red); background: var(--red); color: white; }
.conversation-delete-dialog-actions .danger-button:hover { filter: brightness(.92); }
.conversation-delete-dialog-actions button:disabled { cursor: wait; opacity: .58; }
@media (max-width: 520px) {
  .conversation-delete-layout { grid-template-columns: 34px minmax(0,1fr); gap: 11px; padding: 17px; }
  .conversation-delete-mark { width: 34px; height: 34px; }
  .conversation-delete-dialog-actions { flex-direction: column-reverse; }
  .conversation-delete-dialog-actions button { width: 100%; }
}
