/* Cherry webchat. Plain CSS, no build step. Light + dark, responsive down to ~320px. */
:root {
  --cherry: #d6264f; --cherry-2: #ef476f; --cherry-ink: #ffffff; --leaf: #2d8a4e;
  --bg: #faf6f4; --panel: #ffffff; --panel-2: #fcf9f8; --ink: #231a1d; --muted: #7a6c70; --line: #ece4e2;
  --soft: #fdeef1; --soft-ink: #a31d3d;
  --ok: #17794a; --ok-bg: #e8f6ee; --warn: #9a5b00; --warn-bg: #fff4de; --bad: #b3261e; --bad-bg: #fdecea;
  --info-bg: #f1f4ff; --info: #3a56c4;
  --shadow: 0 1px 2px rgba(35,26,29,.06), 0 8px 24px rgba(35,26,29,.06);
  --c1: #d6264f; --c2: #2f6fdd; --c3: #21966b; --c4: #8b5cf6; --c5: #e07b00; --c6: #0e7490;
  --radius: 14px; --rail-w: 292px; --insp-w: 320px;
  --gold: #e8b42b; --grad: linear-gradient(135deg, var(--cherry), var(--cherry-2));
  --lift: 0 10px 28px color-mix(in srgb, var(--cherry) 16%, transparent);
}
:root[data-theme="dark"] {
  --bg: #130e10; --panel: #1b1417; --panel-2: #20181b; --ink: #f2e9ec; --muted: #a8979c; --line: #302428;
  --soft: #34171f; --soft-ink: #ff8da6; --cherry: #ee3a63; --cherry-2: #ff6b8b;
  --ok: #55d08c; --ok-bg: #12291d; --warn: #f2b24d; --warn-bg: #32250c; --bad: #ff8a80; --bad-bg: #3a1815;
  --info-bg: #182036; --info: #8fa6ff; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --c1: #ff6b8b; --c2: #6b9bff; --c3: #4cc79a; --c4: #b69cff; --c5: #f0a04b; --c6: #4fc3d9;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #130e10; --panel: #1b1417; --panel-2: #20181b; --ink: #f2e9ec; --muted: #a8979c; --line: #302428;
    --soft: #34171f; --soft-ink: #ff8da6; --cherry: #ee3a63; --cherry-2: #ff6b8b;
    --ok: #55d08c; --ok-bg: #12291d; --warn: #f2b24d; --warn-bg: #32250c; --bad: #ff8a80; --bad-bg: #3a1815;
    --info-bg: #182036; --info: #8fa6ff; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --c1: #ff6b8b; --c2: #6b9bff; --c3: #4cc79a; --c4: #b69cff; --c5: #f0a04b; --c6: #4fc3d9;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--cherry-2); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
svg.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; stroke: none; }

/* ---------- layout ---------- */
.app { height: 100dvh; display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr) 0; transition: grid-template-columns .25s ease; }
.app.insp-open { grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--insp-w); }
.rail { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; padding: 16px 14px 12px; gap: 14px; }
.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background:
  radial-gradient(900px 380px at 12% -140px, color-mix(in srgb, var(--cherry) 11%, transparent), transparent 70%),
  radial-gradient(800px 340px at 92% -120px, color-mix(in srgb, var(--gold) 13%, transparent), transparent 70%), var(--bg); }
.inspector { background: var(--panel); border-left: 1px solid var(--line); overflow: hidden; min-width: 0; display: flex; flex-direction: column; }
.app:not(.insp-open) .inspector { visibility: hidden; }

/* ---------- rail ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(135deg, var(--soft), color-mix(in srgb, var(--gold) 22%, var(--panel))); display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); }
.logo svg { width: 26px; height: 26px; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand-sub { color: var(--muted); font-size: 12px; }
.btn-new { display: flex; align-items: center; justify-content: center; gap: 8px; border: none; background: var(--grad); color: var(--cherry-ink); border-radius: 13px; padding: 10px 12px; font-weight: 700; box-shadow: 0 6px 16px color-mix(in srgb, var(--cherry) 28%, transparent); transition: transform .15s, box-shadow .15s; }
.btn-new:hover { transform: translateY(-1px); box-shadow: 0 10px 22px color-mix(in srgb, var(--cherry) 34%, transparent); }
.rail-section h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; font-weight: 700; }
.rail-section.grow { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.count { background: var(--soft); color: var(--soft-ink); border-radius: 99px; padding: 0 7px; margin-left: 4px; font-size: 11px; }
.field { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
select { width: 100%; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; appearance: none; -webkit-appearance: none;
  background: var(--panel-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center / 15px;
  border: 1px solid var(--line); border-radius: 11px; padding: 8px 30px 8px 11px; transition: border-color .15s, box-shadow .15s; }
select:hover { border-color: color-mix(in srgb, var(--cherry) 40%, var(--line)); }
select:focus-visible { outline: none; border-color: var(--cherry-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cherry) 16%, transparent); }
.hint { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.search { position: relative; margin-bottom: 8px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px 9px 33px; transition: border-color .15s, box-shadow .15s; }
.search input:focus { outline: none; border-color: var(--cherry-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cherry) 16%, transparent); }
.guide-list { overflow: auto; flex: 1; min-height: 0; margin: 0 -6px; padding: 0 6px; }
.guide-group { margin-bottom: 4px; border-radius: 12px; }
.guide-group > summary { cursor: pointer; list-style: none; font-size: 12.5px; font-weight: 700; color: var(--ink); text-transform: capitalize; padding: 8px 8px; display: flex; align-items: center; gap: 8px; border-radius: 10px; transition: background .15s; }
.guide-group > summary:hover { background: var(--panel-2); }
.guide-group > summary::-webkit-details-marker { display: none; }
.guide-group > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .18s; flex: none; margin: 0 3px 0 2px; }
.guide-group[open] > summary::before { transform: rotate(45deg); }
.guide-group > summary span:first-child { flex: 1; }
.guide-group > summary span:last-child { background: var(--soft); color: var(--soft-ink); border-radius: 99px; padding: 0 8px; font-size: 11px; font-weight: 700; }
.guide-group[open] { background: color-mix(in srgb, var(--soft) 45%, transparent); }
.guide-item { position: relative; display: block; width: 100%; text-align: left; background: none; border: none; padding: 7px 10px 7px 26px; border-radius: 9px; font-size: 13.5px; line-height: 1.35; color: var(--ink); transition: background .12s, color .12s; }
.guide-item::before { content: ""; position: absolute; left: 12px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--line); transform: translateY(-50%); transition: background .12s, transform .12s; }
.guide-item:hover { background: var(--soft); color: var(--soft-ink); }
.guide-item:hover::before { background: var(--cherry); transform: translateY(-50%) scale(1.5); }
.rail-foot { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px; font-size: 12.5px; color: var(--muted); }
.chip-btn:hover { color: var(--cherry); border-color: var(--cherry-2); }

/* ---------- chat header ---------- */
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 85%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 3; }
.who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--soft), color-mix(in srgb, var(--cherry-2) 22%, var(--panel))); display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1px var(--line); }
.avatar svg { width: 24px; height: 24px; }
.who-name { font-weight: 700; line-height: 1.15; }
.who-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { background: none; border: 1px solid transparent; border-radius: 10px; width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--soft); color: var(--soft-ink); }
.status-pill { display: inline-flex; align-items: center; gap: 7px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px; font-size: 12.5px; color: var(--muted); max-width: 46vw; }
.status-pill span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: #2fbf71; box-shadow: 0 0 0 3px color-mix(in srgb, #2fbf71 25%, transparent); }
.dot.warn { background: #f0a020; }
.dot.off { background: #e0524d; }
.notice { margin: 10px 18px 0; padding: 9px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 13.5px; }

/* ---------- messages ---------- */
.log-wrap { position: relative; flex: 1; min-height: 0; }
.log { height: 100%; overflow-y: auto; padding: 22px 18px 12px; display: flex; flex-direction: column; gap: 18px; scroll-behavior: smooth; }
.log > * { width: min(100%, 780px); margin-inline: auto; }
.to-bottom { position: absolute; right: 22px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); display: grid; place-items: center; }
.row { display: flex; gap: 10px; animation: rise .22s ease both; }
.row.user { justify-content: flex-end; }
.row .avatar { width: 32px; height: 32px; margin-top: 2px; }
.row .avatar svg { width: 19px; height: 19px; }
.bubble-user { background: linear-gradient(135deg, var(--cherry), var(--cherry-2)); color: var(--cherry-ink); border-radius: 18px 18px 4px 18px; padding: 9px 14px; max-width: min(85%, 560px); white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 4px 14px color-mix(in srgb, var(--cherry) 28%, transparent); }
.bot-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1; }
.lead, .stream { background: var(--panel); border: 1px solid var(--line); border-radius: 4px 18px 18px 18px; padding: 10px 14px; box-shadow: var(--shadow); overflow-wrap: anywhere; }
.lead p, .stream p { margin: 0 0 6px; } .lead p:last-child, .stream p:last-child { margin: 0; }
.lead ul, .stream ul { margin: 4px 0; padding-left: 20px; }
.lead code, .stream code { background: var(--soft); color: var(--soft-ink); border-radius: 6px; padding: 1px 5px; font-size: .9em; }
.lead { animation: fade .35s ease both; }
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px 18px 18px 18px; width: fit-content; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--cherry-2); animation: bounce 1.1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.msg-tools { display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.row:hover .msg-tools, .row:focus-within .msg-tools { opacity: 1; }
.tiny-btn { background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; padding: 2px 8px; color: var(--muted); }
.tiny-btn:hover { color: var(--cherry); border-color: var(--cherry-2); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }

/* ---------- welcome ---------- */
.welcome { text-align: center; padding: 26px 4px 8px; animation: rise .35s ease both; }
.welcome .big { width: 80px; height: 80px; margin: 0 auto 14px; border-radius: 26px; display: grid; place-items: center; background: linear-gradient(135deg, var(--soft), color-mix(in srgb, var(--gold) 26%, var(--panel))); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.welcome .big svg { width: 46px; height: 46px; }
.welcome h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.025em; background: linear-gradient(120deg, var(--ink) 30%, var(--cherry)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.welcome p { margin: 0 auto 22px; max-width: 520px; color: var(--muted); }
.starters-label { display: flex; align-items: center; gap: 10px; margin: 0 2px 10px; text-align: left; font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.starters-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.starters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; text-align: left; }
.starter { --tile: var(--c1); position: relative; overflow: hidden; display: grid; grid-template-columns: 44px minmax(0, 1fr) 18px; gap: 12px; align-items: center; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: calc(var(--radius) + 2px); padding: 13px 14px; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s, border-color .18s; }
.starter:nth-child(6n+2) { --tile: var(--c2); } .starter:nth-child(6n+3) { --tile: var(--c3); } .starter:nth-child(6n+4) { --tile: var(--c4); }
.starter:nth-child(6n+5) { --tile: var(--c5); } .starter:nth-child(6n+6) { --tile: var(--c6); }
.starter::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--tile); opacity: 0; transition: opacity .18s; }
.starter:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tile) 50%, var(--line)); box-shadow: 0 12px 28px color-mix(in srgb, var(--tile) 18%, transparent); }
.starter:hover::before { opacity: 1; }
.starter .ic { width: 44px; height: 44px; border-radius: 13px; background: color-mix(in srgb, var(--tile) 13%, var(--panel)); color: var(--tile); display: grid; place-items: center; }
.starter .ic svg { width: 22px; height: 22px; }
.starter b { display: block; font-size: 14.5px; line-height: 1.25; } .starter span.d { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: 2px; }
.starter .go { color: var(--line); display: grid; transition: transform .18s, color .18s; }
.starter:hover .go { color: var(--tile); transform: translateX(3px); }
@media (max-width: 560px) { .starters { grid-template-columns: 1fr; } }

/* ---------- blocks ---------- */
.callout { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 10px 13px; background: var(--info-bg); color: var(--info); font-size: 14px; }
.callout.warn { background: var(--warn-bg); color: var(--warn); } .callout.success { background: var(--ok-bg); color: var(--ok); }
.callout .t { color: var(--ink); } .callout.warn .t, .callout.success .t { color: inherit; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { background: var(--panel); border: 1px solid var(--line); color: var(--soft-ink); border-radius: 99px; padding: 6px 14px; font-size: 13.5px; font-weight: 550; transition: all .15s; }
.chip:hover { background: var(--soft); border-color: var(--cherry-2); transform: translateY(-1px); box-shadow: 0 6px 14px color-mix(in srgb, var(--cherry) 14%, transparent); }
.chip[disabled] { opacity: .5; pointer-events: none; }

/* "Which of these do you mean?" and "things I can help with": numbered rows, not loose pills */
.choices { background: var(--panel); border: 1px solid var(--line); border-radius: calc(var(--radius) + 2px); padding: 14px; box-shadow: var(--shadow); animation: rise .25s ease both; }
.choices-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; margin: 0 2px 10px; }
.choices-head svg { color: var(--cherry); width: 1.25em; height: 1.25em; }
.choice-list { display: grid; gap: 8px; }
.choice { display: grid; grid-template-columns: 30px minmax(0, 1fr) 16px; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 9px 12px 9px 9px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel-2); transition: transform .15s, border-color .15s, background .15s, box-shadow .15s; }
.choice .n { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--soft-ink); font-weight: 800; font-size: 13px; transition: background .15s, color .15s; }
.choice .t { font-weight: 600; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.choice .go { color: var(--muted); display: grid; transition: transform .15s, color .15s; }
.choice:hover { transform: translateX(3px); border-color: var(--cherry-2); background: var(--soft); box-shadow: 0 6px 16px color-mix(in srgb, var(--cherry) 12%, transparent); }
.choice:hover .n { background: var(--grad); color: #fff; } .choice:hover .go { color: var(--cherry); transform: translateX(2px); }
.choice-none { display: flex; align-items: center; gap: 11px; width: 100%; margin-top: 10px; text-align: left; padding: 10px 12px 10px 9px; border-radius: 13px; border: 1.5px dashed color-mix(in srgb, var(--cherry) 38%, var(--line)); background: transparent; transition: background .15s, border-color .15s, transform .15s; }
.choice-none .sp { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; box-shadow: 0 4px 10px color-mix(in srgb, var(--cherry) 30%, transparent); }
.choice-none .tx b { display: block; font-size: 14px; } .choice-none .tx small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.choice-none:hover { background: var(--soft); border-style: solid; border-color: var(--cherry-2); transform: translateY(-1px); }

.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: calc(var(--radius) + 2px); overflow: hidden; box-shadow: var(--shadow); animation: rise .25s ease both; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--cherry), var(--gold)); opacity: .9; }
.card-head { padding: 14px 16px 12px; display: flex; gap: 12px; }
.card-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--soft); color: var(--soft-ink); display: grid; place-items: center; flex: none; }
.card-title { font-weight: 750; font-size: 16.5px; letter-spacing: -.01em; line-height: 1.3; }
.card-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag { font-size: 11.5px; border-radius: 99px; padding: 1px 9px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.tag.partial { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.progress { padding: 0 16px 10px; }
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cherry), var(--cherry-2)); border-radius: 99px; transition: width .3s ease; }
.progress small { color: var(--muted); font-size: 12px; }
.gate { display: flex; gap: 9px; margin: 0 16px 12px; padding: 9px 12px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-size: 13.5px; }
.prereq { margin: 0 16px 12px; padding: 9px 12px; border-radius: 10px; background: var(--info-bg); font-size: 13.5px; }
.prereq b { color: var(--info); }
.prereq .chips { margin-top: 6px; } .prereq .chip { padding: 3px 11px; font-size: 12.5px; box-shadow: none; }
ol.steps { list-style: none; margin: 0; padding: 4px 8px 6px; counter-reset: s; }
ol.steps > li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 8px; border-top: 1px solid var(--line); counter-increment: s; }
ol.steps > li:first-child { border-top: none; }
.num { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--muted); transition: all .2s; position: relative; }
.num::before { content: counter(s); }
li.done .num { background: var(--leaf); border-color: var(--leaf); color: #fff; }
li.done .num::before { content: "✓"; }
li.done .step-text { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.num { cursor: pointer; }
.step-text { overflow-wrap: anywhere; }
.fields { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.fields li { display: flex; gap: 8px; align-items: baseline; font-size: 13px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; flex-wrap: wrap; }
.fields b { font-weight: 650; } .fields .n { color: var(--muted); }
.req { font-size: 10.5px; font-weight: 700; color: var(--bad); background: var(--bad-bg); border-radius: 99px; padding: 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.tip { margin-top: 6px; font-size: 13px; color: var(--muted); }
.open-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--cherry); background: var(--soft); border-radius: 99px; padding: 4px 12px; text-decoration: none; }
.open-btn:hover { background: color-mix(in srgb, var(--cherry) 18%, var(--panel)); }
.card-foot { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 16px 14px; border-top: 1px solid var(--line); background: var(--panel-2); }
.btn-primary { background: linear-gradient(135deg, var(--cherry), var(--cherry-2)); color: var(--cherry-ink); border: none; border-radius: 99px; padding: 7px 16px; font-weight: 650; font-size: 13.5px; box-shadow: 0 4px 12px color-mix(in srgb, var(--cherry) 30%, transparent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; font-size: 13.5px; }
.btn-ghost:hover { border-color: var(--cherry-2); color: var(--cherry); }
details.notes { margin: 0; border-top: 1px solid var(--line); }
details.notes > summary { cursor: pointer; padding: 10px 16px; font-size: 13px; font-weight: 650; color: var(--muted); }
details.notes ul { margin: 0; padding: 0 16px 12px 34px; color: var(--muted); font-size: 13.5px; }
.step-focus { border: 1px solid var(--line); border-left: 4px solid var(--cherry); background: var(--panel); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.step-focus .n { font-size: 12px; color: var(--muted); font-weight: 650; }
.dots { display: flex; gap: 4px; margin: 6px 0 8px; } .dots i { height: 4px; flex: 1; border-radius: 4px; background: var(--line); } .dots i.on { background: var(--cherry); }
.link-card { display: flex; gap: 12px; align-items: center; }
.chart { padding: 14px 16px; }
.chart h3 { margin: 0 0 8px; font-size: 15px; } .chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.insight { margin-top: 8px; font-size: 13.5px; padding: 8px 10px; background: var(--soft); border-radius: 10px; color: var(--soft-ink); }
.wrap-x { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 13.5px; } table.data th, table.data td { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left; }

/* ---------- composer ---------- */
.composer { padding: 8px 18px calc(12px + env(safe-area-inset-bottom)); }
.composer-box { width: min(100%, 780px); margin: 0 auto; display: flex; align-items: flex-end; gap: 8px; background: var(--panel); border: 1.5px solid var(--line); border-radius: 24px; padding: 8px 8px 8px 18px; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.composer-box:focus-within { border-color: var(--cherry-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cherry) 13%, transparent), var(--shadow); }
textarea { flex: 1; resize: none; border: none; outline: none; background: none; font: inherit; color: var(--ink); max-height: 140px; padding: 6px 0; line-height: 1.45; }
.send { width: 40px; height: 40px; border-radius: 50%; border: none; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, var(--cherry), var(--cherry-2)); color: #fff; transition: transform .1s, opacity .15s; }
.send:hover { transform: scale(1.07); box-shadow: 0 6px 14px color-mix(in srgb, var(--cherry) 32%, transparent); } .send:disabled { opacity: .4; transform: none; cursor: default; }
.composer-hint { width: min(100%, 780px); margin: 6px auto 0; text-align: center; font-size: 11.5px; color: var(--muted); }
kbd { background: var(--panel-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; font: inherit; font-size: 11px; }

/* ---------- inspector ---------- */
.insp-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 6px; } .insp-head h2 { margin: 0; font-size: 15px; }
.tabs { display: flex; gap: 4px; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.tab { background: none; border: none; padding: 6px 12px; border-radius: 99px; font-size: 13px; color: var(--muted); }
.tab.on { background: var(--soft); color: var(--soft-ink); font-weight: 650; }
.tabpane { display: none; overflow: auto; padding: 12px 16px; flex: 1; min-height: 0; } .tabpane.on { display: block; }
.kv { margin: 0; font-size: 13px; } .kv dt { color: var(--muted); margin-top: 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; } .kv dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.zero { color: var(--ok); font-weight: 700; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.timeline li { display: grid; grid-template-columns: 54px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.timeline .ms { color: var(--muted); font-variant-numeric: tabular-nums; } .timeline .st { font-weight: 650; } .timeline .dt { color: var(--muted); display: block; font-weight: 400; word-break: break-word; }
.timeline li.err .st { color: var(--bad); }
.models { display: grid; gap: 8px; font-size: 13px; }
.m { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.m .nm { overflow-wrap: anywhere; } .m small { color: var(--muted); }
.m-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 8px 0 -2px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; }
.toast { background: var(--ink); color: var(--bg); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 13.5px; animation: rise .2s ease both; max-width: 320px; }

/* ---------- responsive ---------- */
.only-mobile { display: none; } .scrim { display: none; }
@media (max-width: 1100px) {
  .app.insp-open { grid-template-columns: var(--rail-w) minmax(0, 1fr) 0; }
  .inspector { position: fixed; right: 0; top: 0; bottom: 0; width: min(92vw, 360px); z-index: 30; visibility: hidden; transform: translateX(100%); transition: transform .25s; box-shadow: var(--shadow); }
  .app.insp-open .inspector { visibility: visible; transform: none; }
}
@media (max-width: 820px) {
  .app, .app.insp-open { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; left: 0; top: 0; bottom: 0; width: min(86vw, 320px); z-index: 40; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow); }
  .app.rail-open .rail { transform: none; }
  .scrim.on { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
  .only-mobile { display: grid; }
  .chat-head { padding: 10px 12px; } .log { padding: 16px 12px 8px; } .composer { padding-inline: 12px; }
  .status-pill { max-width: 38vw; } .composer-hint { display: none; } .who-sub { display: none; }
  .welcome h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.tips { padding: 14px 16px; } .tip-list { margin: 8px 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.feedback { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.feedback .fb { padding: 2px 8px; } .fb-done { color: var(--muted); }

.starter:last-child:nth-child(odd) { grid-column: 1 / -1; }
