/* codiscuss.com. Dark and light follow the visitor's system; the room illustration and terminal are always dark. */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0b0e;
  --surface: #111216;
  --surface-2: #17191e;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .15);
  --text: #f4f4f6;
  --muted: #9ba1ad;
  --faint: #6c7281;
  --accent: #8b93ff;
  --accent-soft: rgba(139, 147, 255, .14);
  --ok: #4ade80;
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .09);
  --button-bg: #f4f4f6;
  --button-text: #0a0b0e;
  --topbar: rgba(10, 11, 14, .72);
  --glow-opacity: .5;
  --art-bg: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0));
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .04) inset;
  --shadow-room: 0 0 0 1px rgba(255, 255, 255, .09), 0 40px 120px -20px rgba(0, 0, 0, .8);
  --brand-gradient: linear-gradient(95deg, #6d9bff 0%, #9a8cff 32%, #ec6f93 66%, #f9b64a 100%);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --page: 1160px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #fbfbfc;
    --surface: #ffffff;
    --surface-2: #f3f4f7;
    --line: rgba(12, 16, 32, .09);
    --line-strong: rgba(12, 16, 32, .17);
    --text: #0d0f15;
    --muted: #596070;
    --faint: #8b91a1;
    --accent: #4b54e4;
    --accent-soft: rgba(75, 84, 228, .09);
    --ok: #16a34a;
    --warn: #b45309;
    --warn-soft: rgba(217, 119, 6, .08);
    --button-bg: #0d0f15;
    --button-text: #ffffff;
    --topbar: rgba(251, 251, 252, .78);
    --glow-opacity: .34;
    --art-bg: linear-gradient(180deg, #f6f7fa, #fbfbfc);
    --shadow-card: 0 1px 2px rgba(12, 16, 32, .04);
    --shadow-room: 0 0 0 1px rgba(12, 16, 32, .12), 0 40px 100px -24px rgba(24, 28, 60, .38);
    --brand-gradient: linear-gradient(95deg, #2f6df2 0%, #6f5cf0 32%, #dc4a78 66%, #e58a13 100%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
  font-feature-settings: "cv11", "ss03"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, ol, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--font-mono); font-size: .88em; padding: .1em .38em; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); }
b { font-weight: 600; }
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 24px; }
.ui-icon { width: 1em; height: 1em; flex: none; }
.brand-icon { width: 1em; height: 1em; flex: none; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--topbar); backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; height: 60px; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 620; font-size: 15.5px; letter-spacing: -.01em; white-space: nowrap; }
.brand img { border-radius: 7px; }
.nav { display: flex; gap: 26px; font-size: 14px; color: var(--muted); }
.nav a, .lang-switch, .icon-link { transition: color .15s; }
.nav a:hover, .lang-switch:hover, .icon-link:hover { color: var(--text); }
.top-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; font-size: 14px; color: var(--muted); }
.icon-link { display: inline-flex; font-size: 19px; }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; }
.lang-switch .ui-icon { font-size: 16px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 11px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: 15px; font-weight: 560; white-space: nowrap; cursor: pointer;
  transition: transform .15s, border-color .15s, background .15s, opacity .15s;
}
.button:hover { border-color: var(--faint); }
.button:active { transform: scale(.98); }
.button.primary { background: var(--button-bg); border-color: var(--button-bg); color: var(--button-text); }
.button.primary:hover { opacity: .88; }
.button.primary .ui-icon { transition: transform .2s; }
.button.primary:hover .ui-icon { transform: translateX(3px); }
.button.small { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 9px; }

/* Hero */
.hero { position: relative; padding: 88px 0 40px; text-align: center; }
.hero-glow {
  position: absolute; inset: -60px 0 auto; height: 1100px; pointer-events: none; opacity: var(--glow-opacity);
  background:
    radial-gradient(520px 340px at 26% 62%, rgba(72, 126, 255, .55), transparent 70%),
    radial-gradient(520px 360px at 50% 70%, rgba(139, 112, 255, .5), transparent 70%),
    radial-gradient(520px 340px at 74% 62%, rgba(240, 106, 140, .42), transparent 70%),
    radial-gradient(420px 260px at 88% 74%, rgba(249, 176, 66, .34), transparent 70%);
  filter: blur(40px);
}
.hero .wrap { position: relative; }
.pill {
  display: inline-flex; align-items: center; gap: 9px; height: 32px; padding: 0 14px; margin-bottom: 28px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 13.5px;
  box-shadow: var(--shadow-card); transition: color .15s, border-color .15s;
}
.pill:hover { color: var(--text); border-color: var(--faint); }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.pill .ui-icon { font-size: 13px; }
.hero h1 { font-size: clamp(40px, 6.6vw, 80px); line-height: 1.04; letter-spacing: -.04em; font-weight: 640; }
.grad { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { max-width: 660px; margin: 26px auto 0; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.command {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px 0 16px;
  border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); font-family: var(--font-mono); font-size: 14px;
}
.command code { padding: 0; border: 0; background: none; font-size: inherit; }
.prompt { color: var(--faint); user-select: none; }
.copy {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 15px; cursor: pointer; transition: background .15s, color .15s;
}
.copy:hover { background: var(--surface-2); color: var(--text); }
.copy > span { grid-area: 1 / 1; display: inline-flex; transition: opacity .15s, transform .15s; }
.copy-done { opacity: 0; transform: scale(.6); color: var(--ok); }
.copy.copied .copy-idle { opacity: 0; transform: scale(.6); }
.copy.copied .copy-done { opacity: 1; transform: none; }

/* Room illustration (always dark) */
.room {
  --r-bg: #16171b; --r-panel: #1b1d22; --r-line: rgba(255, 255, 255, .08); --r-text: #e6e8ee; --r-muted: #8f96a3; --r-accent: #a3aaff;
  position: relative; max-width: 1040px; margin: 72px auto 0; border-radius: 16px; overflow: hidden;
  background: var(--r-bg); color: var(--r-text); text-align: left; box-shadow: var(--shadow-room); font-size: 14px; line-height: 1.55;
}
.room-bar { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--r-line); background: var(--r-panel); }
.room-dots { display: inline-flex; gap: 7px; }
.room-dots i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.room-title { font-weight: 600; font-size: 13.5px; }
.room-title b { color: var(--r-muted); font-weight: 500; }
.room-path { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; color: var(--r-muted); font-family: var(--font-mono); font-size: 12px; }
.room-body { display: grid; grid-template-columns: 228px 1fr; }
.room-side { padding: 18px 12px; border-right: 1px solid var(--r-line); background: var(--r-panel); }
.room-label { padding: 0 8px 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--r-muted); }
.member + .room-label { margin-top: 18px; }
.member { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; }
.member:first-of-type { background: rgba(255, 255, 255, .05); }
.avatar { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .08); font-size: 17px; }
.avatar.user { color: var(--r-muted); font-size: 16px; }
.member-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.member-text b { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.member-text small { color: var(--r-muted); font-size: 11.5px; }
.host-tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 6px; background: rgba(249, 182, 74, .14); color: #f6c26b; font-style: normal; font-size: 10.5px; font-weight: 600; }
.status { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.status.busy { background: #4ade80; animation: pulse 2s ease-out infinite; }
.room-main { display: flex; flex-direction: column; min-width: 0; }
.room-feed { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px 18px; }
.msg.mine { align-self: flex-end; max-width: 78%; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: #2b2e63; border: 1px solid rgba(163, 170, 255, .22); }
.mention { display: inline-block; padding: 0 6px; border-radius: 6px; background: rgba(139, 147, 255, .2); color: var(--r-accent, var(--accent)); font-weight: 560; }
.parallel { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.parallel-label { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; color: var(--r-muted); font-size: 11.5px; letter-spacing: .02em; }
.parallel-label::before, .parallel-label::after { content: ""; flex: 1; height: 1px; background: var(--r-line); }
.reply { padding: 13px 14px; border: 1px solid var(--r-line); border-radius: 12px; background: rgba(255, 255, 255, .03); }
.reply header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.reply header .avatar { width: 22px; height: 22px; border-radius: 7px; font-size: 13px; }
.reply header small { margin-left: auto; color: var(--r-muted); font-size: 11.5px; white-space: nowrap; }
.reply p { color: #d3d6de; }
.reply footer { margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--r-line, var(--line)); color: var(--r-muted, var(--muted)); font-family: var(--font-mono); font-size: 11.5px; }
.reply.routing { border-color: rgba(163, 170, 255, .3); background: linear-gradient(180deg, rgba(139, 147, 255, .09), rgba(139, 147, 255, .02)); }
.dispatch { display: grid; gap: 7px; }
.dispatch li { display: flex; align-items: center; gap: 9px; color: #d3d6de; }
.working { display: inline-flex; gap: 4px; margin-left: auto; }
.working i { width: 5px; height: 5px; border-radius: 50%; background: var(--r-accent); animation: blink 1.2s infinite both; }
.working i:nth-child(2) { animation-delay: .18s; }
.working i:nth-child(3) { animation-delay: .36s; }
.queued { margin-left: auto; color: var(--r-muted); font-size: 11.5px; }
.composer { display: flex; align-items: center; justify-content: space-between; margin: 4px 24px 22px; padding: 10px 10px 10px 16px; border: 1px solid var(--r-line); border-radius: 13px; background: rgba(255, 255, 255, .04); color: var(--r-muted); }
.send { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: var(--r-text); font-size: 15px; }
.step-1, .step-2, .step-3, .step-4 { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.step-1 { animation-delay: .25s; } .step-2 { animation-delay: .8s; } .step-3 { animation-delay: 1.5s; } .step-4 { animation-delay: 2s; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .5); } 100% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes travel { from { left: 0; } to { left: calc(100% - 6px); } }
@keyframes dash { to { background-position: 16px 0; } }

/* Tools strip */
.tools { padding: 56px 0 24px; text-align: center; }
.tools p { color: var(--faint); font-size: 13.5px; letter-spacing: .01em; }
.tools ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 36px; margin-top: 22px; }
.tools li { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 15.5px; font-weight: 560; }
.tools .brand-icon { font-size: 21px; }

/* Sections */
.section { padding: 120px 0 0; }
.section-head { max-width: 900px; margin-bottom: 52px; }
.eyebrow { margin-bottom: 14px; color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: .01em; }
h2 { font-size: clamp(30px, 4.2vw, 50px); line-height: 1.1; letter-spacing: -.035em; font-weight: 630; }
.section-head h2 + p { max-width: 640px; margin-top: 18px; color: var(--muted); font-size: 18px; }
h3 { font-size: 17px; line-height: 1.35; letter-spacing: -.012em; font-weight: 600; }

/* Why */
.versus { display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; }
.versus-side { display: flex; flex-direction: column; padding: 32px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-card); }
.versus-side h3 { font-size: 19px; }
.versus-side > p { margin: 8px 0 28px; color: var(--muted); }
.theirs h3 { color: var(--muted); }
.ours { position: relative; border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--brand-gradient) border-box; }
.sandbox { position: relative; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 10px; flex: 1; min-height: 220px; padding: 34px 20px 44px; border: 1.5px dashed var(--line-strong); border-radius: 16px; }
.sandbox-label { position: absolute; top: -11px; left: 18px; padding: 0 8px; background: var(--surface); color: var(--faint); font-size: 12.5px; }
.ghost { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--faint); font-size: 13.5px; }
.ghost i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px dashed var(--faint); }
.sandbox-note { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: var(--faint); font-size: 12.5px; }
.linked { display: flex; flex-direction: column; flex: 1; justify-content: flex-end; }
.tool-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tool-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.tool-card b { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 14px; white-space: nowrap; }
.tool-card b .brand-icon { font-size: 17px; }
.tool-card span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; }
.tool-card span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); opacity: .8; }
.wires { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; height: 26px; }
.wires i { justify-self: center; width: 1.5px; background: linear-gradient(var(--line-strong), var(--accent)); }
.shared-room { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 13px; background: var(--accent-soft); }
.shared-room b { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; }
.shared-room img { border-radius: 5px; }
.shared-room span { color: var(--muted); font-size: 13px; }

/* Feature tiles */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { display: flex; flex-direction: column; grid-column: span 2; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow-card); transition: border-color .2s; }
.tile:hover { border-color: var(--line-strong); }
.tile.span-3 { grid-column: span 3; }
.tile.span-4 { grid-column: span 4; }
.tile.wide { flex-direction: row; }
.tile-art { display: flex; align-items: center; justify-content: center; min-height: 216px; padding: 26px; background: var(--art-bg); border-bottom: 1px solid var(--line); font-size: 13.5px; }
.tile.wide .tile-art { order: 2; flex: 1.75; border-bottom: 0; border-left: 1px solid var(--line); }
.tile-text { display: flex; flex-direction: column; flex: 1; padding: 26px 28px 28px; }
.tile.wide .tile-text { justify-content: center; }
.tile.wide .tile-text a { margin-top: 0; }
.tile-text p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.tile-text a { display: inline-flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 18px; color: var(--accent); font-size: 14px; font-weight: 550; }
.tile-text a .ui-icon { font-size: 14px; transition: transform .2s; }
.tile-text a:hover .ui-icon { transform: translate(2px, -2px); }
.tile-icon { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--accent); font-size: 18px; }

.lanes { flex-direction: column; align-items: stretch; gap: 12px; }
.lane { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 12px; }
.lane-name { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.lanes .mention { color: var(--accent); background: var(--accent-soft); }
.track { position: relative; height: 34px; border-radius: 10px; background: repeating-linear-gradient(90deg, transparent 0 39px, var(--line) 39px 40px); }
.seg { position: absolute; top: 3px; bottom: 3px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font-style: normal; font-size: 12.5px; font-weight: 550; white-space: nowrap; overflow: hidden; }
.seg .brand-icon { font-size: 14px; }
.s1 { left: 0; width: 31%; } .s2 { left: 33%; width: 31%; } .s3 { left: 66%; width: 34%; }
.s4 { left: 12%; width: 50%; } .s5 { left: 44%; width: 40%; }
.s4, .s5 { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-soft); }
.lane-axis { display: flex; align-items: center; gap: 10px; margin-left: 96px; color: var(--faint); font-size: 11.5px; }
.lane-axis::before { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); order: 2; }

.question-card, .rounds, .goal { width: 100%; max-width: 300px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); box-shadow: 0 12px 30px -18px rgba(0, 0, 0, .5); }
.question-card header, .rounds header, .goal header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.question-card header .brand-icon { font-size: 16px; }
.question-card header small { color: var(--muted); }
.question-card p { margin-bottom: 10px; font-weight: 560; }
.option { display: flex; align-items: center; gap: 9px; padding: 7px 10px; margin-top: 6px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }
.option i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--faint); }
.option.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.option.selected i { border: 4px solid var(--accent); }

.rounds header { justify-content: space-between; }
.meter { width: 84px; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; width: 62%; height: 100%; border-radius: 3px; background: var(--brand-gradient); }
.rounds li { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 9px; font-weight: 550; }
.rounds .avatar, .goal .avatar { width: 24px; height: 24px; border-radius: 7px; background: var(--surface-2); font-size: 14px; }
.rounds em { margin-left: auto; color: var(--faint); font-style: normal; font-size: 12px; font-weight: 450; }
.rounds .done em { color: var(--ok); font-size: 14px; display: inline-flex; }
.rounds .speaking { background: var(--accent-soft); }
.rounds .speaking em { color: var(--accent); }

.goal header { color: var(--accent); font-size: 16px; }
.goal header b { color: var(--text); font-size: 13.5px; }
.goal ul { position: relative; display: grid; gap: 12px; padding-left: 4px; }
.goal ul::before { content: ""; position: absolute; left: 11.5px; top: 10px; bottom: 10px; width: 1px; background: var(--line-strong); }
.goal li { position: relative; display: flex; align-items: center; gap: 11px; color: var(--muted); }
.goal li > i { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--faint); background: var(--surface); font-size: 10px; z-index: 1; }
.goal .done > i { border-color: var(--ok); background: var(--ok); color: var(--surface); }
.goal .active { color: var(--text); font-weight: 550; }
.goal .active > i { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--accent); }
.goal .waiting > i { border-color: var(--warn); }
.goal .chip { margin-left: auto; font-family: inherit; }

.flowchart { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0; row-gap: 18px; }
.flowchart .node { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-weight: 550; }
.flowchart .node .brand-icon { font-size: 15px; }
.edge { width: 18px; height: 1.5px; background: var(--line-strong); }
.run { display: inline-flex; align-items: center; gap: 7px; flex-basis: 100%; justify-content: center; }
.run { color: var(--accent); font-weight: 600; }
.run .ui-icon { padding: 5px; box-sizing: content-box; border-radius: 50%; background: var(--accent-soft); font-size: 12px; }

.devices { display: flex; align-items: flex-start; justify-content: center; width: 100%; max-width: 460px; }
.devices small { display: block; margin-top: 12px; color: var(--muted); font-size: 12px; text-align: center; white-space: nowrap; }
.laptop span { display: grid; place-items: center; width: 132px; height: 92px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.laptop svg { width: 56px; height: 56px; color: var(--text); }
.relay { flex: 1; min-width: 60px; margin-top: 45px; }
.relay i { position: relative; display: block; height: 2px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px); }
.relay i::after { content: ""; position: absolute; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: travel 2.4s ease-in-out infinite alternate; }
.handset span { display: grid; place-items: center; width: 58px; height: 92px; margin: 0 auto; border: 1.5px solid var(--line-strong); border-radius: 13px; background: var(--surface); }
.handset span i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); font-size: 15px; }
.more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.more-item { display: flex; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-card); transition: border-color .2s, transform .2s; }
.more-item:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.more-item .tile-icon { margin: 0; }
.more-item h3 { font-size: 15.5px; }
.more-item p { margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.more-item.guide { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

/* Participants */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mode { display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-card); }
.mode-tag { align-self: flex-start; padding: 3px 10px; margin-bottom: 16px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600; }
.mode h3 { font-size: 20px; }
.mode > p { margin: 8px 0 22px; color: var(--muted); font-size: 15px; }
.mode > p a, .footnote a, .facts a, .callout a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.logo-list { display: grid; gap: 8px; margin-bottom: 22px; }
.logo-list li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-weight: 560; }
.logo-list .brand-icon, .logo-grid .brand-icon { font-size: 20px; }
.logo-list span { display: flex; flex: 1; align-items: baseline; justify-content: space-between; gap: 10px; }
.logo-list small { color: var(--faint); font-size: 12.5px; font-weight: 450; }
.logo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 22px; }
.logo-grid li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 14.5px; font-weight: 560; }
.logo-grid .span { grid-column: 1 / -1; }
.can-host { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; color: var(--muted); font-size: 13.5px; }
.can-host .ui-icon { color: #e9a93c; font-size: 15px; }
.mini-terminal { padding: 14px 16px; margin-bottom: 10px; border-radius: 12px; background: #131418; color: #e6e8ee; font-family: var(--font-mono); font-size: 13px; line-height: 1.7; border: 1px solid rgba(255, 255, 255, .08); }
.dim { color: #7f8694; }
.footnote { margin-top: 26px; color: var(--muted); font-size: 14.5px; }

/* How it works */
.diagram { display: flex; align-items: center; padding: 44px 32px 36px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-card); font-size: 14px; }
.d-node { position: relative; display: flex; flex-direction: column; align-items: center; flex: none; min-width: 132px; padding: 18px 18px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface-2); text-align: center; }
.d-node > .ui-icon { margin-bottom: 8px; color: var(--accent); font-size: 20px; }
.d-node small { color: var(--muted); font-size: 12.5px; }
.d-node small:only-of-type { font-family: inherit; }
.d-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.d-badge.key { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.d-link { position: relative; display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 44px; }
.d-machine .d-link { flex: none; width: 120px; }
.d-link i { display: block; width: 100%; height: 2px; background: repeating-linear-gradient(90deg, var(--faint) 0 8px, transparent 8px 16px); animation: dash 1s linear infinite; opacity: .7; }
.d-link small { position: absolute; top: 9px; color: var(--faint); font-size: 11.5px; white-space: nowrap; }
.d-machine { position: relative; display: flex; align-items: center; flex: none; gap: 0; padding: 30px 20px 22px; border: 1.5px dashed color-mix(in srgb, var(--ok) 45%, transparent); border-radius: 18px; }
.d-machine-label { position: absolute; top: -12px; left: 18px; display: inline-flex; align-items: center; gap: 7px; padding: 0 9px; background: var(--surface); color: var(--ok); font-size: 12.5px; font-weight: 600; }
.d-agents { display: grid; gap: 7px; flex: none; }
.d-agents span { display: flex; align-items: center; gap: 9px; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); font-weight: 550; font-size: 13.5px; white-space: nowrap; }
.d-agents .brand-icon { font-size: 16px; }
.how-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 36px; counter-reset: point; }
.how-points li { counter-increment: point; padding-top: 18px; border-top: 1px solid var(--line-strong); }
.how-points b { display: flex; align-items: baseline; gap: 10px; font-size: 16px; }
.how-points b::before { content: "0" counter(point); color: var(--accent); font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; }
.how-points p { margin-top: 8px; color: var(--muted); font-size: 15px; }

/* Quick start */
.start { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.terminal { border-radius: 16px; overflow: hidden; background: #131418; color: #e6e8ee; box-shadow: var(--shadow-room); }
.terminal-bar { display: flex; align-items: center; gap: 14px; height: 42px; padding: 0 8px 0 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); color: #8f96a3; font-size: 12.5px; }
.terminal-bar .copy { margin-left: auto; color: #8f96a3; }
.terminal-bar .copy:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.terminal pre { padding: 22px 22px 26px; overflow-x: auto; font-family: var(--font-mono); font-size: 13.5px; line-height: 2; }
.terminal .prompt { color: #6c7281; }
.ok { color: #4ade80; }
.url { color: #a3aaff; }
.start-steps { position: relative; display: grid; gap: 26px; counter-reset: step; }
.start-steps::before { content: ""; position: absolute; left: 15.5px; top: 16px; bottom: 16px; width: 1px; background: var(--line-strong); }
.start-steps li { position: relative; counter-increment: step; padding-left: 52px; }
.start-steps li::before { content: counter(step); position: absolute; left: 0; top: -3px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--bg); color: var(--accent); font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.start-steps p { margin-top: 3px; color: var(--muted); font-size: 15px; }
.start-steps p b { color: var(--text); }

/* Data and security */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.facts article { padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-card); }
.facts p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.callout { display: flex; gap: 16px; margin-top: 16px; padding: 22px 26px; border: 1px solid color-mix(in srgb, var(--warn) 38%, transparent); border-radius: 20px; background: var(--warn-soft); }
.callout > .ui-icon { margin-top: 2px; color: var(--warn); font-size: 20px; }
.callout p { margin-top: 4px; color: var(--muted); font-size: 15px; }

/* Closing */
.closing { padding-bottom: 120px; }
.closing-card { position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; padding: 60px; border: 1px solid var(--line); border-radius: 30px; background: var(--surface); overflow: hidden; }
.closing-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: calc(var(--glow-opacity) * .7);
  background: radial-gradient(420px 300px at 0% 100%, rgba(72, 126, 255, .5), transparent 70%), radial-gradient(420px 300px at 100% 0%, rgba(240, 106, 140, .4), transparent 70%);
}
.closing-card > * { position: relative; }
.closing-text p { margin-top: 16px; color: var(--muted); font-size: 18px; }
.closing-text .hero-actions { justify-content: flex-start; }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 14px; background: #101113; box-shadow: var(--shadow-room); }
.film figcaption { margin-top: 12px; color: var(--faint); font-size: 13px; text-align: center; }

/* Footer */
.footer { padding: 56px 0 44px; border-top: 1px solid var(--line); font-size: 14px; }
.footer .wrap { display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; }
.footer-brand p { margin-top: 12px; color: var(--muted); }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-links div { display: grid; gap: 10px; align-content: start; }
.footer-links h4 { margin-bottom: 4px; color: var(--faint); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.footer-links a { color: var(--muted); transition: color .15s; }
.footer-links a:hover { color: var(--text); }
.footer-legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }

/* Sign-in page */
.login-page { display: flex; flex-direction: column; min-height: 100vh; }
.signin { position: relative; flex: 1; padding: 88px 0 110px; }
.signin .wrap { max-width: 760px; }
.signin-steps { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-bottom: 30px; color: var(--faint); font-size: 14px; }
.signin-steps li { display: inline-flex; align-items: center; gap: 9px; }
.signin-steps span { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line-strong); border-radius: 50%; font-family: var(--font-mono); font-size: 12px; }
.signin-steps .current { color: var(--text); font-weight: 560; }
.signin-steps .current span { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.signin h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.1; letter-spacing: -.035em; font-weight: 640; }
.signin .lead { margin: 16px 0 40px; color: var(--muted); font-size: 18px; }
.computers { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.computer { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-card); transition: border-color .2s, transform .2s; }
a.computer:hover { border-color: var(--accent); transform: translateY(-2px); }
.computer-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); font-size: 22px; }
.computer-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.computer-text b { font-size: 17px; }
.computer-text small { color: var(--muted); font-size: 13px; font-family: var(--font-mono); overflow-wrap: anywhere; }
.computer-arrow { display: inline-flex; color: var(--faint); font-size: 18px; transition: transform .2s, color .2s; }
a.computer:hover .computer-arrow { transform: translateX(3px); color: var(--accent); }
.computer.closed { border-style: dashed; box-shadow: none; }
.computer.closed .computer-icon { background: var(--surface-2); color: var(--faint); }
.computer.closed b { color: var(--muted); }
.computer.closed small { font-family: inherit; }
.empty { color: var(--muted); }
.signin-note { display: flex; align-items: center; gap: 9px; margin-top: 30px; color: var(--faint); font-size: 14px; }

/* Chinese typography: wider tracking and taller lines than Latin display type */
:lang(zh-CN) .hero h1 { letter-spacing: -.02em; line-height: 1.18; font-weight: 700; }
:lang(zh-CN) h2, :lang(zh-CN) .signin h1 { letter-spacing: -.015em; line-height: 1.25; font-weight: 700; }
:lang(zh-CN) h3 { letter-spacing: 0; }
:lang(zh-CN) body { line-height: 1.75; }

/* Narrow screens */
@media (max-width: 1000px) {
  .nav { display: none; }
  .versus, .start, .closing-card { grid-template-columns: 1fr; }
  .tile, .tile.span-3, .tile.span-4 { grid-column: span 3; }
  .tile.wide { grid-column: 1 / -1; }
  .more, .modes, .facts { grid-template-columns: 1fr 1fr; }
  .diagram { flex-direction: column; align-items: stretch; gap: 0; }
  .diagram > .d-link, .d-machine > .d-link { flex: none; width: auto; height: 44px; min-width: 0; justify-content: center; }
  .diagram .d-link i { width: 2px; height: 100%; background: repeating-linear-gradient(180deg, var(--faint) 0 8px, transparent 8px 16px); animation: none; }
  .diagram .d-link small { top: 12px; left: calc(50% + 12px); }
  .d-machine { flex-direction: column; align-items: stretch; }
  .closing-card { padding: 40px; gap: 36px; }
}
@media (max-width: 700px) {
  .wrap { padding: 0 20px; }
  .topbar .wrap { gap: 12px; }
  .top-actions { gap: 12px; }
  .icon-link { display: none; }
  .hero { padding: 56px 0 24px; }
  .hero h1 { font-size: clamp(36px, 10.6vw, 52px); }
  :lang(zh-CN) .hero h1 { font-size: clamp(28px, 9.4vw, 48px); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .command { justify-content: space-between; }
  .room { margin-top: 48px; font-size: 13.5px; border-radius: 14px; }
  .room-body { grid-template-columns: 1fr; }
  .room-side, .room-path { display: none; }
  .room-feed { padding: 16px 14px 12px; }
  .parallel { grid-template-columns: 1fr; }
  .msg.mine { max-width: 92%; }
  .reply header small { display: none; }
  .composer { margin: 4px 14px 16px; }
  .section { padding-top: 88px; }
  .section-head { margin-bottom: 36px; }
  .section-head h2 + p { font-size: 16.5px; }
  .versus-side { padding: 24px 20px; }
  .tool-cards { grid-template-columns: 1fr; }
  .tool-card { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; }
  .tool-card b { flex-basis: 100%; }
  .wires { grid-template-columns: 1fr; }
  .wires i:not(:first-child) { display: none; }
  .bento { grid-template-columns: 1fr; }
  .tile, .tile.span-3, .tile.span-4, .tile.wide { grid-column: auto; flex-direction: column; }
  .tile.wide .tile-art { order: 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .tile-art { min-height: 0; padding: 22px 18px; }
  .lane { grid-template-columns: 76px 1fr; gap: 8px; }
  .lane-axis { margin-left: 84px; }
  .seg { padding: 0 7px; gap: 5px; font-size: 11.5px; }
  .more, .modes, .facts, .how-points { grid-template-columns: 1fr; }
  .how-points { gap: 22px; }
  .diagram { padding: 30px 18px 22px; }
  .closing { padding-bottom: 88px; }
  .closing-card { padding: 30px 22px; border-radius: 24px; }
  .footer .wrap { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .signin { padding: 56px 0 80px; }
}

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