/* Layout: one centered 1120px column of glass panels floating over a black field with two slow neon light sources. */
:root {
  --bg: #050705;
  --bg-2: #0a0d0a;
  --fg: #eef3ee;
  --muted: #9ca89d;
  --faint: #5f6b60;
  --line: rgba(255, 255, 255, 0.09);
  --glass: rgba(255, 255, 255, 0.035);
  --glass-hi: rgba(255, 255, 255, 0.06);
  --neon: #e2f05a;
  --lime: #f1f5a2;
  --ph: #e6eee6;
  --ok: #c3de45;
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --radius: 18px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60;
  background: var(--bg);
}

/* Ambient light: two blurred sources and a faint grid, behind everything */
.field { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.field::before, .field::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(110px); opacity: .22;
  animation: drift 26s ease-in-out infinite alternate;
}
.field::before { width: 620px; height: 620px; background: var(--neon); top: -220px; left: -160px; }
.field::after { width: 560px; height: 560px; background: var(--lime); top: 30%; right: -220px; animation-delay: -9s; opacity: .2; }
.grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 70%);
}
@keyframes drift { to { transform: translate(80px, 60px) scale(1.12); } }

.wrap {
  position: relative; z-index: 1;
  width: 100%; max-width: 1168px; margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

/* Draft banner */
.draft {
  position: relative; z-index: 2;
  border-bottom: 1px dashed rgba(230, 238, 230, .35);
  background: rgba(230, 238, 230, .06);
  color: var(--ph); font-size: 13px;
}
.draft .wrap { padding-block: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ph { border-bottom: 1px dashed rgba(230, 238, 230, .6); color: var(--ph); background: rgba(230, 238, 230, .06); padding: 0 3px; border-radius: 3px; }

/* Header */
header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(5, 7, 5, .62);
  border-bottom: 1px solid var(--line);
}
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 14px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; }
.logo-mark { width: 30px; height: 30px; display: block; flex: none; }
.logo-word { font: 400 15px/1 var(--font-display); letter-spacing: .42em; color: var(--lime); margin-right: -.42em; }
.brand-art { width: min(340px, 100%); aspect-ratio: 1; margin-top: 12px; filter: drop-shadow(0 0 40px rgba(226, 240, 90, .12)); }
nav { display: flex; gap: 28px; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .2s; }
nav a:hover, nav a:focus-visible { color: var(--fg); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 11px 20px; border-radius: 999px; font: 500 14px/1 var(--font-body);
  text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: box-shadow .25s, background .25s, border-color .25s, transform .25s;
}
.btn-neon {
  color: #12140a; background: linear-gradient(100deg, var(--lime), #eaf27a 50%, var(--neon));
  box-shadow: 0 0 0 1px rgba(226, 240, 90, .4), 0 0 26px rgba(226, 240, 90, .28);
}
.btn-neon:hover { box-shadow: 0 0 0 1px rgba(226, 240, 90, .6), 0 0 38px rgba(226, 240, 90, .45); transform: translateY(-1px); }
.btn-glass { color: var(--fg); background: var(--glass); border-color: var(--line); }
.btn-glass:hover { background: var(--glass-hi); border-color: rgba(255,255,255,.18); }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; border-radius: 6px; }

/* Type */
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
h1 { font-weight: 600; font-size: clamp(40px, 6.4vw, 76px); line-height: 1.04; letter-spacing: -0.035em; }
h2 { font-weight: 600; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; letter-spacing: -0.025em; }
h3 { font-weight: 600; font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
.grad {
  background: linear-gradient(95deg, #ffffff 8%, var(--lime) 50%, var(--neon) 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
  font: 500 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--neon);
}
.lede { color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); max-width: 60ch; }
p { margin: 0; }

section { padding-block: 96px; }
.sec-head { display: grid; gap: 16px; max-width: 720px; margin-bottom: 48px; }

/* Glass panel */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 20px 60px rgba(0,0,0,.35);
}

/* Hero */
.hero { padding-block: 88px 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero-copy { display: grid; gap: 26px; min-width: 0; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.status {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content;
  padding: 7px 14px 7px 10px; border-radius: 999px; font-size: 13px; color: var(--muted);
  background: var(--glass); border: 1px solid var(--line);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Terminal */
.term { min-width: 0; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.14); }
.term-title { margin-left: 8px; font: 400 12px/1 var(--font-mono); color: var(--faint); }
.term pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: 400 13px/1.7 var(--font-mono); color: #dbe6dc; }
.term .out { border-top: 1px solid var(--line); padding: 16px 20px 20px; display: grid; gap: 12px; }
.answer { font: 400 14px/1.65 var(--font-body); color: var(--fg); }
.cite {
  display: inline-block; padding: 0 6px; margin: 0 1px; border-radius: 6px;
  font: 500 12px/1.6 var(--font-mono); color: var(--neon);
  background: rgba(226, 240, 90, .1); border: 1px solid rgba(226, 240, 90, .3);
}
.caret { display: inline-block; width: 8px; height: 16px; vertical-align: -3px; background: var(--neon); margin-left: 3px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sources { display: flex; gap: 8px; flex-wrap: wrap; }
.src { font: 400 12px/1 var(--font-mono); color: var(--muted); padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.src b { color: var(--neon); font-weight: 500; margin-right: 6px; }
.k { color: #e2f05a; } .s { color: #b7c48a; } .c { color: var(--faint); } .f { color: #f1f5a2; }

/* Facts strip */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact { padding: 22px 20px; display: grid; gap: 4px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact dt { font: 500 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.fact dd { margin: 0; font: 500 15px/1.4 var(--font-display); }

/* Model card */
.model { display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; }
.model-main { padding: 40px; display: grid; gap: 20px; align-content: start; min-width: 0; }
.model-side { padding: 40px; border-left: 1px solid var(--line); background: rgba(255,255,255,.015); min-width: 0; }
.tag { font: 500 12px/1 var(--font-mono); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.live { color: var(--lime); border-color: rgba(241, 245, 162, .35); background: rgba(241, 245, 162, .07); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.spec { display: grid; grid-template-columns: 140px 1fr; gap: 14px 16px; margin: 0; font-size: 14px; }
.spec dt { color: var(--faint); }
.spec dd { margin: 0; color: var(--fg); }
.next { margin-top: 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.next .glass { padding: 24px; display: grid; gap: 8px; }
.next p { color: var(--muted); font-size: 14px; }

/* Capabilities */
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cap { background: var(--bg-2); padding: 32px 28px; display: grid; gap: 12px; align-content: start; transition: background .3s; }
.cap:hover { background: #0f150f; }
.cap p { color: var(--muted); font-size: 15px; }
.icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; border: 1px solid rgba(226, 240, 90, .3); background: rgba(226, 240, 90, .07); }
.icon svg { width: 18px; height: 18px; stroke: var(--neon); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Method: real sequence, so numbered */
.method { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { padding: 26px; display: grid; gap: 10px; align-content: start; position: relative; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font: 500 12px/1 var(--font-mono); color: var(--neon); letter-spacing: .1em;
}
.step p { color: var(--muted); font-size: 14px; }
.evals { margin-top: 20px; padding: 28px; display: grid; gap: 16px; }
.eval-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.eval-table th { text-align: left; font: 500 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.eval-table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--muted); }
.eval-table td:first-child { color: var(--fg); }
.eval-table tr:last-child td { border-bottom: 0; }
.pending { font: 400 12px/1 var(--font-mono); color: var(--muted); }
.scroll-x { overflow-x: auto; }

/* API */
.api-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: start; }
.api-copy { display: grid; gap: 22px; min-width: 0; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; color: var(--muted); font-size: 15px; }
.checks li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; border: 1px solid rgba(195, 222, 69, .5); background: radial-gradient(circle, var(--ok) 0 3px, transparent 4px); }
.tabs { display: flex; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tab { font: 500 12px/1 var(--font-mono); color: var(--muted); background: none; border: 1px solid transparent; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.tab[aria-selected="true"] { color: var(--fg); background: var(--glass-hi); border-color: var(--line); }
.code { min-width: 0; overflow: hidden; }
.code pre { margin: 0; padding: 20px; overflow-x: auto; font: 400 13px/1.7 var(--font-mono); color: #dbe6dc; min-height: 330px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { padding: 30px; display: grid; gap: 18px; align-content: start; }
.plan.feature { border-color: rgba(226, 240, 90, .35); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px rgba(226, 240, 90, .15), 0 0 50px rgba(226, 240, 90, .12); }
.price { font: 600 34px/1 var(--font-display); letter-spacing: -.02em; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.plan li::before { content: "— "; color: var(--faint); }

/* Company */
.company { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.principles { display: grid; gap: 16px; }
.principle { padding: 24px; display: grid; gap: 6px; }
.principle p { color: var(--muted); font-size: 15px; }

/* Waitlist */
.cta { padding: 56px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; overflow: hidden; position: relative; }
.cta::after { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -160px; border-radius: 50%; background: var(--lime); filter: blur(100px); opacity: .25; pointer-events: none; }
form { display: grid; gap: 12px; position: relative; z-index: 1; min-width: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
input[type="email"] {
  flex: 1 1 220px; min-width: 0; padding: 13px 16px; border-radius: 999px; font: 400 15px/1 var(--font-body);
  color: var(--fg); background: rgba(0,0,0,.35); border: 1px solid var(--line);
}
input[type="email"]::placeholder { color: var(--faint); }
input[type="email"]:focus { outline: none; border-color: rgba(226, 240, 90, .55); box-shadow: 0 0 0 4px rgba(226, 240, 90, .12); }
.note { font-size: 13px; color: var(--faint); min-height: 20px; }
.note.done { color: var(--ok); }

footer { border-top: 1px solid var(--line); padding-block: 48px 64px; position: relative; z-index: 1; }
.foot { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.foot-col { display: grid; gap: 10px; align-content: start; font-size: 14px; }
.foot-col b { font: 500 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.foot-col a { color: var(--muted); text-decoration: none; }
.foot-col a:hover { color: var(--fg); }
.legal { margin-top: 40px; font-size: 13px; color: var(--faint); }

@media (max-width: 960px) {
  nav { display: none; }
  .hero-grid, .api-grid, .company, .cta, .model { grid-template-columns: 1fr; }
  .model-side { border-left: 0; border-top: 1px solid var(--line); }
  .caps, .plans { grid-template-columns: 1fr 1fr; }
  .method { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  section { padding-block: 64px; }
  .hero { padding-block: 48px 48px; }
  .caps, .plans, .method, .next { grid-template-columns: 1fr; }
  .model-main, .model-side, .cta { padding: 26px; }
  .spec { grid-template-columns: 1fr; gap: 2px; }
  .spec dd { margin-bottom: 10px; }
  header .btn { padding: 9px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

img{max-width:100%}[hidden]{display:none!important}

/* ---- Multi-page additions ---- */
nav a[aria-current="page"] { color: var(--fg); position: relative; }
nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--neon); box-shadow: 0 0 10px var(--neon);
}
@media (max-width: 960px) {
  header .wrap { flex-wrap: wrap; row-gap: 10px; }
  nav { display: flex; order: 3; width: 100%; gap: 22px; overflow-x: auto; padding-bottom: 2px; }
  nav a { white-space: nowrap; }
}

.page-hero { padding-block: 84px 36px; }
.page-hero .inner { display: grid; gap: 18px; max-width: 760px; }
.page-hero h1 { font-size: clamp(38px, 5.2vw, 62px); }
.sub { padding-top: 0; }

/* Explore cards (home) */
.explore { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.explore a { padding: 26px; display: grid; gap: 10px; align-content: start; text-decoration: none; color: var(--fg); transition: border-color .25s, transform .25s; }
.explore a:hover { border-color: rgba(226, 240, 90, .35); transform: translateY(-2px); }
.explore p { color: var(--muted); font-size: 14px; }
.arrow { font: 500 13px/1 var(--font-mono); color: var(--neon); }

/* Data / comparison tables */
.table-card { padding: 8px 8px 4px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; font: 500 11px/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: top; }
.data-table td:first-child { color: var(--fg); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.data-table tfoot td { color: var(--fg); font-weight: 600; border-top: 1px solid rgba(226, 240, 90, .25); }
.yes { color: var(--neon); }
.no { color: var(--faint); }

/* Two-column prose blocks */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.block { padding: 30px; display: grid; gap: 12px; align-content: start; }
.block p, .block li { color: var(--muted); font-size: 15px; }
.block ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; font-size: 14px; }
.kv dt { color: var(--faint); font-family: var(--font-mono); font-size: 12px; padding-top: 2px; }
.kv dd { margin: 0; color: var(--fg); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.stat { padding: 24px; display: grid; gap: 6px; }
.stat b { font: 600 30px/1 var(--font-display); letter-spacing: -.02em; color: var(--lime); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }

/* Roadmap */
.roadmap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.lane { display: grid; gap: 12px; }
.lane-head { display: flex; align-items: center; gap: 10px; padding: 0 4px 6px; font: 500 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lane-dot { width: 9px; height: 9px; border-radius: 50%; }
.lane-now .lane-dot { background: var(--neon); box-shadow: 0 0 12px var(--neon); }
.lane-next .lane-dot { border: 1px solid var(--lime); }
.lane-later .lane-dot { border: 1px dashed var(--faint); }
.item { padding: 22px; display: grid; gap: 8px; }
.item p { color: var(--muted); font-size: 14px; }
.lane-now .item { border-color: rgba(226, 240, 90, .28); }
.log { display: grid; gap: 0; }
.log-row { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.log-row:last-child { border-bottom: 0; }
.log-row time { font: 500 13px/1.5 var(--font-mono); color: var(--neon); }
.log-row p { color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { padding: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 24px; font: 600 16px/1.4 var(--font-display); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--neon); font-family: var(--font-mono); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 24px 22px; color: var(--muted); font-size: 15px; }

/* Chat */
.side-label { font: 500 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--muted); }
.toggle input { accent-color: var(--neon); width: 16px; height: 16px; }
.example-tag { align-self: center; font: 500 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); border: 1px dashed var(--line); border-radius: 999px; padding: 7px 12px; }
.msg { max-width: 72ch; display: grid; gap: 10px; }
.msg.user { align-self: flex-end; padding: 12px 16px; border-radius: 16px 16px 4px 16px; background: var(--glass-hi); border: 1px solid var(--line); }
.msg.bot { align-self: flex-start; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.msg.bot img { width: 26px; height: 26px; margin-top: 2px; }
.msg.bot .body { display: grid; gap: 10px; min-width: 0; }
.msg p { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.error .body p { color: #ffb4a8; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.suggest button { font: 400 13px/1.3 var(--font-body); color: var(--muted); background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; cursor: pointer; }
.suggest button:hover:not(:disabled) { color: var(--fg); border-color: rgba(226, 240, 90, .35); }
.suggest button:disabled { cursor: not-allowed; opacity: .6; }
.composer { border-top: 1px solid var(--line); padding: 14px; display: grid; gap: 8px; }
.composer-row { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea {
  flex: 1; min-width: 0; resize: none; min-height: 48px; max-height: 180px; padding: 13px 16px; border-radius: 14px;
  font: 400 15px/1.5 var(--font-body); color: var(--fg); background: rgba(0,0,0,.35); border: 1px solid var(--line);
}
.composer textarea:focus { outline: none; border-color: rgba(226, 240, 90, .5); box-shadow: 0 0 0 4px rgba(226, 240, 90, .1); }
.composer textarea:disabled { opacity: .6; cursor: not-allowed; }
.composer .btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
.fine { font-size: 12px; color: var(--faint); text-align: center; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--neon); animation: pulse 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }

@media (max-width: 960px) {
  .explore, .roadmap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .page-hero { padding-block: 48px 24px; }
  .explore, .roadmap, .split, .stat-row { grid-template-columns: 1fr; }
  .log-row { grid-template-columns: 1fr; gap: 4px; }
}

/* Long-form text (privacy) */
.prose { padding: 40px; gap: 14px; max-width: 860px; }
.prose h2 { font-size: 21px; margin-top: 16px; }
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 16px; max-width: 68ch; }
@media (max-width: 600px) { .prose { padding: 24px; } }

@media (max-width: 960px) {
}

/* Accounts: subscribe, welcome key, dashboard */
.plans.two { grid-template-columns: repeat(2, 1fr); max-width: 880px; }
.plan a[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.keybox { max-width: 860px; }
.key-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.key-row code { flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; padding: 12px 14px; border-radius: 12px;
  font: 500 14px/1.5 var(--font-mono); color: var(--lime); background: rgba(0,0,0,.4); border: 1px solid rgba(226, 240, 90, .3); }
.signin { max-width: 560px; }
.signin-form, .mini-form { display: grid; gap: 10px; }
.signin-form input, .mini-form input, .mini-form select {
  min-width: 0; padding: 12px 14px; border-radius: 12px; font: 400 15px/1.3 var(--font-body);
  color: var(--fg); background: rgba(0,0,0,.35); border: 1px solid var(--line); }
.mini-form input[type="file"] { padding: 9px 10px; font-size: 13px; }
.signin-form input:focus, .mini-form input:focus, .mini-form select:focus {
  outline: none; border-color: rgba(226, 240, 90, .5); box-shadow: 0 0 0 4px rgba(226, 240, 90, .1); }
.meter { height: 10px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line); overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--lime), var(--neon)); box-shadow: 0 0 14px rgba(226, 240, 90, .4); transition: width .6s; }
.colls { display: grid; gap: 8px; }
.coll-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.coll-row span { color: var(--muted); font-size: 13px; font-family: var(--font-mono); }
@media (max-width: 760px) { .plans.two { grid-template-columns: 1fr; } }

/* Chat: image attachments and voice */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon-btn { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; cursor: pointer;
  background: var(--glass); border: 1px solid var(--line); color: var(--muted); transition: border-color .2s, color .2s; }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { color: var(--fg); border-color: rgba(226, 240, 90, .35); }
.icon-btn[aria-pressed="true"] { color: #12140a; background: var(--neon); border-color: var(--neon); box-shadow: 0 0 18px rgba(226, 240, 90, .5); }
.icon-btn[aria-disabled="true"], .icon-btn:disabled { opacity: .45; cursor: not-allowed; }
.attachments { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.7); color: var(--fg); font: 600 12px/20px var(--font-body); }
.msg.user .msg-images { display: flex; gap: 6px; flex-wrap: wrap; }
.msg.user .msg-images img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
@media (max-width: 600px) { .icon-btn { width: 42px; height: 42px; } }
@media (max-width: 600px) {
  .composer-row { flex-wrap: wrap; }
  .composer textarea { flex: 1 1 100%; order: -1; }
  .composer-row .btn { margin-left: auto; }
  .suggest button { max-width: 100%; white-space: normal; text-align: center; }
}

/* API docs */
.docs-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 36px; align-items: start; padding-bottom: 80px; }
.docs-nav { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); padding: 16px; display: grid; gap: 2px; }
.docs-nav a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 7px 10px; border-radius: 8px; }
.docs-nav a:hover { color: var(--fg); background: var(--glass-hi); }
.docs-body { display: grid; gap: 56px; min-width: 0; }
.doc { display: grid; gap: 14px; scroll-margin-top: 90px; padding: 0; }
.doc h2 { font-size: 28px; }
.doc p { color: var(--muted); max-width: 72ch; }
.doc a { color: var(--lime); }
.doc pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: 400 13px/1.7 var(--font-mono); color: #dbe6dc; border-radius: 14px; }
.doc code { font: 400 13px/1.5 var(--font-mono); color: var(--lime); }
.doc pre code { color: inherit; }
code.ep { padding: 3px 8px; border-radius: 6px; background: rgba(226, 240, 90, .08); border: 1px solid rgba(226, 240, 90, .25); }
@media (max-width: 960px) {
  .docs-grid { grid-template-columns: 1fr; }
  .docs-nav { position: static; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* SORAEN Personal and the plan ladder */
.per { font: 400 15px/1 var(--font-body); letter-spacing: 0; color: var(--muted); }
.badge { width: fit-content; padding: 6px 10px; border-radius: 999px; font: 500 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--neon); border: 1px solid rgba(226, 240, 90, .35); background: rgba(226, 240, 90, .07); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-height: 26px; }
.plan-sub { color: var(--muted); font-size: 14px; }
.plan .btn { width: 100%; }
.biz { margin-top: 16px; padding: 24px 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.biz div { display: grid; gap: 6px; max-width: 62ch; }
.biz p { color: var(--muted); font-size: 14px; }
.profile { display: grid; grid-template-columns: auto 1fr; gap: 14px 22px; margin: 0; padding: 22px 20px; font-size: 14px; align-items: center; }
.profile dt { color: var(--faint); font: 400 12px/1.4 var(--font-mono); }
.profile dd { margin: 0; color: var(--fg); min-width: 0; }
.book { padding: 56px; display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; position: relative; overflow: hidden;
  border-color: rgba(226, 240, 90, .28); }
.book::after { content: ""; position: absolute; width: 380px; height: 380px; left: -150px; bottom: -190px; border-radius: 50%; background: var(--lime); filter: blur(110px); opacity: .16; pointer-events: none; }
.book-copy { display: grid; gap: 18px; position: relative; z-index: 1; min-width: 0; }
.book-form { gap: 16px; }
.book-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row { display: grid; gap: 7px; min-width: 0; }
.field-row label { font-size: 13px; color: var(--muted); }
.book-form input:not([type="hidden"]), .book-form select, .book-form textarea {
  width: 100%; min-width: 0; padding: 12px 14px; border-radius: 12px; font: 400 15px/1.4 var(--font-body);
  color: var(--fg); background: rgba(0,0,0,.35); border: 1px solid var(--line); }
.book-form select option { color: var(--fg); background: var(--bg-2); }
.book-form textarea { resize: vertical; min-height: 92px; }
.book-form ::placeholder { color: var(--faint); }
.book-form input:focus, .book-form select:focus, .book-form textarea:focus {
  outline: none; border-color: rgba(226, 240, 90, .5); box-shadow: 0 0 0 4px rgba(226, 240, 90, .1); }
.book-form .btn:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; transform: none; }
.band { padding: 44px 48px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; border-color: rgba(226, 240, 90, .28); }
.band div { display: grid; gap: 12px; max-width: 640px; }
@media (max-width: 960px) {
  .plans { grid-template-columns: 1fr; }
  .book { grid-template-columns: 1fr; gap: 36px; padding: 36px; }
}
@media (max-width: 600px) {
  .book { padding: 24px; }
  .book-pair { grid-template-columns: 1fr; }
  .band { padding: 28px 24px; }
  .band .btn { width: 100%; }
}

/* Premium finish: calm surfaces, quiet accent, more room */
.field::before { opacity: .07; animation: none; }
.field::after { opacity: .05; animation: none; }
.grid { display: none; }
h1, h2 { font-weight: 400; letter-spacing: -.03em; }
h1 { font-size: clamp(38px, 5.6vw, 68px); line-height: 1.08; }
.page-hero h1 { font-size: clamp(36px, 5vw, 60px); }
.grad { background: none; -webkit-text-fill-color: currentColor; color: var(--lime); }
.eyebrow { color: var(--muted); font-weight: 400; letter-spacing: .18em; }
.btn { border-radius: 10px; padding: 13px 22px; }
.btn-neon { background: var(--lime); box-shadow: none; }
.btn-neon:hover { background: #fbfcd8; box-shadow: none; transform: none; }
.glass { background: rgba(255, 255, 255, .022); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.plan.feature, .book, .band { border-color: rgba(241, 245, 162, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.cta::after { opacity: .07; }
.book::after { opacity: .05; }
.pulse, nav a[aria-current="page"]::after { box-shadow: none; }
.btn-neon:disabled { background: var(--lime); }
@media (min-width: 961px) {
  section { padding-block: 128px; }
  .sec-head { margin-bottom: 64px; }
}

/* Design system: shared details */
::selection { background: rgba(241, 245, 162, .22); color: var(--fg); }
header .wrap { padding-block: 12px; }
nav { gap: 26px; }
nav a { font-size: 13.5px; }
.head-actions { display: flex; align-items: center; gap: 16px; flex: none; }
.signin-link { color: var(--muted); font-size: 13.5px; text-decoration: none; transition: color .2s; }
.signin-link:hover, .signin-link[aria-current="page"] { color: var(--fg); }
header .btn { padding: 10px 16px; font-size: 13.5px; }
.btn-lg { padding: 16px 26px; font-size: 15px; }
.btn { transition: background .2s, border-color .2s, color .2s; }
.menu-btn { display: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--glass); color: var(--fg); cursor: pointer; place-items: center; }
.menu-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; }
.arrow { transition: transform .25s; }
a:hover > .arrow { transform: translateX(4px); }
.spot:hover { background-image: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(241, 245, 162, .055), transparent 72%); }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.num { font: 400 12px/1 var(--font-mono); color: var(--faint); letter-spacing: .08em; }
.term { background: rgba(255, 255, 255, .018); }

/* Home: hero */
.lab-hero { padding-block: 64px 56px; overflow: hidden; }
.lab-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px; align-items: center; min-height: min(640px, calc(100dvh - 190px)); }
.lab-copy { display: grid; gap: 28px; min-width: 0; position: relative; z-index: 2; }
.lab-hero h1 { font-weight: 300; font-size: clamp(44px, 6.1vw, 82px); line-height: 1.04; letter-spacing: -.04em; }
.lab-hero .grad { display: block; }
.lab-mark { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.lab-mark img { position: relative; width: 82%; height: auto; animation: mark-in 1.4s cubic-bezier(.2, .7, .2, 1) both; }
.ring { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px solid rgba(241, 245, 162, .07); transform: translate(-50%, -50%); }
.ring.r1 { width: 72%; aspect-ratio: 1; }
.ring.r2 { width: 100%; aspect-ratio: 1; border-color: rgba(241, 245, 162, .05); }
.ring.r3 { width: 130%; aspect-ratio: 1; border-color: rgba(241, 245, 162, .03); }
.lab-mark::before { content: ""; position: absolute; inset: 22%; border-radius: 50%; background: var(--lime); filter: blur(90px); opacity: .07; }
@keyframes mark-in { from { opacity: 0; transform: scale(.96); } }
.promises dd { color: var(--fg); font-size: 15px; font-family: var(--font-body); font-weight: 400; }

/* Home: statement */
.statement-wrap { padding-block: 136px 128px; }
.statement { font: 300 clamp(30px, 4.4vw, 56px)/1.18 var(--font-display); letter-spacing: -.03em; max-width: 21em; text-wrap: balance; }

/* Home: research areas */
.areas { border-top: 1px solid var(--line); }
.area { display: grid; grid-template-columns: 48px 1fr 1.5fr 1.15fr; gap: 24px; align-items: baseline; padding: 24px 0; border-bottom: 1px solid var(--line); }
.area h3 { font-weight: 400; font-size: 21px; }
.area p { color: var(--muted); font-size: 15px; }
.area p:last-child { color: var(--lime); }
.area-head { padding: 14px 0; font: 400 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }

/* Home: SORAEN Lite */
.lite-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 72px; }
.lite-grid .spec { grid-template-columns: 120px 1fr; gap: 12px 16px; }
.demo { padding: 28px 26px 30px; display: grid; gap: 18px; }
.demo-q { justify-self: end; max-width: 85%; padding: 10px 16px; border-radius: 14px 14px 4px 14px; font-size: 14px; background: var(--glass-hi); border: 1px solid var(--line); }
.demo .answer { font-size: 15px; }

/* Home: trust */
.proofs { border-top: 1px solid var(--line); }
.proof { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; padding: 24px 12px 24px 0; color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line); }
.proof h3 { font-weight: 400; font-size: 19px; }
.proof p { grid-column: 1; color: var(--muted); font-size: 14px; }
.proof .arrow { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 15px; }
.proof:hover h3 { color: var(--lime); }
.human { color: var(--muted); font-size: 15px; }
.human a { color: var(--lime); }

/* Footer */
footer { padding-block: 64px 28px; overflow: hidden; }
.foot-word { display: block; margin: 56px 0 -.14em; font: 300 clamp(64px, 17.6vw, 226px)/1 var(--font-display); letter-spacing: .06em; white-space: nowrap; color: rgba(241, 245, 162, .055); user-select: none; text-align: center; }
.legal { margin-top: 32px; }

/* Calmer inner pages */
.page-hero { padding-block: 104px 56px; }
.page-hero h1 { font-weight: 300; letter-spacing: -.035em; }
h2 { font-weight: 300; }
.stat b { font-weight: 400; }
.price { font-weight: 400; letter-spacing: -.03em; }
.plan h3 { font-weight: 400; font-size: 21px; }
.plan .badge { font-size: 10px; color: var(--muted); border-color: var(--line); background: none; }
.plan.feature .badge { color: var(--lime); border-color: rgba(241, 245, 162, .3); }
.caps { background: var(--line); }
.cap { background: #070a07; }
.cap:hover { background-color: #0a0e0a; }
.icon { border-color: var(--line); background: none; }
.icon svg { stroke: var(--lime); stroke-width: 1.4; }
.tag.live { background: none; }
.step::before { color: var(--faint); }

@media (max-width: 1100px) {
  nav { gap: 20px; }
  .signin-link { display: none; }
}
@media (max-width: 960px) {
  .menu-btn { display: grid; }
  header .wrap { flex-wrap: wrap; row-gap: 0; }
  nav, nav.open { order: 3; width: 100%; overflow: visible; padding: 0; gap: 0; }
  nav { display: none; }
  nav.open { display: grid; padding-block: 10px 6px; }
  nav a { padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  nav a[aria-current="page"]::after { display: none; }
  .lab-grid { grid-template-columns: 1fr; min-height: 0; }
  .lab-mark { order: -1; width: min(240px, 60%); }
  .lite-grid { grid-template-columns: 1fr; gap: 40px; }
  .area { grid-template-columns: 36px 1fr; gap: 6px 14px; }
  .area h3 { grid-column: 2; }
  .area p { grid-column: 2; }
  .area-head { display: none; }
}
@media (max-width: 600px) {
  .lab-hero { padding-block: 28px 40px; }
  .lab-hero .btn-lg { flex: 1 1 100%; }
  .statement-wrap { padding-block: 72px; }
  .page-hero { padding-block: 56px 32px; }
  header .btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lab-mark img, .pulse, .caret { animation: none; }
  html { scroll-behavior: auto; }
}

/* Second pass */
.lab-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); }
.lab-hero h1 { font-size: clamp(40px, 4.6vw, 66px); line-height: 1.1; }
.faq summary { font-weight: 400; }
.lede { line-height: 1.6; }
@media (max-width: 960px) {
  .lab-grid { grid-template-columns: 1fr; }
  .lab-hero h1 { font-size: clamp(38px, 9vw, 62px); }
}

/* SORAEN Chat: the full-screen app */
.app-body { height: 100dvh; overflow: hidden; }
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); height: 100dvh; }
.app-side { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 14px; padding: 16px 12px 12px; background: #070a07; border-right: 1px solid var(--line); min-width: 0; }
.app-side > .logo { padding: 4px 8px; }
.app-side .logo-mark { width: 26px; height: 26px; }
.new-chat { justify-content: flex-start; width: 100%; padding: 11px 12px; gap: 10px; }
.new-chat svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; }
.new-chat:disabled { opacity: .5; cursor: not-allowed; }
.convo-list { display: block; overflow-y: auto; width: auto; padding: 0; min-height: 0; }
.convo { display: flex; align-items: center; border-radius: 8px; }
.convo:hover, .convo.active { background: var(--glass-hi); }
.convo-open { flex: 1; min-width: 0; padding: 9px 10px; border: 0; background: none; color: var(--muted); font: 400 14px/1.3 var(--font-body); text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo:hover .convo-open, .convo.active .convo-open { color: var(--fg); }
.convo-del { flex: none; margin-right: 4px; padding: 3px 7px; border: 0; border-radius: 6px; background: none; color: var(--faint); font: 400 14px/1 var(--font-body); cursor: pointer; opacity: 0; }
.convo:hover .convo-del, .convo-del:focus-visible, .convo-del.armed { opacity: 1; }
.convo-del:hover { color: var(--fg); }
.convo-del.armed { font-size: 12px; color: #ffb4a8; }
.side-foot { border-top: 1px solid var(--line); padding-top: 12px; }
.side-foot .btn { width: 100%; }
.account { position: relative; }
.account summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.account summary::-webkit-details-marker { display: none; }
.account summary:hover { background: var(--glass-hi); }
.avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 500 13px/1 var(--font-display); color: #12140a; background: var(--lime); }
.who { display: grid; min-width: 0; font-size: 13px; line-height: 1.3; }
.who b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { color: var(--faint); font-size: 12px; }
.account-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); display: grid; gap: 2px; padding: 8px; border-radius: 12px; background: #0e120e; border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); z-index: 5; }
.account-menu a, .account-menu button { padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 400 14px/1.2 var(--font-body); text-decoration: none; text-align: left; cursor: pointer; }
.account-menu a:hover, .account-menu button:hover { background: var(--glass-hi); color: var(--fg); }
.account-menu .danger:hover { color: #ffb4a8; }
#free-usage { display: grid; gap: 6px; padding: 8px 10px 12px; color: var(--muted); }
#free-usage[hidden] { display: none; }
.app-main { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; height: 100dvh; }
.app-top { display: flex; align-items: center; gap: 10px; padding: 12px 20px; min-height: 58px; }
.model-name { font: 400 15px/1 var(--font-display); }
.plan-tag { padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); font: 400 11px/1 var(--font-mono); }
.app-select { margin-left: auto; max-width: 200px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font: 400 13px/1 var(--font-body); }
.app-log { overflow-y: auto; padding: 8px max(20px, calc((100% - 760px) / 2)) 28px; display: flex; flex-direction: column; gap: 26px; scroll-behavior: smooth; }
.welcome { margin: auto; padding-bottom: 32px; display: grid; justify-items: center; gap: 16px; text-align: center; width: 100%; }
.welcome[hidden] { display: none; }
.welcome img { width: 92px; height: 92px; opacity: .9; }
.welcome h1 { font-weight: 300; font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.03em; }
.welcome p { color: var(--muted); }
.welcome .suggest { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 640px; margin-top: 12px; }
.welcome .suggest[hidden] { display: none; }
.welcome .suggest button { padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .022); color: var(--muted); font-size: 14px; text-align: left; line-height: 1.4; transition: border-color .2s, color .2s; }
.app-log .msg { max-width: 100%; }
.app-log .msg.user { max-width: 78%; padding: 10px 16px; border-radius: 16px 16px 4px 16px; }
.app-log .msg.bot .body { font-size: 15.5px; line-height: 1.7; }
.app-log pre { position: relative; margin: 0; padding: 16px 18px; overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); background: #0a0d0a; font: 400 13px/1.65 var(--font-mono); color: #dbe6dc; }
.app-log :not(pre) > code, .app-log p code { padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, .07); font: 400 13px/1.5 var(--font-mono); }
.copy-btn { position: absolute; top: 8px; right: 8px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: #121612; color: var(--muted); font: 400 11px/1 var(--font-body); cursor: pointer; }
.copy-btn:hover { color: var(--fg); }
.app-composer { padding: 0 max(20px, calc((100% - 760px) / 2)) 12px; display: grid; gap: 8px; border: 0; }
.composer-box { display: grid; gap: 6px; padding: 12px 12px 10px; border-radius: 18px; background: #0c100c; border: 1px solid rgba(255, 255, 255, .13); transition: border-color .2s; }
.composer-box:focus-within { border-color: rgba(241, 245, 162, .4); }
.composer-box textarea { width: 100%; max-height: 200px; padding: 4px 6px; resize: none; border: 0; outline: 0; background: none; color: var(--fg); font: 400 15.5px/1.5 var(--font-body); }
.composer-box textarea::placeholder { color: var(--faint); }
.composer-box textarea:disabled { cursor: not-allowed; }
.composer-box .composer-row { flex-wrap: nowrap; align-items: center; gap: 6px; }
.composer-box .icon-btn { width: 36px; height: 36px; border-radius: 10px; background: none; border-color: transparent; }
.composer-box .icon-btn:hover { background: var(--glass-hi); border-color: transparent; }
.send-btn { flex: none; width: 36px; height: 36px; margin-left: auto; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: var(--lime); color: #12140a; cursor: pointer; transition: background .2s; }
.send-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.send-btn:hover:not(:disabled) { background: #fbfcd8; }
.send-btn:disabled { opacity: .35; cursor: not-allowed; }
.app-scrim { display: none; }
.signin-dialog { width: min(400px, calc(100vw - 32px)); padding: 36px 32px 26px; border-radius: 18px; border: 1px solid var(--line); background: #0b0f0b; color: var(--fg); text-align: center; }
.signin-dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(6px); }
.signin-dialog[open] { display: grid; gap: 14px; justify-items: center; }
.signin-dialog h2 { font-size: 24px; }
.signin-dialog > div, .signin-dialog form { width: 100%; }
.signin-dialog #signin-step1 { display: grid; gap: 14px; }
.signin-dialog #signin-step1[hidden], .signin-dialog form[hidden] { display: none; }
.signin-dialog input { width: 100%; text-align: center; }
.signin-dialog .note { min-height: 0; font-size: 12.5px; }
.signin-dialog .note a { color: var(--muted); }
.signin-sub { color: var(--muted); font-size: 14px; }
.dialog-close { position: absolute; top: 12px; right: 14px; padding: 4px 8px; border: 0; background: none; color: var(--faint); font-size: 20px; line-height: 1; cursor: pointer; }
.dialog-close:hover { color: var(--fg); }
.google-btn { width: 100%; gap: 10px; }
.google-btn svg { width: 17px; height: 17px; fill: currentColor; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; }
.or[hidden] { display: none; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.text-btn { border: 0; background: none; color: var(--muted); font: 400 13px/1 var(--font-body); cursor: pointer; padding: 6px; }
.text-btn:hover { color: var(--fg); }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app .menu-btn { display: grid; }
  .app-side { position: fixed; inset: 0 auto 0 0; width: min(288px, 84vw); z-index: 30; transform: translateX(-100%); transition: transform .25s; }
  .app-side.open { transform: none; }
  .app-scrim.open { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .6); }
  .app-top { padding: 10px 14px; }
  .app-log { padding-inline: 14px; }
  .app-composer { padding-inline: 12px; }
  .welcome .suggest { grid-template-columns: 1fr; }
  .welcome .suggest button:nth-child(n+3) { display: none; }
}

/* SORAEN Chat: history, settings, message tools */
.side-search { position: relative; }
.side-search[hidden] { display: none; }
.side-search svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); stroke: var(--faint); fill: none; stroke-width: 1.7; stroke-linecap: round; }
.side-search input { width: 100%; padding: 9px 10px 9px 33px; border-radius: 9px; border: 1px solid transparent; background: var(--glass); color: var(--fg); font: 400 13.5px/1.2 var(--font-body); outline: 0; }
.side-search input:focus { border-color: rgba(241, 245, 162, .3); }
.side-search input::placeholder { color: var(--faint); }
.app-side { grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
.convo-group { margin: 16px 10px 6px; font: 400 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.convo-group:first-child { margin-top: 4px; }
.convo-empty { padding: 10px; color: var(--faint); font-size: 13px; }
.convo-more { flex: none; margin-right: 4px; padding: 3px 7px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: 400 15px/1 var(--font-body); cursor: pointer; opacity: 0; }
.convo:hover .convo-more, .convo.active .convo-more, .convo-more:focus-visible { opacity: 1; }
.convo-more:hover { color: var(--fg); background: var(--glass-hi); }
.convo-rename { flex: 1; min-width: 0; margin: 3px; padding: 6px 7px; border-radius: 6px; border: 1px solid rgba(241, 245, 162, .4); background: #0a0d0a; color: var(--fg); font: 400 14px/1.2 var(--font-body); outline: 0; }
.popover { position: fixed; z-index: 40; width: 150px; display: grid; gap: 1px; padding: 6px; border-radius: 10px; border: 1px solid var(--line); background: #0f130f; box-shadow: 0 14px 34px rgba(0, 0, 0, .55); }
.popover[hidden] { display: none; }
.popover button { padding: 8px 10px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: 400 13.5px/1.2 var(--font-body); text-align: left; cursor: pointer; }
.popover button:hover { background: var(--glass-hi); color: var(--fg); }
.popover .danger:hover, .btn.danger:hover { color: #ffb4a8; }
.account-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: var(--fg); text-align: left; cursor: pointer; }
.account-btn[hidden] { display: none; }
.account-btn:hover { background: var(--glass-hi); }
.account-btn > svg { flex: none; width: 17px; height: 17px; margin-left: auto; stroke: var(--faint); fill: none; stroke-width: 1.6; stroke-linecap: round; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top-actions .app-select { margin-left: 0; }
.top-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 400 13px/1 var(--font-body); cursor: pointer; }
.top-btn[hidden] { display: none; }
.top-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.top-btn:hover { background: var(--glass-hi); color: var(--fg); }
.top-btn[aria-pressed="true"] { color: var(--lime); background: rgba(241, 245, 162, .08); }
.temp-note { padding: 0 20px 8px; color: var(--faint); font-size: 12.5px; text-align: center; }
.temp-note[hidden] { display: none; }
.app-main { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.temp-chat .composer-box { border-style: dashed; }
.turn { display: grid; gap: 4px; min-width: 0; }
.turn[hidden] { display: none; }
.user-turn { justify-items: end; }
.msg-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.user-turn .msg-actions { justify-content: flex-end; }
.turn:not(.user-turn) .msg-actions { padding-left: 34px; }
.turn:hover .msg-actions, .msg-actions:focus-within { opacity: 1; }
.turn:not(.user-turn):nth-last-child(1) .msg-actions { opacity: 1; }
.msg-actions button { padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--faint); font: 400 12px/1.2 var(--font-body); cursor: pointer; }
.msg-actions button:hover { background: var(--glass-hi); color: var(--fg); }
.msg-actions .only-last { display: none; }
.turn:nth-last-child(1) .only-last { display: inline-block; }
.chat-error { align-self: center; padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(255, 180, 168, .25); color: #ffb4a8; font-size: 13.5px; text-align: center; }
.edit-box { align-self: flex-end; width: min(100%, 620px); display: grid; gap: 8px; padding: 10px; border-radius: 14px; border: 1px solid rgba(241, 245, 162, .3); background: #0c100c; }
.edit-box textarea { width: 100%; resize: vertical; padding: 4px; border: 0; outline: 0; background: none; color: var(--fg); font: 400 15px/1.5 var(--font-body); }
.edit-row { display: flex; justify-content: flex-end; gap: 8px; }
.edit-row .btn { padding: 8px 14px; font-size: 13px; }
.app-log .body h3, .app-log .body h4, .app-log .body h5, .app-log .body h6 { font-weight: 400; font-size: 18px; margin-top: 6px; }
.app-log .body ul, .app-log .body ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.app-log .body strong { font-weight: 600; color: var(--fg); }
.code-box { min-width: 0; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; background: #0a0d0a; }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--line); color: var(--faint); font: 400 12px/1 var(--font-mono); }
.code-box pre { border: 0; border-radius: 0; background: none; }
.copy-btn { position: static; }
.send-btn .i-stop, .send-btn.stop .i-send { display: none; }
.send-btn.stop .i-stop { display: block; }
.settings-dialog { width: min(720px, calc(100vw - 24px)); max-height: min(620px, calc(100dvh - 24px)); padding: 0; border-radius: 18px; border: 1px solid var(--line); background: #0b0f0b; color: var(--fg); overflow: hidden; }
.settings-dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(6px); }
.settings-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.settings-head { position: relative; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.settings-head h2 { font-size: 20px; }
.settings-body { display: grid; grid-template-columns: 180px minmax(0, 1fr); min-height: 0; }
.settings-tabs { display: grid; align-content: start; gap: 2px; padding: 12px; border-right: 1px solid var(--line); }
.settings-tabs button { padding: 9px 11px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 400 14px/1.2 var(--font-body); text-align: left; cursor: pointer; }
.settings-tabs button:hover { color: var(--fg); }
.settings-tabs button[aria-selected="true"] { background: var(--glass-hi); color: var(--fg); }
.settings-panels { padding: 8px 24px 20px; overflow-y: auto; min-height: 420px; }
.settings-panels fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.settings-panels fieldset:disabled { opacity: .45; }
.set-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.set-row[hidden] { display: none; }
.set-row > :first-child { color: var(--muted); }
.set-row b { font-weight: 400; overflow-wrap: anywhere; }
.set-row small { color: var(--faint); font-size: 12px; }
.set-row .btn { justify-self: end; }
.set-col { grid-template-columns: 1fr; gap: 8px; }
.set-inline { display: flex; gap: 8px; min-width: 0; }
.set-inline input { flex: 1; }
.settings-dialog input:not([type="checkbox"]), .settings-dialog select, .settings-dialog textarea, #share-url { width: 100%; min-width: 0; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: rgba(0, 0, 0, .35); color: var(--fg); font: 400 14px/1.4 var(--font-body); outline: 0; }
.settings-dialog select option { background: var(--bg-2); }
.settings-dialog input:focus, .settings-dialog select:focus, .settings-dialog textarea:focus { border-color: rgba(241, 245, 162, .45); }
#share-url { text-align: left; }
.set-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; }
.set-actions .btn, .set-row .btn { padding: 9px 14px; font-size: 13px; }
.set-lead { padding: 12px 0 4px; color: var(--muted); font-size: 14px; }
.set-sub { margin-top: 20px; font-size: 13px; font-weight: 400; color: var(--muted); }
.set-list { padding: 6px 0 4px; }
.set-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; }
.set-item span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.set-toggle { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.set-toggle span { display: grid; gap: 3px; }
.set-toggle b { font-weight: 400; font-size: 14px; }
.set-toggle small { color: var(--faint); font-size: 12.5px; }
.set-toggle input { flex: none; width: 17px; height: 17px; accent-color: var(--lime); }
#settings-note { padding-top: 12px; min-height: 0; }
.shared-log { max-width: 760px; margin: 0 auto; padding: 0; overflow: visible; }
.shared-log .msg.user { align-self: flex-end; }
@media (max-width: 860px) {
  .top-btn span:not(.sr-only) { display: none; }
  .msg-actions { opacity: 1; }
  .convo-more { opacity: 1; }
}
@media (max-width: 640px) {
  .settings-dialog[open] { max-height: calc(100dvh - 12px); }
  .settings-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .settings-tabs { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .settings-tabs button { flex: none; }
  .settings-panels { padding-inline: 16px; min-height: 0; }
  .set-row { grid-template-columns: 1fr; gap: 6px; }
  .set-row .btn { justify-self: start; }
}

/* Hidden parts must not shift the layout: these stack, with the log and list taking the spare room */
.app-main { display: flex; flex-direction: column; min-height: 0; }
.app-log { flex: 1 1 0; min-height: 0; }
.app-top, .app-composer { flex: none; }
.app-side { display: flex; flex-direction: column; min-height: 0; }
.convo-list { flex: 1 1 0; min-height: 0; }
.side-foot { flex: none; margin-top: auto; }
.settings-panels section { padding: 0; }
.settings-panels section[hidden] { display: none; }
.shared-log .msg.bot { align-self: stretch; }

/* Branches */
.branch-mark { display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--faint); font-size: 12.5px; }
.branch-mark::before, .branch-mark::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.branch-mark span { margin-left: 8px; }
.branch-link { max-width: 50%; margin-right: 8px; padding: 0; border: 0; background: none; color: var(--lime); font: 400 12.5px/1.3 var(--font-body); cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.branch-link:hover { text-decoration: underline; }
.convo-branch { color: var(--faint); }

/* SORAEN Chat: motion */
@property --sweep { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.app-log { scroll-behavior: auto; position: relative; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.975); } }
@keyframes sweep { to { --sweep: 360deg; } }
@keyframes breathe { 50% { opacity: 1; filter: drop-shadow(0 0 22px rgba(241, 245, 162, .34)); } }
@keyframes orbit { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes shimmer { to { background-position: -220% 0; } }
@keyframes halo { 0% { transform: scale(.7); opacity: .55; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes caret-blink { 50% { opacity: .15; } }

.turn.fresh { animation: rise .34s cubic-bezier(.2, .75, .25, 1) both; }
.turn.fresh.user-turn { animation-duration: .24s; }
.branch-mark { animation: fade .4s both; }

/* Thinking: the mark glows and sends out a soft halo, and the status shimmers */
.msg.bot > img { position: relative; transition: filter .3s; }
.turn.is-thinking .msg.bot { position: relative; }
.turn.is-thinking .msg.bot > img { animation: breathe 1.5s ease-in-out infinite; opacity: .75; }
.turn.is-thinking .msg.bot::before { content: ""; position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(241, 245, 162, .5); animation: halo 1.7s ease-out infinite; }
.turn.is-streaming .msg.bot > img { filter: drop-shadow(0 0 9px rgba(241, 245, 162, .28)); }
.thinking { display: inline-block; font-size: 15px; line-height: 1.8; }
.think-text { display: inline-block; background: linear-gradient(90deg, var(--muted) 30%, #fff 50%, var(--muted) 70%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.8s linear infinite, fade .3s both; }
.stream-caret { display: inline-block; width: 8px; height: 8px; margin-left: 5px; border-radius: 50%; vertical-align: 1px; background: var(--lime); box-shadow: 0 0 10px rgba(241, 245, 162, .6); animation: caret-blink .9s ease-in-out infinite; }

/* The message box: a thin light travels round it while SORAEN writes */
.composer-box { position: relative; transition: border-color .2s, box-shadow .25s; }
.composer-box:focus-within { box-shadow: 0 0 0 4px rgba(241, 245, 162, .05); }
.app-composer.busy .composer-box { border-color: transparent; }
.app-composer.busy .composer-box::before { content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--sweep), rgba(241, 245, 162, .08) 0 62%, var(--lime) 82%, rgba(241, 245, 162, .08) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: sweep 2.2s linear infinite; }
.send-btn { transition: background .2s, transform .15s, box-shadow .2s; }
.send-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(241, 245, 162, .18); }
.send-btn:active:not(:disabled) { transform: scale(.92); }
.send-btn svg { animation: pop .18s both; }

/* Welcome */
.welcome { animation: fade .5s both; }
.welcome-mark { position: relative; width: 104px; height: 104px; display: grid; place-items: center; margin-bottom: 6px; }
.welcome-mark img { position: relative; width: 92px; height: 92px; opacity: .85; animation: breathe 4.5s ease-in-out infinite; }
.welcome-mark .ring { border-color: rgba(241, 245, 162, .09); }
.welcome-mark .ring.r1 { width: 138px; border-style: dashed; animation: orbit 34s linear infinite; }
.welcome-mark .ring.r2 { width: 186px; border-color: rgba(241, 245, 162, .05); }
.welcome h1 { animation: rise .55s .08s cubic-bezier(.2, .75, .25, 1) both; }
.welcome .suggest button { animation: rise .5s cubic-bezier(.2, .75, .25, 1) both; transition: border-color .2s, color .2s, transform .2s, background .2s; }
.welcome .suggest button:nth-child(1) { animation-delay: .14s; }
.welcome .suggest button:nth-child(2) { animation-delay: .2s; }
.welcome .suggest button:nth-child(3) { animation-delay: .26s; }
.welcome .suggest button:nth-child(4) { animation-delay: .32s; }
.welcome .suggest button:hover:not(:disabled) { transform: translateY(-2px); background: rgba(241, 245, 162, .035); }

/* Sidebar */
.convo { position: relative; transition: background .15s; }
.convo.active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--lime); animation: fade .25s both; }
.convo.new-item { animation: rise .32s cubic-bezier(.2, .75, .25, 1) both; }
.new-chat { transition: background .2s, border-color .2s, transform .15s; }
.new-chat:hover:not(:disabled) { border-color: rgba(241, 245, 162, .3); }
.new-chat:active:not(:disabled) { transform: scale(.98); }
.new-chat svg { transition: transform .25s; }
.new-chat:hover:not(:disabled) svg { transform: rotate(90deg); }
.top-btn { transition: background .15s, color .15s; }

/* Windows and menus */
.popover:not([hidden]) { animation: pop .14s ease-out both; transform-origin: top left; }
.settings-dialog[open], .signin-dialog[open] { animation: pop .22s cubic-bezier(.2, .75, .25, 1) both; }
.settings-dialog[open]::backdrop, .signin-dialog[open]::backdrop { animation: fade .22s both; }
.settings-panels section:not([hidden]) { animation: fade .22s both; }
.settings-tabs button { transition: background .15s, color .15s; }
.set-toggle input { transition: transform .15s; }
.set-toggle input:active { transform: scale(.9); }

/* Jump to the latest message */
.to-bottom { position: absolute; left: 50%; top: -46px; width: 34px; height: 34px; margin-left: -17px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: #111611; color: var(--fg); cursor: pointer; box-shadow: 0 8px 22px rgba(0, 0, 0, .5); z-index: 3; transition: transform .15s; animation: pop .18s both; }
.to-bottom[hidden] { display: none; }
.to-bottom:hover { transform: translateY(-2px); }
.to-bottom svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-composer { position: relative; }

@media (prefers-reduced-motion: reduce) {
  .app *, .app *::before, .app *::after, .settings-dialog, .signin-dialog, .settings-dialog *, dialog::backdrop { animation: none !important; transition: none !important; }
  .think-text { background: none; color: var(--muted); }
}

/* SORAEN Chat on every screen */
@supports not (height: 100dvh) {
  .app-body, .app, .app-main { height: 100vh; }
}
.app-log .body p, .app-log .msg.user p, .app-log li { overflow-wrap: anywhere; }
.app-composer { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.app-top { padding-top: max(12px, env(safe-area-inset-top)); }
.app-side { padding-bottom: max(12px, env(safe-area-inset-bottom)); }

/* Tablets in landscape and small laptops: keep the sidebar, a little narrower */
@media (min-width: 861px) and (max-width: 1100px) {
  .app { grid-template-columns: 236px minmax(0, 1fr); }
}

/* Phones and tablets in portrait */
@media (max-width: 860px) {
  .app-side { padding-top: max(16px, env(safe-area-inset-top)); padding-left: max(12px, env(safe-area-inset-left)); }
  .app-log .msg.user { max-width: 88%; }
  /* iPhones zoom the page when a focused box is under 16px */
  .composer-box textarea, .side-search input, .edit-box textarea, .convo-rename, .signin-dialog input,
  .settings-dialog input:not([type="checkbox"]), .settings-dialog select, .settings-dialog textarea, #share-url { font-size: 16px; }
  .edit-box { width: 100%; }
  .welcome { padding-bottom: 12px; }
}

/* Fingers, not a mouse: bigger targets, and nothing hidden behind hover */
@media (hover: none) {
  .msg-actions, .convo-more { opacity: 1; }
}
@media (pointer: coarse) {
  .msg-actions button { padding: 8px 11px; font-size: 13px; }
  .convo-open { padding: 12px 10px; }
  .convo-more { padding: 8px 10px; }
  .composer-box .icon-btn, .send-btn { width: 42px; height: 42px; }
  .top-btn { padding: 10px; }
  .popover button { padding: 12px; font-size: 15px; }
  .settings-tabs button { padding: 11px 13px; }
  .account-menu a, .account-menu button { padding: 12px 10px; }
  .welcome .suggest button { padding: 15px 16px; }
  .to-bottom { width: 40px; height: 40px; margin-left: -20px; top: -52px; }
}

/* Phones: Settings rises from the bottom, like a native app */
@media (max-width: 640px) {
  .settings-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 18px 18px 0 0; border-width: 1px 0 0; }
  .settings-dialog[open] { max-height: 90dvh; }
  .settings-panels { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .signin-dialog { padding: 30px 22px 22px; }
  .set-actions .btn { flex: 1 1 auto; }
  .branch-link { max-width: 45%; }
}

/* Phones held sideways: the conversation needs the height */
@media (max-height: 500px) and (orientation: landscape) {
  .welcome-mark { display: none; }
  .welcome { padding-bottom: 0; gap: 8px; }
  .welcome .suggest { grid-template-columns: 1fr 1fr; margin-top: 4px; }
  .welcome .suggest button:nth-child(n+3) { display: none; }
  .app-top { min-height: 0; padding-block: 6px; }
  .app-composer .fine { display: none; }
  .settings-dialog[open] { max-height: 100dvh; }
}

/* Screen fit: the website grows with big monitors instead of sitting in a thin strip */
@media (min-width: 1600px) { body:not(.app-body) { zoom: 1.12; } }
@media (min-width: 2200px) { body:not(.app-body) { zoom: 1.4; } }
@media (min-width: 3000px) { body:not(.app-body) { zoom: 1.9; } }

/* Tablets: side by side where there's room */
@media (min-width: 720px) and (max-width: 960px) {
  .lab-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); }
  .lab-mark { order: 0; width: auto; }
  .lab-hero h1 { font-size: clamp(36px, 5.3vw, 50px); }
  .plans { grid-template-columns: 1fr 1fr; }
  .plans .plan:last-child { grid-column: 1 / -1; }
  .lite-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .company { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* Chat: sizes the reader can change, and that grow with the screen */
.app-body { --k: 1; }
.app-body[data-text="small"] { --k: .92; }
.app-body[data-text="large"] { --k: 1.14; }
.app { --chat-w: 760px; --chat-font: 15.5px; transition: grid-template-columns .22s ease; }
.app-log .msg.bot .body { font-size: calc(var(--chat-font) * var(--k)); }
.app-log .msg.user p, .composer-box textarea { font-size: calc(var(--chat-font) * var(--k)); }
.app-log pre { font-size: calc(13px * var(--k)); }
.app .menu-btn { display: grid; }
.app-side { overflow: hidden; }
@media (min-width: 861px) {
  .app-log, .app-composer { padding-inline: max(24px, calc((100% - var(--chat-w)) / 2)); }
  .app.side-hidden { grid-template-columns: 0 minmax(0, 1fr); }
  .app.side-hidden .app-side { visibility: hidden; padding-inline: 0; border-right: 0; }
  .app-side { transition: visibility .22s; }
  .app-body[data-width="wide"] .app { --chat-w: 1080px; }
  .app-body[data-width="full"] .app { --chat-w: 94%; }
}
@media (min-width: 1800px) {
  .app { --chat-w: 880px; --chat-font: 16.5px; grid-template-columns: 300px minmax(0, 1fr); }
  .convo-open { font-size: 15px; }
  .welcome h1 { font-size: 40px; }
  .welcome .suggest { max-width: 760px; }
  .welcome .suggest button { font-size: 15px; }
}
@media (min-width: 2300px) {
  .app { --chat-w: 1080px; --chat-font: 19px; grid-template-columns: 360px minmax(0, 1fr); }
  .convo-open { font-size: 17px; padding-block: 11px; }
  .new-chat, .side-search input, .model-name, .fine { font-size: 16px; }
  .welcome h1 { font-size: 50px; }
  .welcome .suggest { max-width: 940px; }
  .welcome .suggest button { font-size: 17px; padding: 18px 20px; }
  .welcome-mark { transform: scale(1.3); margin-block: 16px; }
  .app-body[data-width="wide"] .app { --chat-w: 1440px; }
}

/* Tablets in portrait: room for all four suggestions */
@media (min-width: 600px) and (max-width: 860px) and (min-height: 501px) {
  .welcome .suggest { grid-template-columns: 1fr 1fr; }
  .welcome .suggest button:nth-child(n+3) { display: block; }
}
@media (max-width: 860px) { .set-desktop { display: none; } }
