@font-face {
  font-family: Figtree; src: url("figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: Figtree; src: url("figtree-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 300 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* C4P design system, colour balance of 17 Nov 2026 */
:root {
  --page: #fafbfc; --mist: #f3f8f9; --white: #fff;
  --ink: #25313b; --ink-muted: #51616d; --rule: #d8e4e8;
  --primary: #2e758c; --link: #246779; --mark: #315e75;
  --charcoal: #333e48; --accent-light: #7bc4d0;
  --chart-bar: #80a7b4; --chart-soft: #dbeaf0;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
  font: 16px/1.55 Figtree, system-ui, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); }
p, h1, h2, h3, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; z-index: 9; top: .5rem; left: .5rem; padding: .5rem .8rem; background: var(--white); border-radius: 6px; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* App shell */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.side { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.1rem .9rem 1.2rem; background: var(--mist); border-right: 1px solid var(--rule); overflow-y: auto; }
.logo { display: inline-flex; align-self: flex-start; padding: .5rem .7rem; border-radius: 10px; background: var(--charcoal); }
.logo img { display: block; }
.new { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .6rem .75rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--white); font-size: .92rem; font-weight: 500; text-align: left; }
.new::before { content: "+"; font-size: 1.15rem; line-height: 1; color: var(--primary); }
.new:hover { border-color: var(--chart-bar); }
.examples { display: grid; gap: 1rem; }
.ex-group p { padding: 0 .75rem .3rem; font-size: .76rem; color: var(--ink-muted); }
.ex-group ul { display: grid; gap: 2px; }
.ex-group button { width: 100%; padding: .5rem .75rem; border: 0; border-radius: 8px; background: none; font-size: .9rem; text-align: left; color: var(--ink); transition: background-color .2s; }
.ex-group button:hover { background: #e8f1f3; }
.ex-group button[aria-current="true"] { background: var(--white); box-shadow: 0 0 0 1px var(--rule); font-weight: 500; }
.side-foot { margin-top: auto; display: grid; gap: .7rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.side-foot p { font-size: .76rem; color: var(--ink-muted); }
.legal a { color: var(--ink-muted); }
.hint-legal { display: none; color: var(--ink-muted); }
.see-more { font-size: .9rem; font-weight: 500; }
.btn { display: inline-flex; justify-content: center; padding: .62rem .9rem; border-radius: 8px; background: var(--primary); color: var(--white); font-size: .9rem; font-weight: 600; text-decoration: none; }
.btn:hover { background: #245f72; }

/* Main column */
.main { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto 0; min-width: 0; min-height: 0; transition: grid-template-rows .5s var(--ease); }
/* empty state: greeting and composer sit together, a little above centre */
.app:not(.chatting) .main { grid-template-rows: auto auto minmax(0, 1fr) auto minmax(0, .8fr); }
.app:not(.chatting) .stage { display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.app:not(.chatting) .welcome { padding: 0 0 1.6rem; }
.app:not(.chatting) .chips { order: 2; }
.app:not(.chatting) .hint { order: 3; }
.topbar { display: flex; align-items: center; gap: .9rem; padding: .8rem 1.4rem; }
.logo-sm { display: none; }
.connected { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .65rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--white); font-size: .8rem; color: var(--ink-muted); }
.connected i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px #2e758c26; }
.progress { margin-left: auto; font-size: .82rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.pause { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border: 1px solid var(--chart-bar); border-radius: 999px; background: var(--white); font-size: .86rem; font-weight: 500; color: var(--ink); transition: border-color .2s, background-color .2s; }
.pause:hover { border-color: var(--primary); background: var(--mist); }
.pause svg { width: 14px; height: 14px; fill: none; stroke: var(--primary); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pause .i-play { display: none; fill: var(--primary); stroke-width: 1.4; }
.pause[aria-pressed="true"] .i-pause { display: none; }
.pause[aria-pressed="true"] .i-play { display: inline; }
.pause[aria-pressed="true"] { border-color: var(--primary); }
.top-more { display: inline-flex; align-items: center; padding: .45rem .9rem; border: 1px solid var(--primary); border-radius: 999px; background: var(--white); font-size: .86rem; font-weight: 600; color: var(--link); text-decoration: none; transition: background-color .2s; }
.top-more:hover { background: var(--mist); }

/* Guide: the three steps and what the current example shows */
.guide { width: min(808px, 100%); margin: 0 auto; padding: .2rem 1.4rem .9rem; display: grid; gap: .55rem; }
.guide-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--rule); }
.guide-tabs button { position: relative; padding: .5rem 0 .6rem; border: 0; background: none; font-size: .95rem; font-weight: 500; color: var(--ink-muted); transition: color .3s; }
.guide-tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--primary); transform: scaleX(0); transition: transform .5s var(--ease); }
.guide-tabs button:hover { color: var(--ink); }
.guide-tabs button[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.guide-tabs button[aria-pressed="true"]::after { transform: scaleX(1); }
.guide-note { min-height: 3.1em; font-size: .92rem; line-height: 1.55; color: var(--ink-muted); transition: opacity .35s; }
.guide-note.swap { opacity: 0; }
.app:not(.chatting) .guide-note { display: none; }
.app.chatting .stage { -webkit-mask-image: linear-gradient(transparent, #000 1.2rem); mask-image: linear-gradient(transparent, #000 1.2rem); }
.guide-note a { font-weight: 500; white-space: nowrap; }
.pause[hidden] + .top-more { margin-left: auto; }
.top-cta { display: none; padding: .38rem .7rem; font-size: .82rem; }

.stage { overflow-y: auto; scroll-behavior: smooth; padding: 0 1.4rem; }
.welcome, .thread, .dock { width: min(760px, 100%); margin-inline: auto; }
.welcome { padding-top: clamp(3rem, 16vh, 9rem); text-align: center; transition: opacity .35s ease, transform .35s ease; }
.welcome h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.welcome p { max-width: 46ch; margin: .8rem auto 0; color: var(--ink-muted); font-size: 1.02rem; }
.app.chatting .welcome { display: none; }
.thread { display: grid; gap: 1.6rem; padding: 1.2rem 0 1.6rem; }
.app.chatting .thread { padding-bottom: 45vh; }

/* Messages */
.msg-user { justify-self: end; max-width: 82%; padding: .7rem 1rem; border-radius: 18px 18px 6px 18px; background: #e7f0f2; animation: in .35s var(--ease) both; }
.msg-user .file { display: inline-flex; margin-top: .45rem; padding: .2rem .55rem; border-radius: 6px; background: var(--white); font-size: .8rem; color: var(--ink-muted); }
.msg-user .file::before { content: ""; width: .62rem; height: .8rem; margin: .12rem .45rem 0 0; background: var(--chart-bar); border-radius: 1px 4px 1px 1px; }
.msg-ai { display: grid; gap: .75rem; animation: in .35s var(--ease) both; }
.step { display: inline-flex; align-items: center; gap: .5rem; justify-self: start; font-size: .84rem; color: var(--ink-muted); }
.step .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--chart-soft); border-top-color: var(--primary); animation: spin .8s linear infinite; }
.step.done .dot { border: 0; background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; animation: pop .3s var(--ease); }
.answer { display: grid; gap: .7rem; }
.answer h2 { font-size: 1.12rem; font-weight: 600; }
.answer .text { color: var(--ink); max-width: 68ch; }
.answer .text.streaming::after, .draft-box.streaming::after { content: ""; display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--primary); border-radius: 1px; animation: blink 1s steps(1) infinite; }
.fade { animation: in .4s var(--ease) both; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; font-size: .8rem; color: var(--ink-muted); }
.meta a { font-weight: 500; }
.follow { justify-self: start; display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .8rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--white); font-size: .86rem; color: var(--ink); transition: border-color .2s; }
.follow:hover { border-color: var(--chart-bar); }
.follow span { color: var(--ink-muted); }

/* Answer blocks */
.card { padding: .9rem 1rem; border: 1px solid var(--rule); border-radius: 12px; background: var(--white); }
.rows li { display: grid; grid-template-columns: 3.6rem minmax(0, 12rem) minmax(0, 1fr); gap: .8rem; padding: .55rem 0; border-top: 1px solid var(--rule); font-size: .9rem; animation: in .6s var(--ease) both; }
.rows li:first-child { border-top: 0; padding-top: 0; }
.rows .d { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.rows .b { color: var(--ink-muted); }
.bars { display: grid; gap: .55rem; }
.bars li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) auto; align-items: center; gap: .8rem; font-size: .9rem; }
.bars .track { height: 12px; }
.bars .fill { display: block; height: 100%; width: 0; border-radius: 0 4px 4px 0; background: var(--chart-bar); transition: width 1.4s var(--ease); }
.bars li:first-child .fill { background: var(--primary); }
.bars .v { font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.bars .v small { margin-left: .4rem; color: var(--ink-muted); font-size: .8rem; }
.bars-unit { margin-top: .6rem; font-size: .78rem; color: var(--ink-muted); }
.pairs { display: grid; gap: .8rem; }
.pairs div { display: grid; gap: .2rem; animation: in .35s var(--ease) both; }
.pairs dt { font-size: .8rem; color: var(--ink-muted); }
.pairs dd { margin: 0; }
.crit-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1rem; }
.crit-wrap .bars li { grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr) 3.4rem; gap: .6rem; }
.crit-wrap .bars .v { text-align: right; }
.themes { display: grid; gap: .5rem; counter-reset: t; }
.themes li { counter-increment: t; position: relative; padding-left: 1.9rem; font-size: .92rem; animation: in .35s var(--ease) both; }
.themes li::before { content: counter(t); position: absolute; left: 0; top: .1rem; width: 1.3rem; height: 1.3rem; display: grid; place-items: center; border-radius: 50%; background: var(--mark); color: var(--white); font-size: .72rem; font-weight: 600; }
.draft-box { padding: 1rem 1.1rem; border: 1px solid var(--rule); border-radius: 12px; background: var(--white); line-height: 1.65; max-width: 68ch; }
.draft-box mark { background: var(--chart-soft); color: var(--mark); padding: .05rem .35rem; border-radius: 4px; box-shadow: inset 0 -1px 0 var(--accent-light); }

/* Composer dock */
.dock { padding: .4rem 1.4rem 1rem; display: grid; gap: .6rem; width: min(808px, 100%); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; transition: opacity .3s; }
.app.chatting .chips { display: none; }
.chips button { padding: .45rem .85rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--white); font-size: .86rem; color: var(--ink); transition: border-color .2s, background-color .2s; }
.chips button:hover { border-color: var(--chart-bar); background: var(--mist); }
.composer { position: relative; display: grid; gap: .4rem; padding: .85rem .9rem .7rem 1.05rem; border: 1px solid var(--rule); border-radius: 18px; background: var(--white); box-shadow: 0 10px 30px -22px #25313b80; transition: border-color .2s, box-shadow .2s; }
.composer.typing { border-color: var(--chart-bar); box-shadow: 0 10px 30px -18px #2e758c55; }
.composer textarea { width: 100%; min-height: 1.6em; max-height: 9em; border: 0; outline: 0; resize: none; background: none; font-size: 1.02rem; line-height: 1.55; overflow: hidden; }
.composer textarea::placeholder { color: #8b9aa4; }
.composer.typing textarea { caret-color: transparent; }
.caret::after { content: ""; display: inline-block; width: 2px; height: 1.1em; vertical-align: -3px; background: var(--ink); animation: blink 1s steps(1) infinite; }
.composer-row { display: flex; align-items: center; justify-content: space-between; }
.tools { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--ink-muted); }
.tools i { width: 14px; height: 14px; border-radius: 4px; background: var(--charcoal); box-shadow: inset 0 0 0 4px var(--charcoal), inset 0 0 0 7px var(--accent-light); }
.send { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--chart-soft); color: var(--white); transition: background-color .2s, transform .15s; }
.send svg { width: 18px; height: 18px; }
.composer.ready .send { background: var(--primary); }
.send.pressed { transform: scale(.88); }
.hint { text-align: center; font-size: .76rem; color: var(--ink-muted); }

@keyframes in { from { opacity: 0; transform: translateY(4px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { transform: scale(.4); } }
@keyframes blink { 50% { opacity: 0; } }

/* Narrow screens: no sidebar, examples as chips */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .logo-sm { display: inline-flex; padding: .35rem .5rem; border-radius: 8px; }
  .topbar { padding: .7rem 1rem; gap: .6rem; }
  .connected, .progress, .top-more .long { display: none; }
  .hint-legal { display: inline; }
  .pause { margin-left: auto; padding: .4rem .6rem; }
  .pause span { display: none; }
  .top-more { padding: .4rem .7rem; font-size: .8rem; }
  .guide { padding: 0 1rem .6rem; }
  .guide-note { font-size: .84rem; min-height: 0; }
  .top-cta { display: inline-flex; }
  .crit-wrap .bars li { grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr) 3.2rem; }
  .stage { padding: 0 1rem; }
  .dock { padding: .4rem 1rem .8rem; }
  .app.chatting .chips { display: flex; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .chips button { flex: 0 0 auto; }
  .welcome { padding-top: 2.5rem; }
  .rows li { grid-template-columns: 3.2rem minmax(0, 1fr); }
  .rows .b { grid-column: 2; }
  .rows li > span:last-child { grid-column: 1 / -1; }
  .bars li { grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr) auto; }
  .bars .v small { display: none; }
  .crit-wrap { grid-template-columns: 1fr; }
  .msg-user { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .stage { scroll-behavior: auto; }
}
