/* KKAIBOT — design system */
/* v3 tokens — neutral paper + ink, one brand accent (KK 橙), one radius */
:root, [data-theme="light"] {
  --bg: #f7f7f5; --bg2: #efefec; --card: #ffffff; --card2: #f6f6f4; --line: #e5e5e1; --line2: #d3d3cd;
  --text: #121212; --muted: #4b4b47; --faint: #7b7b75; --ink: #121212;
  --brand: #ff6a1a; --brand-rgb: 255,106,26; --brand-ink: #c2410c; --brand-soft: #fff1e7;
  --info: #2563eb; --info-rgb: 37,99,235;
  --brand2: var(--brand-ink); --accent: var(--brand); --grad: var(--brand);
  --ok: #15803d; --warn: #b45309; --err: #dc2626;
  --radius: 12px; --radius-s: 10px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --hard: 3px 3px 0 var(--ink);
  --nav-h: 64px; --maxw: 1160px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0f0f0e; --bg2: #171716; --card: #1a1a19; --card2: #222220; --line: #2b2b29; --line2: #3b3b38;
  --text: #f3f3f0; --muted: #bdbdb6; --faint: #8b8b85; --ink: #f3f3f0;
  --brand-ink: #ff8a4c; --brand-soft: rgba(255,106,26,.12);
  --info: #60a5fa; --info-rgb: 96,165,250;
  --ok: #4ade80; --warn: #fbbf24; --err: #f87171;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --hard: 3px 3px 0 var(--brand);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img, video { max-width: 100%; display: block; }
::selection { background: rgba(var(--brand-rgb),.35); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
.nav-in { height: 100%; display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .5px; font-size: 18px; flex-shrink: 0; }
.logo-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 900; box-shadow: 0 6px 20px rgba(var(--brand-rgb),.45); }
.nav-links { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 14.5px; white-space: nowrap; transition: .15s; }
.nav-links a:hover { color: var(--text); background: var(--card); }
.nav-links a.active { color: var(--text); background: var(--card2); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; transition: .15s; font-size: 16px; }
.icon-btn:hover { border-color: var(--line2); }
.menu-btn { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; cursor: pointer; border: none; }

/* drawer (mobile) */
.drawer-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 80; opacity: 0; pointer-events: none; transition: .2s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(300px, 84vw); background: var(--bg2); z-index: 90; transform: translateX(100%); transition: .25s; padding: 20px; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--line); overflow-y: auto; }
.drawer a { padding: 12px 14px; border-radius: 12px; display: flex; gap: 12px; align-items: center; }
.drawer a.active, .drawer a:hover { background: var(--card); }
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-mask { opacity: 1; pointer-events: auto; }

/* bottom tabbar (mobile) */
.tabbar { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: color-mix(in srgb, var(--bg2) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.tabbar-in { display: grid; grid-template-columns: repeat(5, 1fr); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 0; }
.tabbar a .ti { font-size: 19px; line-height: 1.2; }
.tabbar a.active { color: var(--text); }
.tabbar a.active .ti { filter: drop-shadow(0 0 8px rgba(var(--brand-rgb),.7)); }

/* ---------- buttons / inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); cursor: pointer; font-size: 14.5px; font-weight: 600; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--brand); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--grad); border: none; color: #fff; box-shadow: 0 6px 22px rgba(var(--brand-rgb),.35); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--card); border-color: var(--line); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.input, .textarea, .select { width: 100%; background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 14px; outline: none; transition: .15s; font-size: 15px; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.18); }
.textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
label.lbl { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }

.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; }
.seg button { border: none; background: transparent; padding: 8px 16px; border-radius: 10px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--card2); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line2); background: transparent; padding: 6px 12px; border-radius: 999px; font-size: 13px; cursor: pointer; color: var(--muted); transition: .15s; }
.chip:hover { color: var(--text); border-color: var(--brand); }
.chip.on { background: rgba(var(--brand-rgb),.16); border-color: var(--brand); color: var(--text); }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; font-size: 12px; border-radius: 999px; background: var(--card2); color: var(--muted); border: 1px solid var(--line); }
.tag.brand { background: rgba(var(--brand-rgb),.15); color: var(--brand-ink); border-color: rgba(var(--brand-rgb),.3); }
[data-theme="light"] .tag.brand { color: var(--brand-ink); }
.tag.ok { background: rgba(52,211,153,.12); color: var(--ok); border-color: rgba(52,211,153,.3); }
.tag.warn { background: rgba(251,191,36,.12); color: var(--warn); border-color: rgba(251,191,36,.3); }

/* ---------- layout pieces ---------- */
main { min-height: calc(100vh - var(--nav-h)); padding-bottom: 60px; }
.page-head { padding: 36px 0 18px; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(24px, 3.2vw, 34px); letter-spacing: -.5px; }
.page-head p { margin: 0; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-h h3 { margin: 0; font-size: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.section { padding: 40px 0 10px; }
.section-h { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-h h2 { margin: 0; font-size: 22px; letter-spacing: -.3px; }
.section-h a { color: var(--muted); font-size: 14px; }
.section-h a:hover { color: var(--text); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); border: 1px dashed var(--line2); border-radius: var(--radius); }
.empty .em { font-size: 34px; margin-bottom: 8px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 70px 0 40px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 600px; background: radial-gradient(closest-side, rgba(var(--brand-rgb),.35), transparent 70%), radial-gradient(closest-side at 70% 40%, rgba(var(--info-rgb),.22), transparent 70%); filter: blur(20px); z-index: -1; }
.hero h1 { font-size: clamp(32px, 5.4vw, 60px); line-height: 1.12; margin: 14px 0 16px; letter-spacing: -1.5px; font-weight: 800; }
.hero p.lead { font-size: clamp(15px, 1.6vw, 18px); color: var(--muted); max-width: 640px; margin: 0 0 28px; }
.pill { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); font-size: 13px; color: var(--muted); }
.pill b { color: var(--text); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.quick { background: var(--card); border: 1px solid var(--line2); border-radius: 20px; padding: 14px; box-shadow: var(--shadow); max-width: 820px; }
.quick textarea { border: none; background: transparent; width: 100%; resize: none; outline: none; font-size: 16px; min-height: 76px; padding: 8px 6px; line-height: 1.7; }
.quick-foot { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.examples { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.examples button { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; text-align: left; }
.examples button:hover { color: var(--text); border-color: var(--line2); }

.feature { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); transition: .2s; overflow: hidden; min-height: 170px; }
.feature:hover { transform: translateY(-3px); border-color: var(--line2); box-shadow: var(--shadow); }
.feature .fi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--card2); border: 1px solid var(--line); }
.feature h3 { margin: 4px 0 0; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.feature .go { margin-top: auto; font-size: 13px; color: var(--brand2); }
.feature.big { grid-column: span 2; background: linear-gradient(160deg, rgba(var(--brand-rgb),.18), rgba(var(--info-rgb),.06) 60%), var(--card); }
.stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 26px; color: var(--muted); font-size: 14px; }
.stats b { display: block; font-size: 24px; color: var(--text); }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-demo { position: relative; }
.demo-card { background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--line2); border-radius: 22px; padding: 18px; box-shadow: var(--shadow), 0 0 80px rgba(var(--brand-rgb),.18); transform: perspective(1200px) rotateY(-6deg) rotateX(2deg); }
.demo-row { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.demo-row p { margin: 8px 0 0; font-size: 14.5px; }
.demo-row pre { margin: 8px 0 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; color: var(--muted); max-height: 108px; overflow: hidden; }
.demo-row.out { margin-top: 10px; border-color: rgba(var(--brand-rgb),.35); }
.demo-mid { display: flex; align-items: center; gap: 10px; margin: 12px 4px; font-size: 13px; color: var(--muted); }
.demo-line { flex: 1; height: 2px; border-radius: 2px; background: var(--grad); opacity: .6; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.demo-chips span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feature.big.alt { background: linear-gradient(160deg, rgba(var(--info-rgb),.14), rgba(var(--brand-rgb),.05) 60%), var(--card); }

/* ---------- 全站板块目录 ---------- */
.dir-section { padding-top: 24px; }
.dir-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dir-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: .2s; overflow: hidden; }
.dir-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--c); opacity: .85; }
.dir-card::after { content: ""; position: absolute; width: 160px; height: 160px; right: -60px; top: -70px; border-radius: 50%; background: var(--c); opacity: .08; filter: blur(10px); pointer-events: none; }
.dir-card:hover { border-color: color-mix(in srgb, var(--c) 55%, transparent); transform: translateY(-2px); box-shadow: var(--shadow); }
.dir-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dir-icon { width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.dir-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dir-title b { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.dir-title small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dir-no { font-family: var(--mono); font-size: 11px; color: var(--c); font-weight: 700; letter-spacing: .5px; }
.dir-go { color: var(--faint); font-size: 18px; transition: .2s; }
.dir-card:hover .dir-go { color: var(--c); transform: translateX(3px); }
.dir-subs { display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 1; }
.dir-subs a { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); background: var(--bg2); transition: .15s; white-space: nowrap; }
.dir-subs a:hover { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }

/* ---------- prompt studio ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.panel + .panel { margin-top: 16px; }
.target-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.target { text-align: left; border: 1px solid var(--line2); background: var(--bg2); border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: .15s; }
.target b { display: block; font-size: 14px; }
.target span { font-size: 12px; color: var(--muted); }
.target.on { border-color: var(--brand); background: rgba(var(--brand-rgb),.12); }
.opt-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.opt-row .select { width: auto; padding: 7px 12px; font-size: 14px; }
.out-block { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; position: relative; }
.out-block + .out-block { margin-top: 12px; }
.out-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; color: var(--muted); gap: 8px; }
.out-text { font-family: var(--mono); font-size: 13.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; margin: 0; }
.out-main { border-color: rgba(var(--brand-rgb),.45); background: linear-gradient(180deg, rgba(var(--brand-rgb),.08), transparent), var(--bg2); }
.out-main .out-text { font-size: 14.5px; color: var(--text); }
.breakdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bd { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; min-height: 52px; }
.bd i { font-style: normal; font-size: 11.5px; color: var(--faint); display: block; }
.notice { border-radius: 12px; padding: 10px 14px; font-size: 13.5px; border: 1px solid; }
.notice.warn { background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.3); color: var(--warn); }
.notice.info { background: rgba(var(--info-rgb),.07); border-color: rgba(var(--info-rgb),.28); color: var(--brand2); }
.notice.err { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.3); color: var(--err); }
.notice.ok { background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.3); color: var(--ok); }
.tips { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; }
.hist-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; }
.hist-item:hover { background: var(--bg2); border-color: var(--line); }
.hist-item .ht { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--card2), var(--bg2), var(--card2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 14px; margin: 8px 0; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- chat ---------- */
.chat-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; height: calc(100vh - var(--nav-h) - 40px); padding-top: 20px; }
.chat-side { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.chat-list { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.chat-list .ci { padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.chat-list .ci span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-list .ci.on, .chat-list .ci:hover { background: var(--bg2); color: var(--text); }
.chat-list .ci .x { opacity: 0; border: none; background: none; cursor: pointer; color: var(--faint); }
.chat-list .ci:hover .x { opacity: 1; }
.chat-main { background: var(--card); border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.chat-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; gap: 12px; max-width: 860px; width: 100%; margin: 0 auto; }
.msg .who { width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.msg.user { flex-direction: row-reverse; }
.msg.user .who { background: var(--card2); }
.msg.ai .who { background: var(--grad); color: #fff; }
.bubble { padding: 10px 14px; border-radius: 14px; line-height: 1.75; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.msg.user .bubble { background: rgba(var(--brand-rgb),.16); border: 1px solid rgba(var(--brand-rgb),.3); white-space: pre-wrap; }
.msg.ai .bubble { background: transparent; padding-left: 0; padding-top: 4px; flex: 1; }
.chat-input { border-top: 1px solid var(--line); padding: 12px; }
.chat-box { display: flex; gap: 10px; align-items: flex-end; background: var(--bg2); border: 1px solid var(--line2); border-radius: 16px; padding: 8px 8px 8px 14px; max-width: 860px; margin: 0 auto; }
.chat-box textarea { flex: 1; border: none; background: transparent; outline: none; resize: none; max-height: 180px; min-height: 26px; padding: 6px 0; line-height: 1.6; font-size: 15px; }
.chat-hello { margin: auto; text-align: center; max-width: 560px; }
.chat-hello h2 { font-size: 26px; margin: 10px 0; }
.chat-hello .examples { justify-content: center; }

/* markdown */
.md p { margin: 0 0 .8em; } .md p:last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4 { margin: 1.1em 0 .5em; line-height: 1.35; }
.md h2 { font-size: 1.3em; } .md h3 { font-size: 1.12em; }
.md ul, .md ol { padding-left: 1.4em; margin: 0 0 .8em; }
.md li + li { margin-top: .25em; }
.md code { font-family: var(--mono); background: var(--card2); padding: 1px 6px; border-radius: 6px; font-size: .9em; border: 1px solid var(--line); }
.md pre { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; overflow-x: auto; margin: 0 0 .9em; }
.md pre code { background: none; border: none; padding: 0; font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.md pre .copy-code { position: absolute; top: 8px; right: 8px; }
.md table { border-collapse: collapse; width: 100%; margin: 0 0 1em; font-size: 14px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line2); padding: 7px 10px; text-align: left; }
.md th { background: var(--card2); }
.md a { color: var(--brand2); text-decoration: underline; text-underline-offset: 3px; }
.md blockquote { margin: 0 0 .8em; padding: 6px 14px; border-left: 3px solid var(--brand); color: var(--muted); background: var(--bg2); border-radius: 0 8px 8px 0; }
.md strong { color: var(--text); }

/* ---------- cards / lists ---------- */
.tool { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); transition: .15s; }
.tool:hover { border-color: var(--line2); transform: translateY(-2px); }
.tool-logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; flex-shrink: 0; font-size: 16px; }
.tool h4 { margin: 0; font-size: 15px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tool p { margin: 4px 0 8px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.snip { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: .15s; }
.snip:hover { border-color: var(--line2); }
.snip-img { aspect-ratio: 4/3; background: var(--card2); overflow: hidden; }
.snip-img img, .snip-img video { width: 100%; height: 100%; object-fit: cover; }
.snip-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.snip h4 { margin: 0; font-size: 15px; }
.snip pre { margin: 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: var(--muted); white-space: pre-wrap; word-break: break-word; max-height: 128px; overflow: hidden; background: var(--bg2); border-radius: 10px; padding: 10px; border: 1px solid var(--line); }
.snip-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 12.5px; color: var(--faint); }
.like { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 3px 10px; cursor: pointer; font-size: 12.5px; color: var(--muted); }
.like.on { color: var(--accent); border-color: rgba(var(--brand-rgb),.4); background: rgba(var(--brand-rgb),.08); }
.masonry { columns: 3 280px; column-gap: 16px; }
.masonry > * { break-inside: avoid; margin-bottom: 16px; }
.tut { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); transition: .15s; }
.tut:hover { border-color: var(--line2); transform: translateY(-2px); }
.tut .cv { font-size: 30px; }
.tut h3 { margin: 0; font-size: 16px; }
.tut p { margin: 0; color: var(--muted); font-size: 13.5px; }
.article { max-width: 780px; margin: 0 auto; }
.article .md { font-size: 16px; line-height: 1.85; }
.fx { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.fx .fxi { font-size: 30px; }
.fx h3 { margin: 0; font-size: 16px; }
.fx p { margin: 0; font-size: 13.5px; color: var(--muted); }
.fx .pr { font-size: 12.5px; color: var(--muted); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; line-height: 1.6; }
.fx .pr b { color: var(--text); font-weight: 600; margin-right: 4px; }
.gen-result { aspect-ratio: 1/1; background: var(--bg2); border: 1px dashed var(--line2); border-radius: 16px; display: grid; place-items: center; overflow: hidden; color: var(--muted); text-align: center; padding: 20px; }
.gen-result img, .gen-result video { width: 100%; height: 100%; object-fit: contain; }
.gen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gen-grid .gi { aspect-ratio: 1/1; border-radius: 12px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); position: relative; display: grid; place-items: center; font-size: 12px; color: var(--muted); padding: 6px; text-align: center; }
.gen-grid .gi img, .gen-grid .gi video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- modal / toast ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(5,6,12,.6); backdrop-filter: blur(6px); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { width: min(460px, 100%); background: var(--card); border: 1px solid var(--line2); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto; }
.modal.wide { width: min(640px, 100%); }
.modal h3 { margin: 0 0 6px; font-size: 20px; }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--card2); border: 1px solid var(--line2); color: var(--text); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; animation: fade .2s; max-width: 90vw; }
.toast.err { border-color: rgba(248,113,113,.5); }
.toast.ok { border-color: rgba(52,211,153,.5); }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--faint); font-size: 13px; }
.footer .row { gap: 18px; }
.footer a:hover { color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-demo { display: none; }
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio { grid-template-columns: 1fr; }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .chat-wrap { grid-template-columns: 1fr; height: calc(100vh - var(--nav-h) - 70px); padding-top: 10px; }
  .chat-side { display: none; }
  .chat-side.open { display: flex; position: fixed; inset: var(--nav-h) 0 0 0; z-index: 70; border-radius: 0; }
}
@media (max-width: 720px) {
  .container { padding: 0 14px; }
  .tabbar { display: block; }
  main { padding-bottom: 90px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .feature.big { grid-column: auto; }
  .hero { padding: 40px 0 20px; }
  .breakdown { grid-template-columns: repeat(2, 1fr); }
  .target-grid { grid-template-columns: 1fr 1fr; }
  .seg button { padding: 7px 11px; font-size: 13.5px; }
  .nav-right .login-text { display: none; }
  .chat-wrap { height: calc(100vh - var(--nav-h) - 74px - env(safe-area-inset-bottom)); }
  .chat-top { flex-wrap: nowrap; padding: 10px; gap: 8px; }
  .chat-top #quota { font-size: 11.5px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
  .chat-top > span[style*="flex:1"] { display: none; }
  .chat-msgs { padding: 14px 12px; }
  .msg.ai .bubble { font-size: 14.5px; }
  .footer { padding-bottom: 100px; }
  .page-head { padding: 22px 0 12px; }
  .grid-tools { grid-template-columns: 1fr !important; }
  .quick-foot .faint { display: none; }
  .dir-grid { grid-template-columns: 1fr; gap: 10px; }
  .dir-card { padding: 14px; gap: 10px; }
  .dir-subs { gap: 6px; }
  .dir-subs a { padding: 4px 9px; font-size: 12px; }
  .dir-title small { white-space: normal; overflow: visible; }
  .quick-foot .btn { width: 100%; }
  .examples { gap: 6px; }
  .examples button { white-space: normal; max-width: 100%; line-height: 1.45; border-radius: 12px; padding: 7px 11px; font-size: 12.5px; overflow-wrap: anywhere; }
  .page-head.row .btn { width: 100%; }
}

/* login not yet available */
.soon-badge { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; color: var(--faint); background: var(--bg2); border: 1px dashed var(--line2); cursor: not-allowed; white-space: nowrap; user-select: none; }
@media (max-width: 560px) { .soon-badge { height: 30px; padding: 0 10px; font-size: 12px; } }

/* 404 */
.nf { text-align: center; padding: 80px 16px 60px; }
.nf .code { font-size: 88px; font-weight: 800; line-height: 1; background: linear-gradient(135deg, var(--brand), var(--brand2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf p { color: var(--muted); }
.nf .row { justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

@media (max-width: 560px) { .hero .pill-more { display: none; } .hero .pill b { white-space: nowrap; } }

/* ---------- 目录：进阶宽卡 ---------- */
.dir-card.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; background: linear-gradient(120deg, color-mix(in srgb, var(--c) 14%, var(--card)), var(--card) 60%); }
.dir-card.wide .dir-head { flex: 1; }
.dir-card.wide .dir-subs { justify-content: flex-end; max-width: 55%; }
@media (max-width: 900px) { .dir-card.wide { flex-direction: column; align-items: stretch; } .dir-card.wide .dir-subs { max-width: none; justify-content: flex-start; } }

/* ---------- AI 分公司 ---------- */
.tag.ai { background: rgba(var(--brand-rgb),.15); color: var(--brand-ink); border-color: rgba(var(--brand-rgb),.35); }
:root[data-theme="light"] .tag.ai { color: var(--brand-ink); }
.tag.err { background: rgba(248,113,113,.1); color: var(--err); border-color: rgba(248,113,113,.3); }
.snip-branch { color: var(--brand2); }
.disclaimer { font-size: 12px; margin: 28px 0 10px; line-height: 1.6; }
.how .fi { font-size: 26px; } .how h3 { margin: 8px 0 4px; font-size: 16px; } .how p { margin: 0; font-size: 13.5px; }
.lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.theme-pick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.theme-opt { position: relative; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.theme-opt small { color: var(--muted); font-size: 12px; }
.theme-opt .tag { position: absolute; top: 8px; right: 8px; font-size: 10.5px; padding: 0 6px; }
.theme-opt.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.18); }
.custom-box { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.custom-box .lbl { margin-bottom: 4px; font-size: 12px; }
.seg.sm button { padding: 6px 12px; font-size: 13px; }
.select.sm { width: auto; padding: 4px 8px; font-size: 12.5px; border-radius: 8px; }
.btn.btn-xs { height: 24px; min-height: 0; padding: 0 8px; font-size: 12px; border-radius: 8px; }
.btn.danger { color: var(--err); border-color: rgba(248,113,113,.4); }
.br-head h2 { font-size: 22px; }
.br-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.br-stats > div { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.br-stats b { font-size: 20px; } .br-stats b small { font-size: 12px; color: var(--faint); font-weight: 500; }
.bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 4px; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand2)); }
.company-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.org { display: flex; flex-direction: column; align-items: center; }
.org-node { padding: 8px 16px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); font-weight: 600; font-size: 14px; text-align: center; }
.org-node small { color: var(--muted); font-weight: 500; }
.org-node.hq { background: linear-gradient(135deg, rgba(var(--brand-rgb),.22), rgba(var(--info-rgb),.12)); border-color: rgba(var(--brand-rgb),.4); }
.org-node.gm { border-color: rgba(251,191,36,.45); }
.org-line { width: 2px; height: 14px; background: var(--line2); }
.org-roles { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 10px; border-top: 2px solid var(--line2); }
.org-role { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--card2); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.org-role.vacant { opacity: .7; border-style: dashed; }
.org-role.ai { border-color: rgba(var(--brand-rgb),.35); }
.org-role p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.olist { display: flex; flex-direction: column; gap: 6px; }
.orow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); font-size: 14px; }
.orow:hover { border-color: var(--line2); }
.br-card { position: relative; display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); transition: .15s; }
.br-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.br-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: rgba(var(--brand-rgb),.15); flex-shrink: 0; }
.br-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.br-main small { color: var(--muted); }
.br-rank { position: absolute; top: -8px; left: -8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--card2); border: 1px solid var(--line2); }
.br-rank.r1 { background: #f59e0b; color: #111; } .br-rank.r2 { background: #cbd5e1; color: #111; } .br-rank.r3 { background: #d97706; color: #111; }
.adm-stats .card { display: flex; flex-direction: column; gap: 4px; padding: 14px; } .adm-stats b { font-size: 22px; }
.adm-row { margin-bottom: 10px; padding: 14px; }
.steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-dot { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--bg2); border: 1px solid var(--line2); margin-top: 12px; }
.step.confirmed .step-dot { background: var(--ok); color: #062; border-color: var(--ok); }
.step.cur .step-dot { background: var(--brand); color: #fff; border-color: var(--brand); }
.step-body { flex: 1; min-width: 0; padding: 14px 16px; }
.step.cur .step-body { border-color: rgba(var(--brand-rgb),.5); }
.step-out { margin-top: 10px; font-size: 14px; } .step-out p { margin: 4px 0; } .step-out ul { margin: 6px 0; padding-left: 20px; }
.out-mini { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-top: 6px; font-size: 12.5px; }
.out-mini pre, .deliver-pre { white-space: pre-wrap; word-break: break-word; margin: 6px 0 0; font-family: var(--mono, monospace); font-size: 12.5px; }
.deliver { margin-top: 16px; border-color: rgba(52,211,153,.35); }
.deliver-pre { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.cmt { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; } .cmt p { margin: 4px 0 0; }
@media (max-width: 900px) {
  .company-grid { grid-template-columns: 1fr; }
  .theme-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .br-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .theme-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .custom-box { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .org-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .br-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step-dot { width: 24px; height: 24px; font-size: 11px; }
  .step-body { padding: 12px; }
}

/* =====================================================================
   v3 visual identity — paper & ink, one accent (KK 橙), one radius,
   bold outlined "hard shadow" style for key brand elements.
   ===================================================================== */
body { font-size: 15.5px; line-height: 1.7; letter-spacing: .01em; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { color: var(--text); letter-spacing: -.02em; }
.grad-text { background: none; color: var(--brand-ink); -webkit-text-fill-color: currentColor; }
.mark { position: relative; white-space: nowrap; z-index: 0; }
.mark::after { content: ""; position: absolute; left: -.08em; right: -.08em; bottom: .06em; height: .36em; background: var(--brand); opacity: .9; z-index: -1; border-radius: 3px; }
[data-theme="dark"] .mark::after { opacity: .55; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .04em; margin-bottom: 10px; }
.badge-accent { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: 0; vertical-align: middle; }

/* nav: sticky translucent, logo left · ≤6 links centered · actions right */
.nav { background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.nav-in { gap: 16px; }
.logo { gap: 9px; font-size: 19px; letter-spacing: 0; }
.logo .logo-mark, img.logo-mark { width: 30px; height: 30px; border-radius: 0; background: none; box-shadow: none; display: block; }
.wordmark { font-weight: 900; letter-spacing: -.01em; color: var(--text); }
.wordmark em { font-style: normal; color: var(--brand); }
.nav-links { flex: 1; justify-content: center; gap: 4px; }
.nav-links a { padding: 7px 12px; border-radius: var(--radius-s); color: var(--muted); font-size: 14.5px; font-weight: 500; }
.nav-links a:hover { background: var(--bg2); color: var(--text); }
.nav-links a.active { background: transparent; color: var(--text); font-weight: 700; box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.nav-right { margin-left: 0; gap: 8px; }
.icon-btn { width: 36px; height: 36px; border-radius: var(--radius-s); background: transparent; border-color: transparent; font-size: 15px; }
.icon-btn:hover { background: var(--bg2); border-color: var(--line); }
.soon-badge { height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--faint); font-size: 12.5px; cursor: default; }
.avatar { background: var(--ink); color: var(--bg); }
.drawer a { border-radius: var(--radius-s); font-size: 15px; }
.drawer a.active { background: var(--card); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }

/* tabbar */
.tabbar { background: color-mix(in srgb, var(--card) 94%, transparent); }
.tabbar a { font-size: 11.5px; color: var(--faint); font-weight: 500; }
.tabbar a.active { color: var(--text); font-weight: 700; }
.tabbar a.active .ti { filter: none; }
.tabbar a.active::after { content: ""; width: 16px; height: 3px; border-radius: 3px; background: var(--brand); margin-top: 1px; }

/* buttons: ink primary, outlined secondary, accent for one hero CTA */
.btn { height: 40px; border-radius: var(--radius-s); border: 1px solid var(--line2); background: var(--card); color: var(--text); font-weight: 600; font-size: 14.5px; }
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--ink); color: var(--bg); border: 1px solid var(--ink); box-shadow: none; }
.btn-primary:hover { filter: none; background: color-mix(in srgb, var(--ink) 86%, var(--brand)); }
.btn-accent { background: var(--brand); color: #fff; border: 2px solid var(--ink); box-shadow: var(--hard); }
.btn-accent:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { height: 32px; border-radius: var(--radius-s); font-size: 13px; }
.btn-lg { height: 50px; padding: 0 24px; border-radius: var(--radius); font-size: 16px; }
.btn-lg.btn-primary { box-shadow: 3px 3px 0 var(--brand); }
.btn-lg.btn-primary:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--brand); }
.input, .textarea, .select { background: var(--card); border-color: var(--line2); border-radius: var(--radius-s); color: var(--text); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.18); }
.seg { background: var(--bg2); border-color: var(--line); border-radius: var(--radius); }
.seg button { border-radius: 8px; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line); }
.seg-sm button { padding: 5px 10px; font-size: 12.5px; }
.chip { color: var(--muted); border-color: var(--line2); }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tag { background: var(--bg2); color: var(--muted); border-color: var(--line); }
.tag.brand { background: var(--brand-soft); color: var(--brand-ink); border-color: rgba(var(--brand-rgb),.35); }
[data-theme="light"] .tag.brand { color: var(--brand-ink); }

/* surfaces: white cards, thin line, one radius */
.card, .panel, .feature, .fx, .tut, .tool, .snip, .dir-card, .quick, .empty { border-radius: var(--radius); }
.card, .panel { background: var(--card); border-color: var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.page-head { padding: 40px 0 22px; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.25; }
.page-head p { font-size: 15.5px; color: var(--muted); max-width: 720px; }
.section { padding: 56px 0 8px; }
.section-h { align-items: flex-end; margin-bottom: 20px; }
.section-h h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; letter-spacing: -.02em; }
.section-h p { margin: 4px 0 0; font-size: 14.5px; }
.section-h a { color: var(--text); font-weight: 600; font-size: 14px; border-bottom: 2px solid var(--brand); padding-bottom: 1px; }
.notice.info { background: rgba(var(--info-rgb),.07); }
.footer { color: var(--faint); background: var(--card); }

/* ---------- v3 homepage ---------- */
.v3-hero { position: relative; padding: 64px 0 56px; border-bottom: 1px solid var(--line);
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 13%, transparent) 1px, transparent 1px); background-size: 22px 22px; background-position: -11px -11px; }
.v3-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 80px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.v3-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.v3-hero h1 { font-size: clamp(38px, 5.6vw, 68px); line-height: 1.12; font-weight: 900; letter-spacing: -.04em; margin: 4px 0 18px; }
.v3-hero .lead { font-size: clamp(16px, 1.5vw, 18.5px); color: var(--muted); max-width: 520px; margin: 0 0 28px; line-height: 1.75; }
.v3-cta { gap: 12px; }
.v3-fine { margin: 16px 0 0; font-size: 13px; color: var(--faint); }
.org-visual { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--ink); padding: 22px; }
[data-theme="dark"] .org-visual { box-shadow: 6px 6px 0 var(--brand); }
.ov-boss { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--brand-soft); }
.ov-boss b { display: block; font-size: 16px; } .ov-boss span { font-size: 13px; color: var(--muted); }
.ov-lv { margin-left: auto; font-weight: 800; font-size: 13px !important; color: var(--text) !important; border: 1.5px solid var(--ink); border-radius: 999px; padding: 1px 9px; background: var(--card); }
.ov-line { height: 22px; width: 2px; background: var(--ink); margin: 0 auto; position: relative; }
.ov-line::after { content: ""; position: absolute; top: 100%; left: -110px; width: 222px; height: 2px; background: var(--ink); }
.ov-team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.ov-emp { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 14px 6px 12px; border: 1.5px solid var(--line2); border-radius: var(--radius); background: var(--card); }
.ov-emp b { font-size: 13.5px; }
.st { font-size: 12px; color: var(--faint); }
.st.ok { color: var(--ok); font-weight: 600; } .st.run { color: var(--brand-ink); font-weight: 600; }
.ov-order { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--bg2); font-size: 13px; color: var(--muted); }
.ov-order b { color: var(--text); }
.ov-prog { flex: 1; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; min-width: 40px; }
.ov-prog i { display: block; height: 100%; background: var(--brand); }

.v3-multi { padding: 72px 0 24px; }
.center-head { text-align: center; max-width: 760px; margin: 0 auto 28px; }
.center-head h2 { font-size: clamp(26px, 3.6vw, 42px); font-weight: 900; letter-spacing: -.035em; line-height: 1.25; margin: 0 0 12px; }
.center-head p { color: var(--muted); font-size: 16px; margin: 0; }
.one-input { max-width: 780px; margin: 0 auto; display: flex; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 10px; box-shadow: 4px 4px 0 var(--ink); }
[data-theme="dark"] .one-input { box-shadow: 4px 4px 0 var(--brand); }
.one-input textarea { flex: 1; min-width: 0; border: none; outline: none; background: transparent; resize: none; font-size: 16.5px; line-height: 1.6; padding: 8px 6px; height: 56px; color: var(--text); }
.one-input textarea::placeholder { color: var(--faint); }
.one-input .seg { flex-shrink: 0; }
.one-input .btn { flex-shrink: 0; height: 44px; }
.sample-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 16px auto 28px; max-width: 900px; font-size: 13.5px; }
.sample-row button { border: 1px solid var(--line2); background: var(--card); color: var(--muted); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; cursor: pointer; }
.sample-row button:hover { color: var(--text); border-color: var(--ink); }
.cmp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cmp-col { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.cmp-h { display: flex; align-items: center; gap: 8px; }
.cmp-h b { font-size: 15.5px; }
.lang { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); }
.lang.zh { background: var(--brand-soft); color: var(--brand-ink); border-color: rgba(var(--brand-rgb),.35); }
.cmp-desc { margin: 4px 0 10px; font-size: 12.5px; color: var(--faint); }
.cmp-text { flex: 1; font-size: 14px; line-height: 1.7; color: var(--text); word-break: break-word; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; min-height: 7em; }
.cmp-copy { margin-top: 12px; align-self: flex-start; }
.cmp-note { text-align: center; color: var(--faint); font-size: 13px; margin: 16px 0 0; }

.theme-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.theme-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: .15s; }
.theme-card:hover { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.theme-card .mascot { margin-bottom: 6px; }
.theme-card b { font-size: 17px; } .theme-card .chain { font-size: 13.5px; color: var(--text); } .theme-card small { font-size: 12.5px; color: var(--faint); }

.more-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.more-item { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .15s; }
.more-item:nth-child(3n) { border-right: none; }
.more-item:nth-last-child(-n+3) { border-bottom: none; }
.more-item:hover { background: var(--bg2); }
.more-item .mi { font-size: 22px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--radius-s); background: var(--bg2); flex-shrink: 0; }
.more-item b { display: block; font-size: 15.5px; } .more-item small { color: var(--muted); font-size: 13px; }
.more-item .go { margin-left: auto; color: var(--faint); }
.more-item:hover .go { color: var(--brand-ink); }
.home-snips { align-items: start; }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 36px 40px; border-radius: var(--radius); background: #121212; color: #f5f5f2; margin: 24px 0 32px; }
.cta-band h2 { color: #fff; margin: 0 0 6px; font-size: clamp(24px, 3vw, 32px); font-weight: 900; }
.cta-band p { margin: 0; color: #c9c9c3; }
[data-theme="dark"] .cta-band { background: var(--card2); border: 1px solid var(--line2); }

/* ---------- 全部板块 /all ---------- */
.all-group { margin: 8px 0 34px; }
.all-group h2 { font-size: 14px; color: var(--faint); font-weight: 700; letter-spacing: .06em; margin: 0 0 12px; }
.all-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.all-item { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.all-item:last-child { border-bottom: none; }
.all-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.all-icon { font-size: 22px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius-s); background: var(--bg2); flex-shrink: 0; }
.all-title { min-width: 0; } .all-title b { display: block; font-size: 16.5px; } .all-title small { color: var(--muted); font-size: 13.5px; }
.all-go { color: var(--faint); margin-left: auto; padding-left: 8px; }
.all-head:hover b { color: var(--brand-ink); }
.all-subs { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; }
.all-subs a { color: var(--muted); padding: 2px 0; }
.all-subs a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--brand); text-underline-offset: 3px; }

/* ---------- prompt studio: multi-platform ---------- */
.studio.is-multi { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
.target { background: var(--card); border-radius: var(--radius-s); position: relative; }
.target.on { border-color: var(--ink); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--ink); }
.target.multi { padding-left: 38px; }
.target .ck { position: absolute; left: 11px; top: 12px; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line2); display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 900; color: #fff; background: var(--card); }
.target.on .ck { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.studio.is-multi .target-grid { grid-template-columns: 1fr; }
.out-text { font-family: var(--font); font-size: 14.5px; }
.out-main { border-color: rgba(var(--brand-rgb),.5); background: var(--brand-soft); }
.mtabs { display: none; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.mtabs::-webkit-scrollbar { display: none; }
.mtabs button { flex-shrink: 0; border: 1px solid var(--line2); background: var(--card); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.mtabs button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.mgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mcard { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--card); min-width: 0; }
.mcard-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mcard-h b { font-size: 15px; margin-right: auto; }
.mcard-text { font-size: 14px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; background: var(--bg2); border-radius: var(--radius-s); padding: 12px; flex: 1; max-height: 320px; overflow: auto; }
.mcard-text.is-loading { opacity: .5; }
.mcard-more { font-size: 13px; color: var(--muted); }
.mcard-more summary { cursor: pointer; font-weight: 600; }
.mcard-more div { margin-top: 6px; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; }
.mcard-act { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- responsive (v3) ---------- */
@media (min-width: 961px) { .nav-links { display: flex !important; } .menu-btn { display: none !important; } }
@media (max-width: 1080px) {
  .cmp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio.is-multi { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
  .mgrid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .nav-links { display: none; } .menu-btn { display: grid; }
  .v3-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .theme-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more-item:nth-child(3n) { border-right: 1px solid var(--line); }
  .more-item:nth-child(2n) { border-right: none; }
  .more-item:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .more-item:nth-last-child(-n+2) { border-bottom: none; }
  .studio, .studio.is-multi { grid-template-columns: minmax(0, 1fr); }
  .all-item { grid-template-columns: 1fr; gap: 8px; }
  .all-subs { padding-left: 58px; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .nav-cta { display: none; }
  .soon-badge { height: 28px; padding: 0 9px; font-size: 12px; }
  .v3-hero { padding: 28px 0 32px; background-size: 18px 18px; }
  .v3-hero h1 { font-size: 40px; margin-bottom: 12px; }
  .v3-hero .lead { font-size: 15.5px; margin-bottom: 20px; }
  .v3-cta .btn-lg { flex: 1 1 100%; height: 48px; }
  .v3-fine { margin-top: 12px; }
  .org-visual { padding: 14px; box-shadow: 4px 4px 0 var(--ink); }
  .ov-boss { padding: 10px; } .ov-boss .mascot { width: 36px; height: 36px; }
  .ov-team { gap: 6px; } .ov-emp { padding: 10px 4px; } .ov-emp .mascot { width: 32px; height: 32px; } .ov-emp b { font-size: 12.5px; }
  .ov-line::after { left: -80px; width: 162px; }
  .ov-order { flex-wrap: wrap; }
  .v3-multi { padding: 44px 0 10px; }
  .center-head { text-align: left; margin-bottom: 18px; }
  .center-head h2 { font-size: 27px; }
  .center-head p { font-size: 15px; }
  .one-input { flex-wrap: wrap; padding: 10px; box-shadow: 3px 3px 0 var(--ink); }
  .one-input textarea { flex: 1 1 100%; order: -1; height: 72px; font-size: 16px; }
  .one-input .btn { flex: 1; }
  .sample-row { justify-content: flex-start; margin: 12px 0 18px; }
  .sample-row button { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cmp-grid { grid-template-columns: 1fr; gap: 10px; }
  .cmp-text { -webkit-line-clamp: 5; min-height: 0; }
  .theme-strip { gap: 10px; }
  .theme-card { padding: 14px; }
  .more-list { grid-template-columns: 1fr; }
  .more-item { border-right: none !important; border-bottom: 1px solid var(--line) !important; padding: 14px 16px; }
  .more-item:last-child { border-bottom: none !important; }
  .section { padding: 40px 0 4px; }
  .cta-band { padding: 26px 22px; }
  .cta-band .btn { width: 100%; }
  .all-item { padding: 14px 16px; }
  .all-subs { padding-left: 0; }
  .mtabs { display: flex; }
  .mcard { display: none; }
  .mcard.on { display: flex; }
}
#loginBtn { gap: 0; }
.studio .examples { flex-direction: column; align-items: stretch; width: 100%; gap: 6px; }
.studio .examples button { border-radius: var(--radius-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; background: var(--card); }
.snip pre, .snip .sn-text, .snip-body pre { font-family: var(--font); }
.snip pre { font-size: 13.5px; color: var(--text); border: none; } .snip { border-radius: var(--radius); }
@media (max-width: 720px) {
  .cmp-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -14px; padding: 0 14px 6px; scrollbar-width: none; }
  .cmp-grid::-webkit-scrollbar { display: none; }
  .cmp-col { flex: 0 0 84%; scroll-snap-align: start; }
  .cmp-text { -webkit-line-clamp: 7; }
}
@media (max-width: 720px) { .cmp-grid { scroll-padding-left: 14px; } .sample-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -14px; margin-right: -14px; padding: 0 14px; } .sample-row button, .sample-row span { flex-shrink: 0; max-width: none; } }
/* company (v3) */
.org-node { border-radius: var(--radius-s); background: var(--card); }
.org-node.hq { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.org-node.br { border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--brand); }
.org-node.gm { background: var(--brand-soft); border-color: rgba(var(--brand-rgb),.5); }
.org-line { background: var(--ink); opacity: .6; }
.org-roles { border-top-color: var(--line2); }
.org-role { background: var(--card); border-radius: var(--radius-s); }
.org-role.ai { border-color: var(--line2); }
.br-card { border-radius: var(--radius); }
.br-card:hover { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.br-ic { background: var(--brand-soft); border-radius: var(--radius-s); }
.br-stats > div { border-radius: var(--radius-s); background: var(--card2); }
.step.cur .step-dot { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.step.cur .step-body { border-color: var(--ink); }
/* v3.1 QA: contrast + mobile scroller affordance */
.v3-fine { color: var(--muted); }
.scroll-dots { display: none; }
@media (max-width: 720px) {
  .cmp-col { flex: 0 0 78%; }
  .scroll-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
  .scroll-dots i { width: 7px; height: 7px; border-radius: 999px; background: var(--line2); transition: .2s; }
  .scroll-dots i.on { width: 20px; background: var(--ink); }
  .sample-row { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
  .sample-row.at-end { -webkit-mask-image: none; mask-image: none; }
  .sample-end { flex: 0 0 24px; }
}
.sample-end { display: none; } @media (max-width: 720px) { .sample-end { display: block; } .mtabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); } }

/* ================= v4: 新手指南 / 员工模板库 / 点数账房 / 自建生态圈 ================= */
.ctabs { flex-wrap: wrap; max-width: 100%; }
.ctabs button { white-space: nowrap; }
/* templates */
.tpl-hero { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.tpl-hero h2 { margin: 0 0 6px; }
.tpl-hero p { margin: 0; }
.tpl-sub { margin: 0 0 10px; font-size: 15px; }
.tpl-groups { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 26px; }
.tpl-group { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s, 12px); background: var(--card); color: var(--text); text-decoration: none; transition: .15s; }
.tpl-group:hover { border-color: rgba(var(--brand-rgb), .5); transform: translateY(-1px); }
.tpl-group b { font-size: 14px; }
.tpl-group span { font-size: 12px; color: var(--muted); line-height: 1.45; }
.tpl-sec { margin-bottom: 26px; scroll-margin-top: 80px; }
.tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tpl-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius, 16px); background: var(--card); min-width: 0; }
.tpl-card.hired { border-color: rgba(var(--brand-rgb), .45); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .07); }
.tpl-top { display: flex; align-items: center; gap: 10px; }
.tpl-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tpl-name b { font-size: 16px; }
.tpl-name small { font-size: 11.5px; color: var(--faint); }
.tpl-emoji { font-size: 22px; }
.tpl-one { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.tpl-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-meta span { font-size: 12px; padding: 4px 8px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line); color: var(--text); }
.tpl-meta i { font-style: normal; color: var(--faint); margin-right: 5px; }
.tpl-more { font-size: 13px; border-top: 1px dashed var(--line2); padding-top: 8px; }
.tpl-more summary { cursor: pointer; font-weight: 700; color: var(--brand-ink); list-style: none; }
.tpl-more summary::-webkit-details-marker { display: none; }
.tpl-more summary::after { content: ' ▾'; }
.tpl-more[open] summary::after { content: ' ▴'; }
.tpl-more h4 { margin: 10px 0 4px; font-size: 12.5px; color: var(--faint); }
.tpl-more ul, .tpl-more ol { margin: 0; padding-left: 18px; line-height: 1.6; }
.tpl-more p { margin: 0; line-height: 1.6; }
.tpl-note { margin-top: 8px !important; font-size: 12.5px; color: var(--muted); }
.tpl-act { margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* points dashboard */
.pts-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px; }
.pts-grid .card { min-width: 0; }
.ring-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ring-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; flex: 1; min-width: 150px; }
.ring-side div { display: flex; flex-direction: column; }
.ring-side span { font-size: 12px; }
.ring-side b { font-size: 20px; }
.pts-from-bonus { white-space: nowrap; }
.ring-side b.hl { color: var(--brand-ink); }
.bars { display: block; overflow: visible; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) 4em; align-items: center; gap: 10px; font-size: 13px; }
.hbar-n { display: flex; align-items: center; gap: 6px; line-height: 1.25; overflow-wrap: anywhere; }
.hbar-svg { width: 100%; height: 14px; display: block; }
.hbar-v { text-align: right; }
.pts-h4 { margin: 14px 0 6px; font-size: 13px; color: var(--faint); }
.pts-top { margin: 0; padding-left: 20px; }
.pts-top li { padding: 3px 0; }
.pts-top li span { float: right; color: var(--muted); }
.pts-sug { gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 13.5px; }
.ledger-mini-in { display: flex; gap: 14px; align-items: center; }
.ledger-mini-in > div { flex: 1; min-width: 0; }
/* build ecosystem */
.build { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.build-preview { position: sticky; top: calc(var(--nav-h, 64px) + 12px); }
.build-base { flex-wrap: wrap; max-width: 100%; }
.build-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.build-role { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--card2); min-width: 0; }
.build-role.on { border-color: rgba(var(--brand-rgb), .55); background: rgba(var(--brand-rgb), .07); }
.build-role input { accent-color: var(--brand); flex: none; }
.build-role span { display: flex; flex-direction: column; min-width: 0; }
.build-role b { font-size: 13px; line-height: 1.3; word-break: keep-all; overflow-wrap: anywhere; }
.build-role small { font-size: 11px; color: var(--faint); }
.build-preview .org-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.eco-top { gap: 10px; margin-bottom: 14px; align-items: flex-start; flex-wrap: wrap; }
.eco-top > .row { flex-wrap: wrap; flex: 1; min-width: 0; }
.chip.user-eco { border-style: dashed; }
.eco-card { margin-bottom: 14px; border-color: rgba(var(--brand-rgb), .4); }
.route-pick { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
/* guide */
.guide { max-width: 920px; padding-bottom: 40px; }
.guide-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 30px 0 10px; }
.guide-hero h1 { font-size: clamp(28px, 5vw, 42px); margin: 0 0 10px; line-height: 1.15; }
.guide-hero .lead { font-size: 16px; color: var(--muted); line-height: 1.7; margin: 0 0 14px; }
.guide-beta { font-size: 14px; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; position: sticky; top: var(--nav-h, 64px); z-index: 5; background: var(--bg); padding: 10px 0; border-bottom: 1px solid var(--line); }
.guide-toc a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 12px; border: 1px solid var(--line2); border-radius: 999px; color: var(--text); text-decoration: none; background: var(--card); }
.guide-toc a:hover { border-color: var(--brand); }
.guide-toc i, .guide-sec h2 i { font-style: normal; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 800; }
.guide-sec { padding: 26px 0 8px; scroll-margin-top: 130px; }
.guide-sec h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; margin: 0 0 12px; }
.guide-sec h2 i { width: 28px; height: 28px; font-size: 14px; background: var(--brand); color: #fff; }
.guide-sec p { line-height: 1.75; }
.guide-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 10px 0; }
.guide-cards .card p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.guide-steps { counter-reset: gs; list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 10px; }
.guide-steps li { counter-increment: gs; position: relative; padding: 12px 14px 12px 50px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); line-height: 1.65; }
.guide-steps li::before { content: counter(gs); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; border-radius: 8px; background: rgba(var(--brand-rgb), .14); color: var(--brand-ink); font-weight: 800; display: grid; place-items: center; font-size: 13px; }
.guide-steps code, .guide-sec code { background: var(--bg2); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
.guide-list { line-height: 1.85; padding-left: 20px; }
.guide-faq details { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; background: var(--card); }
.guide-faq summary { cursor: pointer; font-weight: 700; }
.guide-faq p { margin: 8px 0 0; color: var(--muted); }
.guide .cta-band { margin-top: 30px; }
@media (max-width: 960px) {
  .tpl-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pts-grid, .build { grid-template-columns: minmax(0, 1fr); }
  .build-preview { position: static; }
}
@media (max-width: 640px) {
  .tpl-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpl-grid, .guide-cards { grid-template-columns: minmax(0, 1fr); }
  .build-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-hero { grid-template-columns: minmax(0, 1fr); }
  .guide-mascot { display: none; }
  .guide-toc { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .guide-toc a { flex: none; }
  .hbar { grid-template-columns: minmax(0, 7.5em) minmax(0, 1fr) 3.4em; }
  .ledger-mini-in { flex-direction: column; align-items: stretch; }
  .guide .cta-band .row { flex-wrap: wrap; }
}

/* v4.1 QA fixes */
.orow { gap: 10px; }
.orow-t { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.orow-s { flex-shrink: 0; white-space: nowrap; flex-wrap: nowrap; }
.orow-s .tag { white-space: nowrap; }
.hbar-n svg { flex: none; }
.ring-side small { font-size: 11.5px; }
.stale-note { font-size: 13px; }
@media (max-width: 640px) {
  .hbar { grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr) 3.2em; gap: 8px; }
  .org-role .row b, .tpl-name b { overflow-wrap: anywhere; }
}
.beta-box { margin-bottom: 16px; }
.beta-row { padding: 6px 0; border-top: 1px dashed var(--line); font-size: 13px; gap: 8px; }
.beta-row span { min-width: 0; overflow-wrap: anywhere; }
