/* ============================================================
   智觅 · 设计系统基础层
   令牌 / 导航 / 首页 / 对话 / 页脚
   ============================================================ */
:root {
  /* 色彩 */
  --ink: #1b2b4d;
  --ink-soft: #3a4763;
  --muted: #76839b;
  --faint: #9aa5ba;
  --line: #e6ebf5;
  --line-soft: #eef2f9;
  --blue: #3c5bf0;
  --blue-deep: #2f4bd8;
  --blue-soft: #eef2ff;
  --blue-ghost: #f5f8ff;
  --bg: #f5f7fc;
  --card: #ffffff;
  --danger: #b04a5e;
  --ok: #2f7d52;

  /* 形状与层次 */
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(27, 43, 77, 0.04), 0 10px 34px rgba(27, 43, 77, 0.06);
  --shadow-lift: 0 2px 6px rgba(27, 43, 77, 0.05), 0 16px 44px rgba(27, 43, 77, 0.1);
  --shadow-pop: 0 16px 48px rgba(27, 43, 77, 0.16);
  --ring: 0 0 0 3px rgba(60, 91, 240, 0.14);

  /* 动效 */
  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
  --fast: 0.16s var(--ease);
  --med: 0.26s var(--ease);

  /* 字体 */
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(148, 172, 218, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 172, 218, 0.16) 1px, transparent 1px),
    radial-gradient(900px 420px at 50% -10%, rgba(188, 210, 252, 0.75), transparent 64%),
    radial-gradient(560px 300px at 80% 6%, rgba(205, 222, 255, 0.55), transparent 72%);
  background-size: 52px 52px, 52px 52px, auto, auto;
}
::selection { background: rgba(60, 91, 240, 0.16); }
button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---------- 顶部导航 ---------- */
.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--ink);
  transition: color var(--fast);
}
.logo::before {
  content: "";
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: url("/assets/brand/logo-icon.svg") center / contain no-repeat;
  flex: none;
}
.logo:hover { color: var(--blue); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.nav-link {
  position: relative;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  color: #5b6884;
  font-size: 14px;
  transition: color var(--fast), background var(--fast);
}
.nav-link:hover {
  color: var(--blue);
  background: rgba(60, 91, 240, 0.07);
}
.nav-link[aria-current="page"] {
  color: var(--blue);
  font-weight: 500;
  background: var(--blue-soft);
}
.nav-login {
  display: inline-flex;
  align-items: center;
  height: 34px;
  margin-left: 10px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid #d8e0f2;
  background: #fff;
  color: #3a4a70;
  font-size: 13px;
  box-shadow: 0 1px 3px rgba(27, 43, 77, 0.05);
  transition: border-color var(--fast), color var(--fast), box-shadow var(--fast), transform var(--fast);
}
.nav-login:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: var(--ring);
  transform: translateY(-1px);
}

/* ---------- 首页舞台 ---------- */
.stage {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px 20px 56px;
}
.hero { text-align: center; margin-bottom: 34px; }
.notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 7px 16px;
  border: 1px solid rgba(60, 91, 240, 0.16);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  color: #61708f;
  font-size: 13px;
  letter-spacing: 0.06em;
  box-shadow: 0 2px 10px rgba(27, 43, 77, 0.05);
}
.notice::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(60, 91, 240, 0.18);
}
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 50px;
  letter-spacing: 0.18em;
  text-indent: 0.18em; /* 视觉居中对齐字距 */
  color: var(--ink);
  background: linear-gradient(120deg, #1b2b4d 30%, #3c5bf0 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  margin: 18px 0 0;
  color: #6c7a99;
  font-size: 15px;
  letter-spacing: 0.14em;
}

/* ---------- 提问框 ---------- */
.composer {
  width: min(720px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 14px 14px 10px;
  transition: border-color var(--fast), box-shadow var(--fast);
}
.composer:focus-within {
  border-color: rgba(60, 91, 240, 0.45);
  box-shadow: var(--shadow-lift), var(--ring);
}
.composer textarea {
  width: 100%;
  border: 0;
  resize: none;
  outline: none;
  min-height: 56px;
  max-height: 160px;
  padding: 6px 8px 0;
  background: transparent;
  font-size: 16px;
  line-height: 1.65;
}
.composer textarea::placeholder { color: #aab3c6; }
.composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.modes { display: flex; gap: 8px; flex-wrap: wrap; }
.mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: #fff;
  color: #54617e;
  font-size: 13px;
  transition: color var(--fast), border-color var(--fast), background var(--fast);
}
.mode:hover { border-color: #c9d5f3; color: var(--blue); }
.mode.is-on {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: #d3ddfd;
}
.send {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a6cf7 0%, var(--blue-deep) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 4px 14px rgba(60, 91, 240, 0.35);
  transition: transform var(--fast), box-shadow var(--fast), opacity var(--fast), filter var(--fast);
}
.send:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.send:not(:disabled):hover {
  transform: translateY(-1.5px);
  box-shadow: 0 7px 20px rgba(60, 91, 240, 0.42);
  filter: brightness(1.04);
}
.send:not(:disabled):active { transform: translateY(0); }

/* ---------- 快捷建议 ---------- */
.suggestions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
}
.suggestions button {
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid #e2e8f4;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(4px);
  color: #55627e;
  font-size: 13px;
  transition: all var(--fast);
}
.suggestions button:hover {
  border-color: #c3d0f5;
  color: var(--blue);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(27, 43, 77, 0.08);
}
.suggestions button.is-on {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}

.chat-title {
  display: none;
  position: absolute;
  left: 88px;
  max-width: min(420px, 46vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: #3c465c;
}
.disclaimer { display: none; }

/* ---------- 对话模式 ---------- */
body.is-chat {
  overflow: hidden;
  background: #fbfbfc;
  background-image: none;
}
body.is-chat .hero,
body.is-chat .suggestions { display: none; }
body.is-chat .logo { font-size: 15px; letter-spacing: 0.06em; color: var(--faint); }
body.is-chat .logo::before { width: 20px; height: 20px; border-radius: 6px; }
body.is-chat .logo:hover { color: var(--blue); }
body.is-chat .chat-title {
  display: block;
  position: static;
  flex: 1;
  min-width: 0;
  margin-left: 18px;
  max-width: none;
  color: var(--muted);
}
body.is-chat .stage {
  height: 100vh;
  min-height: 0;
  justify-content: flex-end;
  padding: 76px 20px 40px;
  overflow: hidden;
}
body.is-chat .composer {
  width: min(760px, 100%);
  border-color: #eceff4;
  border-radius: 24px;
  box-shadow: 0 8px 28px rgba(28, 43, 74, 0.06);
}
body.is-chat .disclaimer {
  display: block;
  width: min(760px, 100%);
  margin: 8px 0 0;
  text-align: center;
  color: var(--faint);
  font-size: 12px;
}
.thread {
  width: min(760px, 100%);
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: #d3dae8 transparent;
}
.thread::-webkit-scrollbar { width: 6px; }
.thread::-webkit-scrollbar-thumb { background: #d3dae8; border-radius: 3px; }
.thread::-webkit-scrollbar-thumb:hover { background: #b9c3d8; }
.turn { margin: 0 auto 28px; max-width: 760px; }
.user-pill {
  width: fit-content;
  max-width: min(640px, 92%);
  margin: 8px auto 26px;
  padding: 11px 19px;
  border-radius: 18px;
  background: #eef3fb;
  color: #2c3444;
  line-height: 1.65;
  text-align: left;
}
.think-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #6b7385;
  padding: 0;
  font-size: 13.5px;
  transition: color var(--fast);
}
.think-bar:hover { color: var(--blue); }
.think-bar .chev { transition: transform 0.18s var(--ease); transform: rotate(-90deg); }
.think-bar.is-open .chev { transform: none; }
.think-body {
  margin: 12px 0 16px;
  padding-left: 14px;
  border-left: 2px solid var(--line-soft);
  color: #4c5568;
  font-size: 14px;
  line-height: 1.75;
}
.think-body p { margin: 0 0 8px; }
.think-body ul { margin: 0; padding-left: 1.2em; }
.answer p {
  margin: 0 0 12px;
  color: #1e2430;
  font-size: 15.5px;
  line-height: 1.85;
}
.answer ul, .answer ol {
  margin: 0 0 14px;
  padding-left: 1.25em;
  color: #1e2430;
  line-height: 1.8;
}
.answer li { margin: 4px 0; }
.answer a { color: var(--blue); }
.answer a:hover { text-decoration: underline; }
.refs { margin-top: 10px; }
.refs a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-top: 1px solid #eef0f3;
  color: #31456f;
  font-size: 14px;
  line-height: 1.5;
  transition: background var(--fast), color var(--fast);
}
.refs a:first-child { border-top: 0; }
.refs a:hover { background: var(--blue-ghost); color: var(--blue); }
.refs a span { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.pending { color: var(--faint); font-size: 14px; }

/* ---------- 页脚 ---------- */
.home-foot {
  position: relative;
  z-index: 1;
  padding: 60px 0 26px;
  background: linear-gradient(180deg, #f7f9fc 0%, #f2f5fb 100%);
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
}
.home-foot-main {
  width: min(1080px, calc(100% - 64px));
  margin: 0 auto 30px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}
.home-brand-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color var(--fast);
}
.home-brand-name:hover { color: var(--blue-deep); }
.home-icp {
  display: block;
  margin-top: 14px;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.6;
  transition: color var(--fast);
}
.home-icp:hover { color: var(--blue); }
.home-icons {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 12px;
}
.home-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(27, 43, 77, 0.66);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  cursor: pointer;
  transition: color var(--fast), background var(--fast);
}
.home-icon svg { display: block; }
.home-icon:hover { color: var(--blue); background: var(--blue-soft); }
.home-icon-qq { font-family: Arial, "Noto Sans SC", sans-serif; }
.home-icon.copy-mail,
.home-icon.copy-mail:hover,
.home-icon.copy-mail:focus,
.home-icon.copy-mail:active { color: rgba(27, 43, 77, 0.66); gap: 0; }
.home-icon.copy-mail:hover { color: var(--blue); background: var(--blue-soft); }
.home-icon.copy-mail { position: relative; }
.home-icon .copy-mail-tip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 6;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #31456f;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: var(--shadow-pop);
  transform: translateX(-50%);
}
.home-icon.copy-mail:hover .copy-mail-tip,
.home-icon.copy-mail.is-copied .copy-mail-tip { display: block; }
.home-foot .scan-pop {
  left: 0;
  transform: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.home-foot .scan-pop .copy-mail { font-size: 13px; }
.home-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 24px 32px;
}
.home-cols h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.home-cols a,
.home-cols span {
  display: block;
  margin: 0 0 12px;
  color: #5c6578;
  font-size: 14px;
  line-height: 1.5;
}
.home-cols a { transition: color var(--fast); }
.home-cols a:hover { color: var(--blue); }
body.is-chat .home-foot { display: none; }

@media (max-width: 640px) {
  .hero h1 { font-size: 34px; letter-spacing: 0.1em; text-indent: 0.1em; }
  .nav { padding: 0 16px; }
  .nav-link { padding: 7px 8px; }
  .home-foot-main { width: calc(100% - 32px); grid-template-columns: 1fr; gap: 28px; }
  .home-cols { grid-template-columns: 1fr 1fr; }
}
