/* Tokens. Colours come from site.config.json (theme.*) so the brand can change in one place. */
:root {
  --bg: #161716;
  --surface: #1F201F;
  --ink: #FFFFFF;
  --muted: #9C9F9D;
  --accent: #FF8A3D;
  --accent-ink: #1A1009;
  --lavender: #CDB6F7;
  --butter: #F1D27C;
  --sky: #8FC8FF;
  --coral: #FFB094;

  --ink-2: rgb(255 255 255 / 0.76);
  --line: rgb(255 255 255 / 0.08);
  --line-2: rgb(255 255 255 / 0.14);
  --panel: #171817;
  --panel-2: #121312;
  --on-tile: rgb(15 20 17 / 0.74);

  color-scheme: dark;
  --brand-ink: #20242C;

  --fs-2xs: 11px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-base: 15px;
  --fs-lg: 16px;
  --fs-xl: 17px;
  --fs-2xl: 18px;
  --fs-3xl: 22px;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-card: 28px;
  --r-pill: 999px;
  --wrap: 1280px;
  --gutter: clamp(20px, 5.5vw, 80px);
  --header-h: 72px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-lg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img, svg, canvas, video { display: block; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-xs); }
::selection { background: var(--accent); color: var(--accent-ink); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Type */
.h2 {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.1;
}
.sub {
  margin: 20px 0 0;
  max-width: 34em;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.6;
  color: var(--ink-2);
}
.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); font-size: var(--fs-base); font-weight: 600; text-decoration: none;
}
.text-link svg { width: 14px; height: 14px; transition: transform 0.25s var(--ease-out); }
.text-link:hover svg { transform: translateX(3px); }

.section { padding-top: clamp(112px, 13vw, 200px); }
.section-head { margin-bottom: clamp(40px, 5vw, 72px); }
.flow-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; margin: 24px 0 0; padding: 0; list-style: none; font-size: var(--fs-base); font-weight: 600; }
.flow-line li { position: relative; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: var(--r-pill); color: var(--ink-2); }
.flow-line li + li::before { content: ""; position: absolute; top: 50%; left: -21px; width: 14px; height: 1.5px; background: var(--accent); }

/* Brand mark: the 2nd-brain symbol on its ink tile (2nd-brain-app docs/brand). */
.mark {
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--brand-ink);
}
.mark svg { width: 82%; height: 82%; }

/* Pills */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--r-pill); border: 1px solid transparent;
  font-size: var(--fs-base); font-weight: 600; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.2s var(--ease-out), background-color 0.2s, border-color 0.2s, color 0.2s;
}
.pill:active { transform: scale(0.97); }
.pill svg { width: 16px; height: 16px; }
.pill--sm { height: 36px; padding: 0 16px; font-size: var(--fs-md); }
.pill--lg { height: 54px; padding: 0 28px; font-size: var(--fs-lg); }
.pill--light { background: #f1f2f1; color: #121312; }
.pill--light:hover { background: #fff; }
.pill--ghost { background: rgb(255 255 255 / 0.04); border-color: var(--line-2); color: var(--ink); }
.pill--ghost:hover { background: rgb(255 255 255 / 0.09); }
.pill--dark { background: var(--accent-ink); color: #fff; }
.pill--dark:hover { background: #000; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.js .site-header { animation: drop-in 0.9s var(--ease-out) both; }
.site-header.is-scrolled, .site-header.is-open {
  background: rgb(22 23 22 / 0.74);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.header-inner {
  height: 100%; width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}
.brand {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.02em; text-decoration: none;
}
/* Wordmark: lowercase, Pretendard SemiBold, -1% tracking, as the 2nd-brain lockups set it. */
.brand-name { font-size: 1.25em; font-weight: 600; letter-spacing: -0.01em; line-height: 1; text-transform: lowercase; }
.nav-pill {
  display: flex; gap: 2px; padding: 4px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill); background: rgb(255 255 255 / 0.03);
}
.nav-pill a {
  padding: 7px 14px; border-radius: var(--r-pill); font-size: var(--fs-md); color: rgb(255 255 255 / 0.64); text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.nav-pill a:hover { color: var(--ink); background: rgb(255 255 255 / 0.07); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.menu-button { display: none; }

@keyframes drop-in { from { opacity: 0; transform: translateY(-12px); } }

/* Hero: the copy on the left, the wiki growing behind it on the right. */
.hero {
  position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: center;
  min-height: max(700px, min(100svh, 980px)); padding: calc(var(--header-h) + 40px) 0 88px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0%, rgb(22 23 22 / 0.88) 32%, rgb(22 23 22 / 0) 62%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 30px; padding: 5px 16px 5px 5px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill); background: rgb(22 23 22 / 0.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: var(--fs-md); color: rgb(255 255 255 / 0.72);
}
.badge-new {
  padding: 3px 9px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink);
  font-size: var(--fs-2xs); font-weight: 800; letter-spacing: 0.05em;
}
.hero-title { margin: 0; font-size: clamp(40px, 5.4vw, 78px); font-weight: 650; letter-spacing: -0.05em; line-height: 1.08; }
.br-phone { display: none; }
.hero-sub { max-width: 31em; margin: 28px 0 0; color: var(--ink-2); font-size: clamp(17px, 1.4vw, 19px); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-help { margin-top: 20px; color: var(--ink-2); }
/* The one-line setup prompt, copyable wherever the page asks you to start. */
.prompt-copy { display: inline-flex; }

.js .hero-in { animation: rise-in 1.1s var(--ease-out) both; animation-delay: calc(var(--d) * 110ms + 180ms); }
@keyframes rise-in { from { opacity: 0; transform: translateY(20px); filter: blur(10px); } }

/* Wiki growth (hero slot and closing) */
.growth { margin: 0; }
.growth-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.growth--hero { position: absolute; inset: 0; z-index: -2; }
.growth-controls {
  position: absolute; right: max(var(--gutter), (100% - var(--wrap)) / 2); bottom: 28px;
  display: flex; align-items: center; gap: 14px;
}
.growth-controls[hidden] { display: none; }
.growth-bar { width: 120px; height: 2px; overflow: hidden; border-radius: 2px; background: rgb(255 255 255 / 0.12); }
.growth-bar i { display: block; width: var(--p, 100%); height: 100%; border-radius: inherit; background: var(--accent); }
.growth-replay {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill); background: rgb(22 23 22 / 0.6); color: var(--ink-2);
  font-size: var(--fs-sm); font-weight: 600; cursor: pointer; transition: color 0.2s, background-color 0.2s;
}
.growth-replay:hover { background: rgb(255 255 255 / 0.08); color: var(--ink); }
.growth-replay svg { width: 14px; height: 14px; }
.growth--still { position: absolute; inset: 0; z-index: -2; }

/* Product window */
.app-figure { margin: 0; }
.app {
  overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line-2);
  background: var(--panel-2);
  box-shadow: 0 50px 120px -30px rgb(0 0 0 / 0.8);
  font-size: var(--fs-md); line-height: 1.5; color: rgb(255 255 255 / 0.84);
}
.app svg { width: 16px; height: 16px; }
.app-bar {
  display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 16px;
  border-bottom: 1px solid var(--line); background: #141514;
}
.app-lights { display: flex; gap: 7px; }
.app-lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.app-lights i:nth-child(2) { background: #febc2e; }
.app-lights i:nth-child(3) { background: #28c840; }
.app-vault { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.app-vault svg { width: 16px; height: 16px; color: var(--muted); }
.app-tab { padding: 4px 10px; border-radius: var(--r-sm); background: rgb(255 255 255 / 0.06); font-size: var(--fs-sm); }
.app-model { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-sm); color: var(--muted); }
.app-model::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.app-body { display: grid; grid-template-columns: 56px 230px minmax(0, 1fr); height: 520px; }
.app-rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 12px; border-right: 1px solid var(--line); background: #141514; }
.app-rail i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); color: var(--muted); }
.app-rail i.is-active { background: rgb(255 255 255 / 0.08); color: var(--ink); }
.app-rail svg { width: 19px; height: 19px; }
.app-side { overflow: hidden; padding: 12px; border-right: 1px solid var(--line); background: #141514; }
.app-search {
  display: flex; align-items: center; height: 34px; padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: rgb(255 255 255 / 0.04); color: var(--muted); font-size: var(--fs-sm);
}
.app-group { display: flex; align-items: center; gap: 6px; margin: 18px 6px 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.app-count {
  padding: 1px 7px; border-radius: var(--r-pill); background: rgb(255 255 255 / 0.1); color: var(--ink);
  font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; transition: background-color 0.4s, color 0.4s;
}
.app-count.is-zero { background: transparent; color: var(--muted); }
.app-tree { margin: 0; padding: 0; list-style: none; }
.app-tree li {
  display: flex; align-items: center; gap: 8px; max-height: 40px; padding: 6px 8px; border-radius: var(--r-sm);
  font-size: var(--fs-sm); color: rgb(255 255 255 / 0.78); white-space: nowrap;
  transition: opacity 0.45s, transform 0.45s var(--ease-out), max-height 0.45s var(--ease-out), padding 0.45s var(--ease-out);
}
.app-tree li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.app-tree svg { flex: none; width: 15px; height: 15px; color: var(--muted); }
.app-tree li.is-hot { background: rgb(255 255 255 / 0.06); }
.app-tree li.is-gone { max-height: 0; padding-block: 0; opacity: 0; transform: translateX(18px); }
.app-new {
  margin-left: auto; padding: 2px 7px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink);
  font-size: var(--fs-2xs); font-weight: 700;
}
.app-new--soft { background: rgb(255 255 255 / 0.12); color: var(--ink); }

.app-chat { display: flex; flex-direction: column; min-width: 0; }
.app-thread { position: relative; flex: 1; display: flex; flex-direction: column; gap: 16px; overflow: hidden; padding: 28px clamp(16px, 3vw, 40px) 12px; }
.app-hello {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center; color: var(--ink); font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -0.02em;
  opacity: 0; transition: opacity 0.5s, transform 0.5s var(--ease-out);
}
.app-hello p { margin: 0; }
.app-suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.app-suggest span { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: var(--r-pill); color: rgb(255 255 255 / 0.7); font-size: var(--fs-sm); font-weight: 500; }
.app.is-armed .app-hello { opacity: 1; }
.app.is-started .app-hello { opacity: 0; transform: translateY(-14px); }
.app-msg--me {
  align-self: flex-end; padding: 10px 15px; border-radius: var(--r-md) var(--r-md) 4px var(--r-md);
  background: #2a2c2a; color: var(--ink); font-weight: 500;
}
.app-msg--bot { max-width: 580px; }
.app-msg-body { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
.app-msg-body p { margin: 0; }
.app-dots { display: none; gap: 5px; padding: 9px 0; }
.app-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dot 1s var(--ease-io) infinite; }
.app-dots i:nth-child(2) { animation-delay: 0.15s; }
.app-dots i:nth-child(3) { animation-delay: 0.3s; }
.app.is-armed .app-dots { display: flex; }
.app.is-answered .app-dots { display: none; }
@keyframes dot { 0%, 100% { opacity: 0.35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.app-steps { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: 20px; }
.app-steps b { color: var(--ink); font-weight: 600; }
.app-files { display: flex; flex-wrap: wrap; gap: 8px; }
.app-files span {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: rgb(255 255 255 / 0.05); font-size: var(--fs-sm);
}
.app-files svg { width: 14px; height: 14px; color: var(--accent); }
.app-composer {
  display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 clamp(12px, 2.4vw, 32px) 0 clamp(16px, 3vw, 40px);
  border-top: 1px solid var(--line-2);
}
.app-input { flex: 1; display: flex; align-items: center; min-width: 0; color: var(--ink); white-space: nowrap; }
.app-placeholder { color: var(--muted); }
.app.is-typing .app-placeholder { display: none; }
.caret {
  display: inline-block; width: 1.5px; height: 1.15em; margin: 0 1px; background: var(--accent);
  vertical-align: text-bottom; animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.app-send {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm);
  background: rgb(255 255 255 / 0.1); color: var(--ink); transition: background-color 0.2s, color 0.2s, transform 0.15s;
}
.app.is-ready .app-send { background: var(--accent); color: var(--accent-ink); }
.app-send.is-pressed { transform: scale(0.86); }

.wikilink { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }

/* Steps the product plays through; hidden only once the script has taken over. */
.app.is-armed [data-at] { opacity: 0; transform: translateY(8px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
.app.is-armed [data-at].is-on { opacity: 1; transform: none; }

/* Problem: where things get lost, then the one sentence that files them */
.problem-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: end; gap: 32px; }
.problem-head .sub { margin: 0; }
.scatter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.scatter li { display: flex; flex-direction: column; min-width: 0; }
.js .scatter li[data-reveal] { transition-delay: calc(var(--d) * 90ms); }
/* What each place actually leaves behind, drawn small. */
.scatter-art {
  display: flex; flex-direction: column; justify-content: center; gap: 8px; height: 132px; margin-bottom: 20px; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel-2); color: var(--muted); font-size: var(--fs-sm); overflow: hidden;
}
.scatter-art p { margin: 0; }
.art-row { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.art-row span { overflow: hidden; text-overflow: ellipsis; }
.art-row svg { flex: none; width: 14px; height: 14px; }
.art-row--dim { color: rgb(255 255 255 / 0.5); }
.art-file svg { color: var(--butter); }
.art-mark svg { color: var(--lavender); }
.art-row--dim svg { color: inherit; }
.art-bubble { align-self: flex-end; max-width: 92%; padding: 6px 10px; border-radius: var(--r-md) var(--r-md) 4px var(--r-md); background: var(--sky); color: var(--accent-ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-bubble--old { background: rgb(255 255 255 / 0.08); color: var(--muted); font-weight: 500; }
.art-time { align-self: flex-end; font-size: var(--fs-2xs); }
.art-tag { flex: none; padding: 2px 7px; border-radius: var(--r-pill); background: rgb(255 255 255 / 0.08); color: var(--ink-2); font-size: var(--fs-2xs); font-weight: 600; }
.scatter h3 { margin: 0 0 6px; font-size: var(--fs-xl); font-weight: 650; letter-spacing: -0.02em; }
.scatter li > p { margin: 0; color: rgb(255 255 255 / 0.62); font-size: var(--fs-base); line-height: 1.6; }
.demo { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: center; gap: clamp(28px, 4vw, 56px); margin-top: clamp(72px, 9vw, 128px); }
.h3 { margin: 0; font-size: clamp(26px, 2.6vw, 36px); font-weight: 650; letter-spacing: -0.04em; line-height: 1.2; }
.demo-copy p { margin: 16px 0 0; color: var(--ink-2); font-size: var(--fs-xl); line-height: 1.7; }
.problem { overflow-x: clip; }
.demo-window { position: relative; isolation: isolate; }
.demo-window::before {
  content: ""; position: absolute; inset: -14% -10%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 14%, transparent), transparent);
}

/* Features bento */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; min-height: 420px;
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05);
}
.card--chat { grid-column: span 7; }
.card--files { grid-column: span 5; }
.card--git { grid-column: span 4; background: var(--lavender); border-color: transparent; color: var(--accent-ink); }
.card--third { grid-column: span 4; }
.card--graph { grid-column: span 8; }
.card-ui { position: relative; flex: 1; min-height: 0; padding: 28px 28px 0; }
.card-ui--graph { display: flex; flex-direction: column; min-height: 260px; }
.ui-graph-ask { position: relative; z-index: 1; align-self: flex-end; margin: 0; padding: 9px 14px; border-radius: var(--r-md) var(--r-md) 4px var(--r-md); background: rgb(255 255 255 / 0.08); font-size: var(--fs-base); }
.growth--card { position: relative; flex: 1; min-height: 200px; }
.card-text { padding: 24px 28px 28px; }
.card-text h3 { margin: 0 0 8px; font-size: clamp(20px, 1.7vw, 24px); font-weight: 650; letter-spacing: -0.03em; line-height: 1.25; }
.card-text p { margin: 0; color: rgb(255 255 255 / 0.66); font-size: var(--fs-base); line-height: 1.6; }
.card--git .card-text p { color: var(--on-tile); }
.card svg { width: 16px; height: 16px; }

.js .card [style*="--k"] {
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  transition-delay: calc(var(--k) * 340ms + 350ms);
}
.js .card.is-in [style*="--k"] { opacity: 1; transform: none; }

.ui-thread {
  display: flex; flex-direction: column; gap: 14px; height: 100%; padding-bottom: 20px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel);
}
.ui-thread-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: var(--fs-md); font-weight: 600; }
.ui-hash { color: var(--muted); }
.ui-chip { margin-left: auto; padding: 3px 9px; border-radius: var(--r-pill); background: rgb(255 255 255 / 0.07); color: var(--muted); font-size: var(--fs-xs); }
.ui-msg { margin: 0 18px; font-size: var(--fs-base); }
.ui-thread-head + .ui-msg { margin-top: auto; }
.ui-msg--bot .ui-source { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.ui-msg--me { align-self: flex-end; padding: 9px 14px; border-radius: var(--r-md) var(--r-md) 4px var(--r-md); background: #2a2c2a; }
.ui-msg--bot p { margin: 0 0 10px; }
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: min(260px, 100%); padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: rgb(255 255 255 / 0.04); font-size: var(--fs-md);
}
.ui-typing { display: flex; gap: 5px; margin: 0 18px 0 54px; }
.ui-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dot 1s var(--ease-io) infinite; }
.ui-typing i:nth-child(2) { animation-delay: 0.15s; }
.ui-typing i:nth-child(3) { animation-delay: 0.3s; }

.card-ui--marquee {
  display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 36px 0 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.marquee { overflow: hidden; }
.marquee-track { display: flex; gap: 10px; width: max-content; padding-right: 10px; animation: marquee 34s linear infinite; }
.marquee--reverse .marquee-track { animation-direction: reverse; animation-duration: 40s; }
@keyframes marquee { to { transform: translateX(-50%); } }
.file-chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 15px 8px 8px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill); background: rgb(255 255 255 / 0.04); font-size: var(--fs-md); white-space: nowrap;
}
.ext { padding: 4px 8px; border-radius: var(--r-pill); color: var(--accent-ink); font-size: var(--fs-2xs); font-weight: 800; letter-spacing: 0.03em; }
.ext--hwp { background: var(--sky); }
.ext--pdf { background: var(--coral); }
.ext--doc { background: var(--lavender); }
.ext--web { background: var(--accent); }

.card-ui--git { order: -1; margin: 24px 24px 0; padding: 18px 18px 14px; border-radius: var(--r-lg); background: rgb(255 255 255 / 0.5); }
.ui-git-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; font-size: var(--fs-sm); font-weight: 700; }
.ui-git { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ui-git li { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid rgb(15 20 17 / 0.1); font-size: var(--fs-md); font-weight: 600; }
.ui-git i {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: var(--r-xs);
  border: 1.5px solid var(--accent-ink); background: var(--accent-ink); color: var(--lavender);
  transition: background-color 0.3s, border-color 0.3s; transition-delay: calc(var(--k) * 340ms + 650ms);
}
.ui-git i svg { width: 13px; height: 13px; transition: opacity 0.3s, transform 0.3s var(--ease-out); transition-delay: inherit; }
.js .card--git:not(.is-in) .ui-git i { background: transparent; border-color: rgb(15 20 17 / 0.3); }
.js .card--git:not(.is-in) .ui-git i svg { opacity: 0; transform: scale(0.4); }



.ui-report { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: rgb(255 255 255 / 0.03); }
.ui-report-title { margin: 0 0 10px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.ui-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; margin: 0; }
.ui-figures div { padding: 10px; border-radius: var(--r-sm); background: rgb(255 255 255 / 0.04); }
.ui-figures dt { color: var(--muted); font-size: var(--fs-xs); }
.ui-figures dd { margin: 2px 0 0; font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -0.02em; }

/* Kit: one line is yours, the checklist is ours */
.kit-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(32px, 6vw, 96px); }
.h2 em { color: var(--accent); font-style: normal; }
.kit-copy .sub { margin-top: 24px; }
.kit-copy .text-link { margin-top: 28px; }
.checklist {
  padding: 26px clamp(20px, 2.4vw, 32px) 18px; border-radius: var(--r-card); background: #f3f5f2; color: var(--accent-ink);
  box-shadow: 0 40px 100px -40px rgb(0 0 0 / 0.7); transform: rotate(-1deg);
}
.checklist-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; font-size: var(--fs-base); font-weight: 700; }
.checklist-count { color: rgb(15 20 17 / 0.65); font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.checklist-rows { margin: 0; padding: 0; list-style: none; counter-reset: row; }
.checklist-rows li {
  display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-top: 1px dashed rgb(15 20 17 / 0.18);
  font-size: var(--fs-lg); font-weight: 600; counter-increment: row;
}
.checklist-rows li::before { content: counter(row, decimal-leading-zero); width: 1.6em; color: rgb(15 20 17 / 0.4); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.checklist-rows s { position: relative; color: rgb(15 20 17 / 0.6); text-decoration: none; transition: color 0.4s; transition-delay: calc(var(--k) * 130ms + 300ms); }
.checklist-rows s::after {
  content: ""; position: absolute; left: -2px; right: -2px; top: 55%; height: 1.5px; background: currentColor;
  transform-origin: left; transition: transform 0.45s var(--ease-out); transition-delay: inherit;
}
.checklist-rows b {
  margin-left: auto; padding: 3px 10px; border-radius: var(--r-pill); background: rgb(15 20 17 / 0.08); font-size: var(--fs-xs); font-weight: 700;
  transition: opacity 0.3s, transform 0.35s var(--ease-out); transition-delay: calc(var(--k) * 130ms + 450ms);
}
.checklist-rows .is-yours { margin: 6px -10px 0; padding: 14px 12px; border-top: 0; border-radius: var(--r-md); background: var(--accent); font-size: var(--fs-2xl); font-weight: 700; }
.checklist-rows .is-yours b { background: var(--accent-ink); color: var(--accent); }
.checklist.is-in .is-yours { animation: ring 1.4s var(--ease-out) 1.8s backwards; }
@keyframes ring { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 80%, transparent); } to { box-shadow: 0 0 0 16px transparent; } }
.js .checklist:not(.is-in) s { color: var(--accent-ink); }
.js .checklist:not(.is-in) s::after { transform: scaleX(0); }
.js .checklist:not(.is-in) b { opacity: 0; transform: scale(0.7); }

/* How: a line that fills as you read down the three steps */
.steps-grid, .faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: clamp(32px, 6vw, 96px); }
.steps-aside, .faq-aside { position: sticky; top: calc(var(--header-h) + 40px); }
.steps-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 30px; }
.timeline { --p: 1; position: relative; display: flex; flex-direction: column; gap: 28px; margin: 0; padding: 0 0 0 48px; list-style: none; }
.timeline::before, .timeline::after {
  content: ""; position: absolute; left: 11px; top: 30px; bottom: 30px; width: 2px; border-radius: 2px; background: rgb(255 255 255 / 0.1);
}
.timeline::after { background: var(--accent); transform: scaleY(var(--p)); transform-origin: top; }
.tl-step { position: relative; padding: 26px 28px 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.tl-dot {
  position: absolute; left: -48px; top: 28px; width: 24px; height: 24px; border: 2px solid rgb(255 255 255 / 0.22); border-radius: 50%;
  background: var(--bg); transition: border-color 0.4s, background-color 0.4s, box-shadow 0.4s;
}
.tl-step.is-lit .tl-dot, html:not(.js) .tl-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent); }
.tl-when { margin: 0 0 10px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; transition: color 0.4s; }
.tl-step.is-lit .tl-when { color: var(--accent); }
.tl-title { margin: 0 0 12px; font-size: clamp(26px, 2.8vw, 38px); font-weight: 700; letter-spacing: -0.045em; line-height: 1.15; }
.tl-text { max-width: 32em; margin: 0; color: var(--ink-2); font-size: var(--fs-lg); line-height: 1.65; }
.tl-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; margin: 0; padding: 0; list-style: none; }
.tl-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: var(--fs-base); }
.tl-list li::before { content: ""; flex: none; width: 5px; height: 10px; margin: 0 3px 3px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* FAQ */
.faq-aside .text-link { margin-top: 30px; }
.faq-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item h3 { margin: 0; }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 24px 2px;
  border: 0; background: none; color: var(--ink); font-size: clamp(16px, 1.3vw, 18px); font-weight: 600; letter-spacing: -0.01em;
  text-align: left; cursor: pointer;
}
.faq-q svg { flex: none; width: 18px; height: 18px; color: var(--muted); transition: transform 0.35s var(--ease-out); }
.faq-q[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq-a { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.4s var(--ease-out); }
.faq-a > div { overflow: hidden; }
.faq-a p { max-width: 40em; margin: 0; padding: 0 2px 26px; color: var(--ink-2); line-height: 1.7; }
.js .faq-item:not(.is-open) .faq-a { grid-template-rows: 0fr; }
.js .faq-item:not(.is-open) .faq-a > div { visibility: hidden; transition: visibility 0s 0.4s; }

/* Apply */
.apply-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: clamp(32px, 6vw, 96px); }
.tile--form { padding: clamp(24px, 2.6vw, 34px); border-radius: var(--r-card); background: var(--accent); color: var(--accent-ink); }
.apply-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field--wide, .form-foot { grid-column: 1 / -1; }
.field > label, .field legend { padding: 0; font-size: var(--fs-md); font-weight: 700; }
.field legend { margin-bottom: 8px; }
.field input[type="text"], .field textarea {
  height: 54px; padding: 0 16px; border: 1.5px solid rgb(15 20 17 / 0.16); border-radius: var(--r-md);
  background: rgb(255 255 255 / 0.72); color: var(--accent-ink); font: inherit; font-size: var(--fs-lg);
  transition: border-color 0.2s, background-color 0.2s;
}
.field input[type="text"]::placeholder, .field textarea::placeholder { color: rgb(15 20 17 / 0.62); }
.field input[type="text"]:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-color: var(--accent-ink); background: #fff; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #a3150c; }
.field textarea { height: auto; min-height: 120px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { position: relative; cursor: pointer; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; height: 50px; padding: 0 22px; border: 1.5px solid rgb(15 20 17 / 0.18); border-radius: var(--r-pill);
  background: rgb(255 255 255 / 0.5); font-size: var(--fs-base); font-weight: 600; transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.choice input:checked + span { border-color: var(--accent-ink); background: var(--accent-ink); color: var(--accent); }
.choice input:focus-visible + span { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-base); font-weight: 600; cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent-ink); }
.consent input:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.consent-details { font-size: var(--fs-md); }
.consent-details summary { display: flex; align-items: center; min-height: 24px; width: max-content; font-weight: 600; opacity: 0.75; cursor: pointer; }
.consent-details summary:focus-visible { outline-color: var(--accent-ink); }
.consent-details p { max-width: 48em; margin: 8px 0 0; line-height: 1.6; opacity: 0.85; }
.field-error { margin: 0; color: #7d1009; font-size: var(--fs-md); font-weight: 700; }
.field-error:empty, .form-status:empty { display: none; }
.gotcha { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 4px; }
.form-status { margin: 0; font-size: var(--fs-base); font-weight: 700; }
.apply-submit:focus-visible { outline-color: var(--accent-ink); }
.apply-submit:disabled { opacity: 0.6; cursor: progress; }

/* Closing: the same wiki, grown */
.closing { position: relative; isolation: isolate; display: grid; place-items: center; overflow: hidden; min-height: clamp(560px, 50vw, 720px); margin-top: clamp(120px, 14vw, 200px); }
.closing::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 40% 46% at 50% 50%, rgb(22 23 22 / 0.92) 0%, rgb(22 23 22 / 0.74) 46%, rgb(22 23 22 / 0) 82%),
    linear-gradient(180deg, var(--bg) 0%, transparent 20%, transparent 80%, var(--bg) 100%);
}
.closing-panel { display: flex; flex-direction: column; align-items: center; padding: 0 var(--gutter); text-align: center; }
.closing-panel .sub { margin-inline: auto; }
.closing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }

/* Footer */
.site-footer { position: relative; overflow: hidden; padding-top: clamp(80px, 9vw, 120px); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 6fr) repeat(2, minmax(0, 2fr)); gap: 32px; }
.footer-origin { margin: -12px 0 24px; color: var(--muted); font-size: var(--fs-md); }
.footer-origin b { color: var(--ink-2); font-weight: 600; }
.footer-lead { max-width: 15em; margin: 24px 0; font-size: clamp(22px, 2.2vw, 30px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.35; }
.footer-col { display: flex; flex-direction: column; gap: 12px; font-size: var(--fs-base); }
.footer-col a { display: inline-flex; align-items: center; min-height: 24px; color: rgb(255 255 255 / 0.74); text-decoration: none; }
.footer-col a:hover { color: var(--ink); }
.footer-col p { margin: 0; color: var(--muted); }
.footer-col .footer-title { color: var(--muted); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; }
.footer-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 72px; padding: 24px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); }
.footer-bar p { margin: 0; }
.footer-status { display: inline-flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: status 2.4s var(--ease-io) infinite; }
@keyframes status { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }


/* Scroll reveals */
.js [data-reveal] { transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), filter 0.9s var(--ease-out); }
.js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(26px); filter: blur(6px); }
.js [data-blur] { transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), filter 0.8s var(--ease-out); }
.js [data-blur]:not(.is-in) { opacity: 0; transform: translateY(14px); filter: blur(10px); }

/* Tablet */
@media (max-width: 1120px) {
  .card--chat { grid-column: 1 / -1; }
  .card--files, .card--git, .card--third { grid-column: span 6; }
  .scatter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo { grid-template-columns: minmax(0, 1fr); }
  .demo-copy { max-width: 36em; }
}

@media (max-width: 900px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .menu-button {
    position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
    border: 1px solid var(--line-2); border-radius: 50%; background: rgb(255 255 255 / 0.04); color: var(--ink); cursor: pointer;
  }
  .menu-lines, .menu-lines::before, .menu-lines::after { display: block; width: 16px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform 0.3s var(--ease-out), opacity 0.2s; }
  .menu-lines { position: relative; }
  .menu-lines::before, .menu-lines::after { content: ""; position: absolute; left: 0; }
  .menu-lines::before { top: -5px; }
  .menu-lines::after { top: 5px; }
  .site-header.is-open .menu-lines { background: transparent; }
  .site-header.is-open .menu-lines::before { transform: translateY(5px) rotate(45deg); }
  .site-header.is-open .menu-lines::after { transform: translateY(-5px) rotate(-45deg); }
  .nav-pill {
    position: absolute; top: calc(var(--header-h) - 2px); left: var(--gutter); right: var(--gutter);
    display: none; flex-direction: column; padding: 8px; border-radius: var(--r-lg); background: #1d1e1d;
  }
  .site-header.is-open .nav-pill { display: flex; }
  .nav-pill a { padding: 14px 16px; border-radius: var(--r-md); color: var(--ink); font-size: var(--fs-lg); }

  .hero { min-height: 0; padding-bottom: 0; }
  .hero::after { display: none; }
  .growth--hero { position: relative; z-index: 0; height: clamp(460px, 100vw, 640px); margin-top: 12px; }
  .growth-controls { right: var(--gutter); bottom: 16px; }

  .problem-head, .kit-grid, .apply-grid, .steps-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .steps-aside, .faq-aside { position: static; }
  .card { grid-column: 1 / -1; min-height: 0; }
  .card--third { grid-column: span 6; }
  .card-ui--marquee { min-height: 160px; }
  .checklist { transform: none; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .closing::before {
    background: radial-gradient(ellipse 95% 44% at 50% 50%, rgb(22 23 22 / 0.94) 0%, rgb(22 23 22 / 0.8) 55%, rgb(22 23 22 / 0.2) 90%),
      linear-gradient(180deg, var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%);
  }
}

/* Phone */
@media (max-width: 640px) {
  :root { --header-h: 64px; --r-card: 24px; }
  .br-phone { display: inline; }
  .prompt-copy, .prompt-copy .pill { width: 100%; }
  .flow-line { gap: 10px 20px; font-size: var(--fs-md); }
  .flow-line li { padding: 5px 11px; }
  .flow-line li + li::before { left: -15px; width: 10px; }
  .hero-title { font-size: clamp(34px, 10.4vw, 46px); line-height: 1.14; }
  .hero-badge { margin-bottom: 24px; }
  .hero-actions, .closing-actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 360px; }
  .scatter { grid-template-columns: minmax(0, 1fr); }
  .scatter-art { height: auto; min-height: 112px; }
  .app-body { grid-template-columns: minmax(0, 1fr); height: 430px; }
  .app-rail, .app-side, .app-model { display: none; }
  .app-thread { padding-top: 22px; }
  .app-hello { font-size: var(--fs-xl); }
  .app-steps { padding-left: 18px; font-size: var(--fs-md); }
  .card--third { grid-column: 1 / -1; }
  .card-ui { padding: 22px 22px 0; }
  .card-ui--git { margin: 22px 22px 0; padding: 16px 16px 12px; }
  .card-text { padding: 22px; }
  .ui-figures dd { font-size: var(--fs-2xl); }
  .checklist-rows li { font-size: var(--fs-base); }
  .timeline { padding-left: 36px; }
  .timeline::before, .timeline::after { left: 9px; }
  .tl-dot { left: -36px; width: 20px; height: 20px; }
  .tl-step { padding: 22px; }
  .tl-list { grid-template-columns: minmax(0, 1fr); }
  .apply-form { grid-template-columns: minmax(0, 1fr); }
  .form-foot .pill { width: 100%; }
  .footer-bar { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; transition-delay: 0ms !important;
  }
  .marquee-track { flex-wrap: wrap; width: auto; padding-inline: 28px; animation: none !important; }
  .marquee--reverse { display: none; }
  .card-ui--marquee { -webkit-mask-image: none; mask-image: none; }
}
