:root {
  --bg: #FAF9F5;
  --side: #F3F1EA;
  --surface: #FFFFFF;
  --user: #F0EEE6;
  --text: #1F1E1D;
  --muted: #73726C;
  --faint: #A3A199;
  --line: #E6E3D8;
  --accent: #C96442;
  --accent-soft: #F6E4DC;
  --code-bg: #F5F3EC;
  --shadow: 0 1px 2px rgba(31, 30, 29, .04), 0 4px 18px rgba(31, 30, 29, .06);
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #262624; --side: #1F1E1D; --surface: #30302E; --user: #3A3936;
    --text: #F2F0E8; --muted: #A6A39A; --faint: #75736C; --line: #3D3C38;
    --accent: #D97757; --accent-soft: #4A3229; --code-bg: #1F1E1D;
    --shadow: 0 1px 2px rgba(0,0,0,.2), 0 6px 22px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #262624; --side: #1F1E1D; --surface: #30302E; --user: #3A3936;
  --text: #F2F0E8; --muted: #A6A39A; --faint: #75736C; --line: #3D3C38;
  --accent: #D97757; --accent-soft: #4A3229; --code-bg: #1F1E1D;
  --shadow: 0 1px 2px rgba(0,0,0,.2), 0 6px 22px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.app { display: grid; grid-template-columns: 260px minmax(0, 1fr) 0; height: 100dvh; overflow: hidden; transition: grid-template-columns .35s ease; }
.app.with-panel { grid-template-columns: 260px minmax(0, 1fr) minmax(0, 1.1fr); }

/* Mark: a warm gradient orb. Still at rest; it turns slowly and breathes while "thinking". */
.ava { position: relative; display: inline-block; width: 26px; height: 26px; flex: none; border-radius: 50%; overflow: hidden; isolation: isolate;
  box-shadow: 0 1px 2px rgba(31, 30, 29, .18), 0 4px 12px rgba(201, 100, 66, .18); }
.ava::before { content: ''; position: absolute; inset: -20%;
  background: conic-gradient(from 200deg, #B5543A, #D9825E, #F2C3A0, #E59A72, #C96442, #9E4A30, #B5543A); filter: blur(2px); }
.ava::after { content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 45%);
  box-shadow: inset 0 -3px 6px rgba(80, 30, 15, .22), inset 0 0 0 .5px rgba(255, 255, 255, .25); }
.ava.big { width: 44px; height: 44px; }
/* Greeting icon: an app-icon tile whose sky and glyph follow the visitor's time of day */
.sky { flex: none; display: inline-grid; }
.sky-tile { position: relative; width: 52px; height: 52px; border-radius: 14px; overflow: hidden; display: grid; place-items: center;
  background: var(--sky);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -1px 0 rgba(0, 0, 0, .14), 0 0 0 .5px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .1), 0 10px 24px -10px rgba(0, 0, 0, .35); }
/* Glass sheen across the top half, like a premium app icon */
.sky-tile::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .24) 0%, rgba(255, 255, 255, .06) 46%, rgba(255, 255, 255, 0) 52%); }
.sky-tile svg { position: relative; z-index: 1; width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 1px 1.2px rgba(0, 0, 0, .22)); }
#greeting.typing::after { content: ''; display: inline-block; width: 2px; height: .9em; margin-left: 3px; vertical-align: -.08em; background: var(--accent); animation: blink 1s steps(1) infinite; }
.sky-tile .star { animation: twinkle 3.2s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .3; } }
.ava.small { width: 18px; height: 18px; }
.ava.busy { animation: breathe 1.6s ease-in-out infinite; }
.ava.busy::before { animation: turn 2.4s linear infinite; }
@keyframes breathe { 50% { transform: scale(.86); } }
@keyframes turn { to { transform: rotate(360deg); } }

/* Sidebar */
.sidebar { background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 12px; gap: 14px; min-width: 0; }
.side-top { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.brand { font: 600 19px/1 var(--serif); letter-spacing: -.01em; }
/* Mark: Thiago's illustrated avatar, rounded like an app icon */
.mark { display: block; width: 30px; height: 30px; flex: none; border-radius: 8px; object-fit: cover;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .12), 0 6px 14px -6px rgba(164, 76, 45, .45); }
.new-chat { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--accent); font-weight: 500; text-align: left; }
.new-chat svg { background: var(--accent); color: #fff; border-radius: 50%; padding: 3px; width: 22px; height: 22px; stroke-width: 2.2; }
.new-chat:hover, .recent:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.recents { flex: 1; overflow: auto; }
.recents-label { font-size: 12px; color: var(--muted); padding: 6px 10px; }
.recent { display: block; width: 100%; text-align: left; color: inherit; font-size: 13.5px; padding: 7px 10px; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.recent.on { background: color-mix(in srgb, var(--text) 9%, transparent); font-weight: 500; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 10px 8px 2px; border-top: 1px solid var(--line); font-size: 13.5px; }
.side-user small { display: block; color: var(--muted); font-size: 12px; }
.avatar { width: 32px; height: 32px; flex: none; }
.avatar svg { width: 100%; height: 100%; display: block; stroke: none; }

/* Main */
.main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; gap: 12px; }
.model { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 8px; font-weight: 500; font-size: 14.5px; white-space: nowrap; }
.model:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.model-sub { color: var(--muted); font-weight: 400; }

.thread { flex: 1; overflow-y: auto; padding: 8px 24px 24px; scroll-behavior: smooth; }
.thread > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.welcome { display: grid; place-items: center; min-height: 38vh; align-content: end; padding-bottom: 28px; }
.welcome h1 { display: flex; align-items: center; gap: 14px; font: 400 clamp(28px, 4.4vw, 40px)/1.15 var(--serif); letter-spacing: -.02em; margin: 0; text-align: center; }

.app.chatting .welcome { display: none; }
.app:not(.chatting) .thread { flex: 0 0 auto; }
.app:not(.chatting) .main { justify-content: center; }
.app:not(.chatting) .topbar { position: absolute; top: 0; left: 0; right: 0; }

/* Messages */
.msg-user { display: flex; justify-content: flex-end; margin: 22px auto 8px; }
.msg-user .bubble { background: var(--user); padding: 10px 16px; border-radius: 18px; max-width: 80%; font-size: 15px; animation: rise .25s ease; }
.msg-ai { margin: 6px auto 26px; font: 17px/1.62 var(--serif); }
.msg-ai p { margin: 0 0 14px; }
.msg-ai strong { font-weight: 600; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.think { font: 13.5px/1.5 var(--sans); color: var(--muted); margin-bottom: 14px; }
.think-head { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 0; border-radius: 8px; }
.think-head > svg { width: 14px; height: 14px; transition: transform .2s; }
.tok { font: 12px var(--mono); color: var(--faint); }
.tok:empty { display: none; }
.status { display: flex; align-items: center; gap: 8px; font: 13.5px var(--sans); color: var(--muted); margin: 2px 0 12px; }
.status .think-label { font: inherit; }
.think.open .think-head > svg { transform: rotate(90deg); }
.think-label.live { background: linear-gradient(90deg, var(--muted) 0%, var(--text) 50%, var(--muted) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.think-body { display: none; border-left: 2px solid var(--line); margin: 6px 0 4px 6px; padding: 2px 0 2px 14px; }
.think.open .think-body { display: block; }
.think-body p { margin: 0 0 6px; animation: rise .3s ease; }

.msg-foot { display: flex; gap: 14px; align-items: center; color: var(--faint); font: 12px var(--mono); margin-top: -2px; }
.msg-foot .acts { display: flex; gap: 2px; }
.msg-foot .acts button { padding: 5px; border-radius: 6px; display: grid; color: inherit; cursor: pointer; }
.msg-foot .acts button:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.msg-foot .acts button:disabled { opacity: .4; cursor: default; }
.msg-foot svg { width: 15px; height: 15px; }

.cursor { display: inline-block; width: 9px; height: 17px; background: var(--accent); border-radius: 2px; vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Artifact card inside a message */
.art-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0 0 10px; font: 14px/1.35 var(--sans); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; animation: rise .3s ease; }
.art-card:hover { border-color: var(--accent); transform: translateY(-1px); }
/* First-card hint: its "Open" becomes an accent pill until any card is opened. */
.art-card.hint { border-color: var(--accent); }
.art-card.hint .art-open { color: #fff; background: var(--accent); font-weight: 600; padding: 4px 11px; border-radius: 999px; animation: hint-pulse 2.2s ease-in-out infinite; }
@keyframes hint-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); } }
.art-card.active { border-color: var(--accent); }
.art-icon { width: 44px; height: 44px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.art-icon svg { width: 21px; height: 21px; }
.art-meta { min-width: 0; flex: 1; }
.art-meta strong { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-meta small { color: var(--muted); font-size: 12.5px; }
.art-open { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.art-card.writing .art-meta small::after { content: ' · writing…'; }
.art-card.writing .art-icon { animation: pulse 1s infinite; }

/* Inline widgets: charts and cards drawn inside the reply */
.wg { font: 14px/1.45 var(--sans); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px 16px; margin: 6px 0 18px; animation: rise .35s ease; overflow: hidden; }
.wg-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.wg-title { font-weight: 600; letter-spacing: -.01em; }
.wg-note { color: var(--muted); font-size: 12.5px; margin-top: 12px; }
.wg-callout { text-align: right; flex: none; }
.wg-callout b { display: block; font: 600 30px/1 var(--sans); letter-spacing: -.035em; }
.wg-callout span { font-size: 12px; color: var(--muted); }
.vbars { display: grid; gap: 8px; align-items: end; height: 170px; margin-top: 18px; }
.vbar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.vbar i { width: 100%; max-width: 28px; border-radius: 5px 5px 0 0; background: color-mix(in srgb, var(--text) 16%, var(--surface)); transform-origin: bottom; animation: growy .9s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes growy { from { transform: scaleY(0); } }
.vbar.accent i { background: var(--accent); }
.vbar.muted i { background: color-mix(in srgb, var(--text) 16%, var(--surface)); }
.vbar b { font-size: 13px; font-weight: 600; }
.vbar span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
/* A dashed line before one bar, labelled: where something started (his first AI workshop) */
.vbar.marked { position: relative; }
.vbar.marked::before { content: ''; position: absolute; left: -5px; top: -6px; bottom: 20px; border-left: 1.5px dashed var(--accent); }
.vbar.marked::after { content: attr(data-mark); position: absolute; top: -8px; right: calc(100% + 10px); font-size: 11px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; margin-top: 8px; }
.tile { border-top: 1px solid var(--line); padding: 14px 0 12px; animation: rise .4s ease backwards; }
.tile b { display: block; font: 600 26px/1.1 var(--sans); letter-spacing: -.03em; margin-bottom: 5px; }
.tile span { font-size: 13px; line-height: 1.4; color: var(--muted); }
.hbars { margin-top: 16px; display: grid; gap: 14px; }
.hbar-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.hbar-label b { font-size: 13px; font-weight: 600; }
.hbar-track { position: relative; height: 10px; background: color-mix(in srgb, var(--text) 7%, var(--surface)); border-radius: 5px; overflow: hidden; }
.hbar-track i { display: block; height: 100%; background: var(--accent); border-radius: 5px; transform-origin: left; animation: growx 1s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes growx { from { transform: scaleX(0); } }
/* Reference marks: a notch cut through every bar, and its label under the chart */
.hbar-tick { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--surface); }
.hbar-axis { display: grid; gap: 4px; margin-top: 10px; }
.hbar-axis div { position: relative; height: 15px; }
.hbar-axis span { position: absolute; top: 0; font-size: 11.5px; line-height: 15px; color: var(--muted); white-space: nowrap; }
.hbar-axis span.start { padding-left: 6px; border-left: 2px solid var(--muted); margin-left: -1px; }
.hbar-axis span.end { padding-right: 6px; border-right: 2px solid var(--muted); margin-right: -1px; }
.tlw { margin-top: 10px; }
.tlw div { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 2px 16px; padding: 11px 0; border-top: 1px solid var(--line); animation: rise .4s ease backwards; }
.tlw b { grid-row: span 2; font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 1px; }
.tlw strong { font-weight: 600; font-size: 14px; line-height: 1.35; }
.tlw span { font-size: 13px; color: var(--muted); }
.tlw div:last-child b { color: var(--accent); }
.pr { list-style: none; margin: 10px 0 0; padding: 0; }
.pr li { display: grid; grid-template-columns: 16px minmax(0, 1fr); padding: 11px 0; border-top: 1px solid var(--line); animation: rise .4s ease backwards; }
.pr li::before { content: ''; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--accent); }
.pr span { font-size: 14px; line-height: 1.5; }
/* Before Hole19: one card per company */
.wg-bare { margin: 6px 0 18px; }
.job { margin: 0 0 12px; }
.job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.job-head b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.job-head span { font-size: 12.5px; color: var(--muted); }
.job-role { font-size: 13.5px; font-weight: 500; color: var(--accent); margin-top: 2px; }
.job p { margin: 10px 0 14px; color: var(--muted); font-size: 14px; }
.job .cmp-stats { padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.job-points { list-style: none; margin: 12px 0 0; padding: 0; }
.job-points li { position: relative; padding: 5px 0 5px 16px; font-size: 14px; line-height: 1.5; }
.job-points li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cmp > div { border-top: 1px solid var(--line); padding: 14px 0 4px; }
.cmp-org { display: flex; justify-content: space-between; font-weight: 500; }
.cmp-org span { color: var(--muted); font: 12px var(--mono); }
.cmp p { margin: 6px 0 12px; color: var(--muted); font-size: 13px; }
.cmp-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.cmp-stats b { display: block; font: 600 22px/1.1 var(--sans); letter-spacing: -.03em; }
.cmp-stats span { font-size: 11.5px; color: var(--muted); }
.wg .contact { margin: 12px 0 0; }
.wg { container-type: inline-size; }
}
@container (max-width: 440px) {
  .tiles, .cmp { grid-template-columns: minmax(0, 1fr); }
  .vbars { gap: 4px; }
  .vbar span { font-size: 10px; }
  .wg-head { flex-direction: column; gap: 6px; }
  .wg-callout { text-align: left; display: flex; align-items: baseline; gap: 8px; }
}

/* Composer */
.composer-wrap { padding: 0 24px 14px; }
.composer-wrap > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.composer { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 14px 14px 10px 18px; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.composer.nudge { animation: nudge .5s ease; }
@keyframes nudge { 30% { box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); } }
/* The suggested question sits behind the textarea as ghost text; typed characters cover it exactly. */
.input-wrap { display: grid; }
.input-wrap > * { grid-area: 1 / 1; font: 16px/1.5 var(--sans); padding: 0; margin: 0; min-height: 24px; white-space: pre-wrap; overflow-wrap: break-word; }
.ghost { color: var(--faint); pointer-events: none; }
.ghost .t { color: transparent; }
.ghost kbd { font: 500 11px/1 var(--sans); color: var(--muted); border: 1px solid var(--line); background: var(--bg); border-radius: 5px; padding: 3px 6px; margin-left: 8px; vertical-align: 2px; }
.composer textarea { width: 100%; border: 0; outline: 0; resize: none; overflow: hidden; background: transparent; color: var(--text); caret-color: var(--accent); }
.composer textarea::placeholder { color: var(--faint); }
.composer-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.composer-tools { display: flex; gap: 6px; color: var(--muted); }
.tool { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 9px; padding: 5px 7px; font-size: 12.5px; }
.tool svg { width: 15px; height: 15px; }
.tool.pill { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); }
.send { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; transition: opacity .15s, transform .15s; }
.send svg { stroke-width: 2.2; }
.send:disabled { opacity: .35; cursor: default; }
.send:not(:disabled):hover { transform: translateY(-1px); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 7px 13px; border-radius: 10px; font-size: 13.5px; color: var(--muted); transition: color .15s, border-color .15s; }
.chip:hover { color: var(--text); border-color: var(--faint); }
.app.chatting .chips { display: none; }
.fineprint { text-align: center; color: var(--faint); font-size: 12px; margin: 10px auto 0; }

/* Artifact panel */
.panel { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.panel[hidden] { display: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.panel-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.panel-title strong { display: block; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-title small { color: var(--muted); font-size: 12px; }
.panel-title > div { min-width: 0; }
.panel-icon { color: var(--accent); display: grid; }
.panel-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.tabs { display: flex; background: var(--code-bg); border-radius: 9px; padding: 3px; }
.tab { padding: 4px 10px; border-radius: 7px; font-size: 12.5px; color: var(--muted); }
.tab.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.icon-btn { padding: 6px; border-radius: 8px; display: grid; color: var(--muted); }
.icon-btn:hover { background: var(--code-bg); color: var(--text); }
.panel-body { flex: 1; overflow-y: auto; overflow-x: hidden; }
.new-top { display: none; }
.lang-toggle { margin-left: auto; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.lang-toggle:hover { color: var(--text); border-color: var(--faint); }

/* Artifact preview: one quiet base. Sans throughout, one hero figure, hairlines instead of boxes.
   --a is the artifact's accent and is only ever used on marks, never on numbers. */
.doc { --a: var(--accent); --soft: color-mix(in srgb, var(--text) 4.5%, var(--surface)); --hair: color-mix(in srgb, var(--text) 10%, var(--surface));
  max-width: 700px; margin: 0 auto; padding: 36px clamp(20px, 6cqi, 52px) 64px; animation: rise .35s ease; overflow-wrap: break-word; }
.doc-eyebrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; font-size: 13px; }
.doc-eyebrow b { font-weight: 600; color: var(--a); }
.doc-eyebrow span { color: var(--muted); }
.doc h2 { font: 600 clamp(26px, 5.4cqi, 34px)/1.12 var(--sans); letter-spacing: -.025em; margin: 10px 0 12px; text-wrap: balance; }
.doc-lede { font: 17px/1.55 var(--sans); color: var(--muted); margin: 0 0 36px; text-wrap: pretty; }
.doc h3 { font: 600 17px/1.3 var(--sans); letter-spacing: -.01em; margin: 44px 0 16px; }
.doc .sub { color: var(--muted); font-size: 15px; margin: -8px 0 18px; }

.u { font-style: normal; font-weight: 600; font-size: .62em; letter-spacing: -.015em; white-space: nowrap; }
.hero .u { font-size: .4em; letter-spacing: -.01em; }
.hero b { display: block; font: 600 clamp(56px, 13cqi, 80px)/1 var(--sans); letter-spacing: -.045em; }
.hero span { display: block; font-size: 16px; line-height: 1.45; color: var(--muted); margin-top: 12px; max-width: 42ch; }

.kpis { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); column-gap: 24px; margin-top: 36px; }
.kpis > div { border-top: 1px solid var(--hair); padding: 16px 0 18px; animation: appear .4s ease backwards; }
.kpis b { display: block; font: 600 28px/1.1 var(--sans); letter-spacing: -.03em; }
.kpis span { display: block; font-size: 13.5px; line-height: 1.4; color: var(--muted); margin-top: 6px; }

.built { list-style: none; margin: 0; padding: 0; }
.built li { position: relative; padding: 13px 0 13px 32px; border-top: 1px solid var(--hair); font-size: 15px; line-height: 1.5; }
.built li:last-child { border-bottom: 1px solid var(--hair); }
.built li::before { content: ''; position: absolute; left: 0; top: 15px; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--a) 14%, transparent); }
.built li::after { content: ''; position: absolute; left: 7.5px; top: 19.5px; width: 4px; height: 8px; border: solid var(--a); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }
.best { margin: 36px 0 0; padding: 22px 24px; border-radius: 18px; background: var(--soft); }
.best small { display: block; font-size: 13px; font-weight: 600; color: var(--a); }
.best p { margin: 6px 0 0; font-size: 17px; line-height: 1.55; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.stack span { font-size: 12.5px; padding: 5px 11px; border-radius: 999px; background: var(--soft); color: var(--muted); }

.contact { display: grid; gap: 10px; margin-bottom: 10px; }
.contact a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none; background: var(--bg); transition: border-color .15s; }
.contact a:hover { border-color: var(--accent); }
.contact a svg { color: var(--accent); }
.contact a span { color: var(--muted); font-size: 13px; margin-left: auto; }
.contact a.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.contact a.primary svg, .contact a.primary span { color: #fff; }

.code { margin: 0; padding: 22px 24px; font: 12.5px/1.65 var(--mono); background: var(--code-bg); min-height: 100%; white-space: pre-wrap; word-break: break-word; }
.code .k { color: #B0573A; } .code .s { color: #4D7C4A; } .code .n { color: #6A55A8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .code .k { color: #E89A7C; } :root:not([data-theme="light"]) .code .s { color: #A6C99A; } :root:not([data-theme="light"]) .code .n { color: #B6A4E6; } }

/* ---------- Artifact layouts: one signature visual and accent each ---------- */
.panel-body { container-type: inline-size; }
@keyframes appear { from { opacity: 0; transform: translateY(6px); } }
@keyframes fadein { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } }
@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }
@keyframes dial { from { --p: 0; } }

.doc-terminal { --a: #248A3D; }
.doc-flow { --a: #0071E3; }
.doc-journey { --a: #0E8A7E; }
.doc-editorial { --a: #C8372D; }
.doc-constellation { --a: #5856D6; }
.doc-memo { --a: #C26400; }

/* Shared card: a sheet of paper floating on the page */
.sheet { border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--hair), 0 12px 32px -16px rgba(0, 0, 0, .18); padding: 18px 22px 16px; }
.sheet-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding-bottom: 12px; }
.sheet-head b { font-size: 15px; font-weight: 600; }
.sheet-head span { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.sheet-foot { margin: 0; padding-top: 12px; border-top: 1px solid var(--hair); font-size: 13px; color: var(--muted); }

/* Terminal (Engineering) */
.term { background: #1C1C1E; color: #E5E5EA; border-radius: 14px; overflow: hidden; margin-bottom: 44px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 24px 48px -24px rgba(0, 0, 0, .5); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px 6px; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; }
.term-bar i:nth-child(2) { background: #FEBC2E; } .term-bar i:nth-child(3) { background: #28C840; }
.term-bar span { flex: 1; text-align: center; margin-right: 54px; font-size: 12px; font-weight: 500; color: #8E8E93; }
.term-body { padding: 8px 18px 18px; font: 12.5px/1.85 var(--mono); }
.ln { animation: fadein .01s linear backwards; white-space: pre-wrap; color: #98989F; }
.ln.cmd, .ln.done { color: #F2F2F7; }
.ln.ok { color: #30D158; } .ln.warn { color: #FFD60A; }
.ln.done { margin-top: 4px; font-weight: 600; }
.ln.caret i { display: inline-block; width: 7px; height: 14px; background: #F2F2F7; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-ring { display: flex; align-items: center; gap: 28px; }
.ring { position: relative; width: 128px; height: 128px; flex: none; display: grid; place-items: center; }
.ring-dial { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--a) calc(var(--p) * 1%), var(--soft) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 11px), #000 calc(100% - 10px)); mask: radial-gradient(farthest-side, transparent calc(100% - 11px), #000 calc(100% - 10px));
  animation: dial 1.4s cubic-bezier(.2, .8, .2, 1) .2s backwards; }
.ring b { font: 600 32px/1 var(--sans); letter-spacing: -.035em; }
.hero-ring p { margin: 0; font-size: 17px; line-height: 1.45; max-width: 34ch; }

/* Flow (Product) */
.fl-time { display: inline-block; font-size: 13px; font-weight: 600; color: var(--a); background: color-mix(in srgb, var(--a) 10%, transparent); padding: 6px 12px; border-radius: 999px; margin-bottom: 14px; }
.flow { display: grid; grid-template-columns: 1fr 32px 1fr 32px 1fr; padding: 16px; border-radius: 22px; background: var(--soft); }
.fl-node { background: var(--surface); border-radius: 14px; padding: 16px 16px 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 6px 16px -8px rgba(0, 0, 0, .12); animation: appear .4s ease backwards; }
.fl-node small { display: block; font-size: 12.5px; font-weight: 600; color: var(--a); }
.fl-node b { display: block; font: 600 36px/1 var(--sans); letter-spacing: -.035em; margin: 14px 0 6px; }
.fl-node span { font-size: 13px; color: var(--muted); }
.fl-link { position: relative; }
.fl-link::before { content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border: solid var(--faint); border-width: 2px 2px 0 0; transform: translate(-70%, -50%) rotate(45deg); }

/* Journey (Customer Support) */
.jr { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.jr::before { content: ''; position: absolute; left: 10%; right: 10%; top: 11px; height: 2px; background: color-mix(in srgb, var(--a) 22%, var(--surface)); }
.jr::after { content: ''; position: absolute; left: 10%; right: 10%; top: 11px; height: 2px; background: var(--a); transform-origin: left; animation: growx 1.2s cubic-bezier(.4, 0, .2, 1) .2s backwards; }
.jr li { text-align: center; padding: 0 6px; animation: appear .4s ease backwards; }
.jr li i { display: block; width: 24px; height: 24px; margin: 0 auto 12px; border-radius: 50%; background: var(--a); position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--surface); }
.jr li i::after { content: ''; position: absolute; left: 9px; top: 5.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); }
.jr li span { display: block; font-size: 13px; line-height: 1.4; }

/* Editorial (Marketing): the one serif page */
.doc-editorial h2 { font-family: var(--serif); font-size: clamp(30px, 6cqi, 40px); letter-spacing: -.02em; }
.doc-editorial .doc-lede { font: 19px/1.5 var(--serif); }
.week { position: relative; display: grid; grid-template-columns: 82px repeat(var(--n), minmax(0, 1fr)); align-items: center; gap: 10px 6px; margin-top: 32px; padding: 18px; border-radius: 22px; background: var(--soft); }
/* Day columns drawn behind everything: the same grid, one hairline per day. */
.wk-lines { position: absolute; inset: 10px 18px; display: grid; grid-template-columns: inherit; column-gap: 6px; pointer-events: none; }
.wk-lines i { border-left: 1px solid var(--hair); margin-left: -3px; }
.wk-lines i:last-child { border-right: 1px solid var(--hair); margin-right: -3px; }
.week > :not(.wk-lines) { position: relative; }
.week > b { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.week > em { font-style: normal; font-size: 12.5px; font-weight: 600; line-height: 1.25; grid-column: 1; min-width: 0; }
.wk-chip { height: 30px; display: flex; align-items: center; justify-content: center; padding: 0 6px; border-radius: 8px; background: var(--a); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; animation: appear .35s ease backwards; }
.wk-chip.wide { width: auto; height: auto; min-height: 30px; padding: 6px 10px; justify-content: flex-start; white-space: normal; line-height: 1.3; }

/* Team (People & Operations) */
.segs { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 24px; }
.segs i { height: 14px; border-radius: 4px; background: var(--a); transform-origin: left; animation: pop .35s ease backwards; }
.segs-key { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
.rec { width: 8px; height: 8px; border-radius: 50%; background: #FF3B30; }
.cer-sec { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--hair); animation: appear .35s ease backwards; }
.cer-sec strong { font-size: 14px; font-weight: 600; }
.cer-sec em { font-size: 12px; font-style: normal; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.cer-sec.flag em { background: rgba(255, 149, 0, .15); color: #B25000; }
.cer-sec > i { flex: 1; max-width: 220px; margin-left: auto; height: 7px; border-radius: 4px; background: var(--soft); }

/* Report (Leadership & Data) */
.streak { margin-top: 28px; }
.weeks { display: grid; grid-template-columns: repeat(26, 1fr); gap: 4px; }
.weeks i { aspect-ratio: 1; border-radius: 3px; background: var(--a); animation: pop .3s ease backwards; }
.streak-key { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
.rp-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--hair); font-size: 14px; animation: appear .35s ease backwards; }
.rp-row i { flex: 1; max-width: 180px; margin-left: auto; height: 7px; border-radius: 4px; background: var(--soft); }
.rp-row small { font-size: 13px; color: var(--muted); }
.rp-row em.sent { color: var(--a); background: color-mix(in srgb, var(--a) 12%, transparent); }
.rp-row.more span { color: var(--muted); }
.rp-row em { margin-left: auto; font-size: 12px; font-style: normal; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .doc-terminal { --a: #30D158; }
  :root:not([data-theme="light"]) .doc-flow { --a: #0A84FF; }
  :root:not([data-theme="light"]) .doc-journey { --a: #3CC8B4; }
  :root:not([data-theme="light"]) .doc-editorial { --a: #FF6961; }
  :root:not([data-theme="light"]) .doc-constellation { --a: #7D7AFF; }
  :root:not([data-theme="light"]) .doc-memo { --a: #FF9F0A; }
  :root:not([data-theme="light"]) .cer-sec.flag em { color: #FFB340; }
  :root:not([data-theme="light"]) .sheet { box-shadow: 0 0 0 1px var(--hair), 0 12px 32px -16px rgba(0, 0, 0, .6); }
}

/* Layouts on a narrow panel (phones, or a slim side panel). */
@container (max-width: 600px) {
  .flow { grid-template-columns: 1fr; padding: 12px; }
  .fl-link { height: 26px; }
  .fl-link::before { transform: translate(-50%, -70%) rotate(135deg); }
  .jr { grid-template-columns: 1fr; gap: 16px; }
  .jr::before, .jr::after { left: 11px; right: auto; top: 12px; bottom: 12px; width: 2px; height: auto; }
  .jr::after { transform-origin: top; animation-name: growy; }
  .jr li { display: flex; align-items: center; gap: 14px; text-align: left; padding: 0; }
  .jr li i { margin: 0; flex: none; }
}
@container (max-width: 460px) {
  .kpis { grid-template-columns: 1fr; }
  .term-body { font-size: 11px; line-height: 1.75; padding: 6px 14px 16px; }
  .wk-chip { font-size: 11px; padding: 0 3px; }
  .week { padding: 16px 14px; }
  .wk-lines { inset: 8px 14px; }
  .hero-ring { flex-direction: column; align-items: flex-start; }
  .hero-ring { gap: 20px; }
  .ring { width: 104px; height: 104px; }
  .ring b { font-size: 23px; }
  .hero-ring p { font-size: 15px; }
}

/* Narrow screens */
@media (max-width: 1100px) {
  .app.with-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .app.with-panel .sidebar { display: none; }
}
@media (max-width: 860px) {
  .app, .app.with-panel { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .new-top { display: grid; }
  .panel { position: fixed; inset: 0; z-index: 10; animation: slideup .3s ease; }
  @keyframes slideup { from { transform: translateY(24px); opacity: 0; } }
  .thread { padding: 8px 16px 16px; }
  .composer-wrap { padding: 0 16px calc(12px + env(safe-area-inset-bottom)); }
  .app.chatting .composer-wrap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding-top: 18px;
    background: linear-gradient(to top, var(--bg) 75%, transparent); transition: transform .3s ease, opacity .3s ease; }
  .app.chatting .thread { padding-bottom: calc(var(--composer-h, 170px) + 8px); }
  .app.chatting.composer-away .composer-wrap { transform: translateY(100%); opacity: 0; pointer-events: none; }
  .model-sub { font-size: 13px; }
  .tool:not(.pill) { display: none; }
  .msg-ai { font-size: 16.5px; }
  .welcome { min-height: 30vh; }
  .welcome h1 { flex-direction: column; gap: 12px; }
}
/* Re-rendered after a language switch: no entrance animation again (the terminal caret keeps blinking). */
.still, .still *:not(.caret i) { animation: none !important; transition: none !important; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
