/* ============================================================================
 * 玖伴 · 样式系统
 * ----------------------------------------------------------------------------
 * 一个文件管全站。改配色只改最上面的变量，其余全部跟着变。
 * 风格取向：深海军蓝（专业、可信）+ 暖金（有温度，不像冷冰冰的工具）。
 * 落地页用深色 hero（直播间投屏有冲击力），功能区用浅色（长时间看不累）。
 * ========================================================================== */

:root {
  /* 主色阶 */
  --navy-900: #061525;
  --navy-800: #0b2137;
  --navy-700: #123049;
  --navy-600: #1b4160;
  --navy-500: #275877;
  --navy-300: #6b93ae;
  --navy-100: #dbe6ef;

  /* 强调色 */
  --gold: #d8a13a;
  --gold-soft: #f0d79a;
  --gold-bg: #fdf6e7;

  /* 语义色 */
  --ok: #1f9d6b;
  --warn: #d97706;
  --danger: #d64545;

  /* 中性 */
  --ink: #16212c;
  --ink-2: #4a5b6b;
  --ink-3: #8496a5;
  --line: #e4eaf0;
  --bg: #f5f7fa;
  --card: #ffffff;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(11, 33, 55, .05), 0 8px 24px rgba(11, 33, 55, .07);
  --shadow-lg: 0 12px 40px rgba(11, 33, 55, .16);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

a { color: var(--navy-600); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; }
p { margin: 0 0 12px; }

.hidden { display: none !important; }
.spacer { flex: 1 1 auto; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 页面容器 */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
.wrap--narrow { max-width: 760px; }

/* -------------------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar .spacer { flex: 1; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .5px;
  color: var(--navy-800);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-500));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.brand-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--gold);
  text-transform: uppercase;
}

.navlink {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}
.navlink:hover { background: var(--bg); text-decoration: none; color: var(--navy-700); }
.navlink.is-on { background: var(--navy-800); color: #fff; }

/* ------------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--navy-800);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .08s, box-shadow .15s, background .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--navy-700); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--gold { background: var(--gold); color: #3a2a06; }
.btn--gold:hover { background: #c8902c; }
.btn--ghost { background: #fff; color: var(--navy-700); border-color: var(--line); }
.btn--ghost:hover { background: var(--bg); }
.btn--danger { background: #fff; color: var(--danger); border-color: #f0cfcf; }
.btn--danger:hover { background: #fdf3f3; }
.btn--sm { padding: 6px 13px; font-size: 13px; border-radius: 8px; }
.btn--lg { padding: 14px 30px; font-size: 17px; border-radius: 12px; }
.btn--block { width: 100%; }

.linkbtn {
  background: none; border: 0; padding: 0;
  color: var(--navy-600); font: inherit; font-size: 14px;
  cursor: pointer; text-decoration: underline;
}

/* ------------------------------------------------------------------- 卡片 */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 22px; }
.card-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-head h3 { font-size: 16px; }
.card-title { font-size: 15px; font-weight: 700; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------- 表单 */
.field { margin-bottom: 16px; }
.field > label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; }

.input, .textarea, .select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--navy-500);
  box-shadow: 0 0 0 3px rgba(39, 88, 119, .12);
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.textarea--tall { min-height: 140px; }

.err {
  margin: 10px 0 0;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  background: #fdf3f3;
  border: 1px solid #f0cfcf;
  color: var(--danger);
  font-size: 13.5px;
}
.ok-note {
  margin: 10px 0 0;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  background: #f1faf6;
  border: 1px solid #cfeade;
  color: var(--ok);
  font-size: 13.5px;
}

/* --------------------------------------------------------------- 落地页 */
.hero {
  background:
    radial-gradient(900px 420px at 78% -10%, rgba(216, 161, 58, .20), transparent 62%),
    linear-gradient(160deg, var(--navy-900), var(--navy-700) 62%, var(--navy-600));
  color: #fff;
  padding: 72px 0 84px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(600px 300px at 20% 20%, #000, transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(216, 161, 58, .14);
  border: 1px solid rgba(216, 161, 58, .34);
  color: var(--gold-soft);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .5px;
}
.hero h1 {
  font-size: clamp(28px, 4.6vw, 46px);
  margin: 20px 0 16px;
  letter-spacing: -.5px;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold-soft);
}
.hero-lead {
  font-size: clamp(15px, 1.7vw, 18px);
  color: #c5d5e2;
  max-width: 620px;
  margin-bottom: 30px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.hero-split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 900px) { .hero-split { grid-template-columns: 1fr; gap: 30px; } }

/* 落地页右侧：一句话进 → 成品出的演示卡 */
.demo-flow {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(6px);
}
.demo-line {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(255,255,255,.07);
  margin-bottom: 9px;
  font-size: 13.5px;
}
.demo-line .who {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(216,161,58,.22);
  color: var(--gold-soft);
  font-size: 13px; font-weight: 800;
}
.demo-line .txt { color: #dce7ef; }
.demo-line.is-done .who { background: rgba(31,157,107,.26); color: #9be3c5; }
.demo-arrow { text-align: center; color: var(--gold-soft); font-size: 18px; margin: 4px 0; }

/* ----------------------------------------------------------------- 区块 */
.section { padding: 56px 0; }
.section--tight { padding: 40px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 34px; }
.section-head h2 { font-size: clamp(21px, 2.6vw, 29px); margin-bottom: 11px; }
.section-head p { color: var(--ink-2); font-size: 15.5px; }

.feature {
  padding: 20px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}
.feature h4 { font-size: 15.5px; margin-bottom: 7px; }
.feature p { font-size: 13.5px; color: var(--ink-2); margin: 0; }
.feature .ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--gold-bg); color: var(--gold);
  font-size: 17px; font-weight: 800; margin-bottom: 12px;
}

/* --------------------------------------------------------- 九人编制一览 */
.roster { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 11px; }
@media (max-width: 900px) { .roster { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 600px) { .roster { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.roster-item {
  padding: 14px 12px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--line);
  text-align: center;
}
.roster-item .ava {
  width: 40px; height: 40px; margin: 0 auto 9px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-500));
  color: #fff; font-size: 17px; font-weight: 800;
}
.roster-item .nm { font-size: 13.5px; font-weight: 700; }
.roster-item .tg { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/* ------------------------------------------------------------- 工位/流水线 */
.station {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 12px;
  overflow: hidden;
}
.station-head {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  cursor: pointer;
  user-select: none;
}
.station-head:hover { background: #fafbfd; }
.station .ava {
  flex: none;
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--navy-100); color: var(--navy-600);
  font-size: 15px; font-weight: 800;
  transition: background .2s, color .2s;
}
.station-meta { flex: 1; min-width: 0; }
.station-name { font-size: 14.5px; font-weight: 700; }
.station-sub { font-size: 12px; color: var(--ink-3); }
.station-act { flex: none; }
.station-body {
  padding: 4px 16px 18px 62px;
  border-top: 1px solid var(--line);
}
@media (max-width: 600px) { .station-body { padding-left: 16px; } }

.station.is-wait .ava { background: #f1f4f7; color: var(--ink-3); }
.station.is-wait .station-sub::after { content: "排队中"; }
.station.is-run { border-color: var(--navy-300); box-shadow: 0 0 0 3px rgba(39,88,119,.08); }
.station.is-run .ava { background: var(--navy-700); color: #fff; }
.station.is-done .ava { background: #e6f6ef; color: var(--ok); }
.station.is-fail { border-color: #f0cfcf; }
.station.is-fail .ava { background: #fdf3f3; color: var(--danger); }

.dot-run {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--navy-500); margin-right: 6px;
  animation: pulse 1s infinite;
}
@keyframes pulse { 0%,100% { opacity: .25; } 50% { opacity: 1; } }

/* ------------------------------------------------------ 产出文本（Markdown） */
.md { font-size: 14.5px; color: var(--ink); }
.md h2 {
  font-size: 16px; margin: 18px 0 9px;
  padding-left: 10px;
  border-left: 3px solid var(--gold);
}
.md h2:first-child { margin-top: 6px; }
.md h3 { font-size: 14.5px; margin: 15px 0 6px; color: var(--navy-700); }
.md p { margin: 0 0 9px; }
.md ul { margin: 0 0 10px; padding-left: 20px; }
.md li { margin-bottom: 5px; }
.md strong { color: var(--navy-800); font-weight: 700; }
.md blockquote {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-left: 3px solid var(--navy-100);
  background: #fafbfd;
  border-radius: 0 8px 8px 0;
  color: var(--ink-2);
  white-space: pre-wrap;
}
.md hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.md code {
  background: var(--bg); border-radius: 4px;
  padding: 1px 5px; font-size: 13px;
}
.stream-caret {
  display: inline-block;
  width: 7px; height: 15px;
  background: var(--navy-500);
  vertical-align: -2px;
  animation: blink .9s steps(2) infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ------------------------------------------------------------------ 列表项 */
.row-item {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.row-item:last-child { border-bottom: 0; }
.row-item:hover { background: #fafbfd; }
.row-item .go {
  flex: none; color: var(--ink-3); font-size: 18px;
  transition: transform .15s;
}
.row-item:hover .go { transform: translateX(3px); color: var(--navy-600); }

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--bg);
  color: var(--ink-2);
}
.pill--ok { background: #e6f6ef; color: var(--ok); }
.pill--run { background: #eaf2f8; color: var(--navy-600); }
.pill--fail { background: #fdf3f3; color: var(--danger); }
.pill--gold { background: var(--gold-bg); color: #97701c; }

.empty {
  text-align: center;
  padding: 54px 24px;
  color: var(--ink-3);
}
.empty .big { font-size: 34px; margin-bottom: 12px; opacity: .5; }
.empty h3 { font-size: 16px; color: var(--ink-2); margin-bottom: 7px; }

/* -------------------------------------------------------------------- 弹层 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 14px);
  background: var(--navy-900);
  color: #fff;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 90;
  max-width: 88vw;
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- 生成中遮罩 */
.progress-line {
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 10px;
}
.progress-line > i {
  display: block; height: 100%; width: 30%;
  background: linear-gradient(90deg, var(--navy-500), var(--gold));
  border-radius: 2px;
  animation: slide 1.4s ease-in-out infinite;
}
@keyframes slide {
  0% { margin-left: -32%; }
  100% { margin-left: 102%; }
}

/* ---------------------------------------------------------------- 底部 */
.footer {
  padding: 34px 0 44px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12.5px;
}
.footer .sep { margin: 0 8px; opacity: .5; }
