/* 溪数坊平台 — 设计系统
   形态参考 BOSS 直聘（以人为中心的卡片流 + 顶部搜索），
   气质参考作品集站（大留白、精炼文字）。品牌色取「溪」的青。 */

:root {
  --brand: #0aa6a0;
  --brand-dark: #078a85;
  --brand-light: #e6f7f6;
  --ink: #1a1f24;
  --ink-2: #4a5560;
  --ink-3: #8794a1;
  --line: #e8ecf0;
  --bg: #ffffff;
  --bg-2: #f6f8fa;
  --warn: #f5a623;
  --danger: #e5484d;
  --ok: #14a44d;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --shadow-lg: 0 8px 32px rgba(16, 24, 40, .12);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
          'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }   /* 防止 iOS 横屏自动放大字号 */

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;                       /* 保险：任何意外超宽都不产生横向滚动条 */
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ── 顶部导航 ───────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 16px; height: 62px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; letter-spacing: -.2px; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #4dd0c8);
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800;
}
.nav-links { display: flex; gap: 2px; flex: 1; flex-wrap: nowrap; }
.nav-links a {
  padding: 7px 10px; border-radius: 8px; font-size: 14px; color: var(--ink-2);
  transition: .15s; white-space: nowrap;
}
.nav-links a:hover { background: var(--bg-2); color: var(--ink); }
.nav-links a.on { color: var(--brand); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.nav-burger {
  display: none; background: transparent; border: 0; font-size: 22px; cursor: pointer;
  color: var(--ink-2); padding: 4px 8px;
}
.nav-drawer { display: none; flex-direction: column; padding: 8px 20px 16px; border-top: 1px solid var(--line); }
.nav-drawer.open { display: flex; }
.nav-drawer a { padding: 11px 4px; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.nav-drawer a.on { color: var(--brand); font-weight: 600; }

/* ── 按钮 ───────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 9px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: .15s; white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn.ghost:hover { background: var(--bg-2); color: var(--ink); }
.btn.lg { padding: 13px 28px; font-size: 16px; border-radius: 10px; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.block { width: 100%; }

/* ── Hero ───────────────────────────────────── */
.hero {
  background: linear-gradient(165deg, #0b1f24 0%, #0e3a3a 55%, #0aa6a0 130%);
  color: #fff; padding: 76px 0 62px; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(900px 400px at 78% 15%, rgba(77, 208, 200, .22), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 { font-size: 42px; line-height: 1.25; letter-spacing: -.5px; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: #6ee7de; }
.hero p.sub { font-size: 17px; color: rgba(255, 255, 255, .78); max-width: 620px; margin-bottom: 30px; }

/* 首页搜索条（BOSS 式） */
.search-bar {
  display: flex; gap: 8px; background: #fff; padding: 8px; border-radius: 14px;
  box-shadow: var(--shadow-lg); max-width: 660px;
}
.search-bar input {
  flex: 1; border: 0; outline: 0; padding: 12px 14px; font-size: 15px; border-radius: 9px;
}
.search-bar input::placeholder { color: var(--ink-3); }

.hot { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hot span { font-size: 13px; color: rgba(255, 255, 255, .6); }
.hot a {
  font-size: 13px; padding: 4px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .14); transition: .15s;
}
.hot a:hover { background: rgba(255, 255, 255, .22); }

/* 数字条 */
.metrics { display: flex; gap: 44px; margin-top: 42px; flex-wrap: wrap; }
.metric b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.metric small { font-size: 13px; color: rgba(255, 255, 255, .6); }

/* ── 区块 ───────────────────────────────────── */
section.block { padding: 60px 0; }
section.block.alt { background: var(--bg-2); }
.head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; gap: 16px; }
.head h2 { font-size: 26px; letter-spacing: -.3px; }
.head p { color: var(--ink-3); font-size: 14px; margin-top: 4px; }
.head a.more { font-size: 14px; color: var(--brand); font-weight: 600; white-space: nowrap; }

/* ── 人才卡片（首页与简历库共用）───────────────── */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.pcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; transition: .18s; display: block;
}
.pcard:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.pcard-top { display: flex; gap: 13px; align-items: flex-start; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: 0 0 46px;
  background: linear-gradient(135deg, var(--brand), #4dd0c8);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px;
}
.pcard-id { flex: 1; min-width: 0; }
.pcard-id h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.pcard-id .role { color: var(--brand); font-size: 13px; font-weight: 600; }
.pcard-id .meta { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.pcard .bio {
  color: var(--ink-2); font-size: 14px; margin-top: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag {
  font-size: 12px; padding: 3px 9px; border-radius: 6px;
  background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line);
}
.tag.brand { background: var(--brand-light); color: var(--brand-dark); border-color: transparent; }

/* 简历完整度条 */
.comp { margin-top: 13px; }
.comp-bar { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.comp-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.comp small { font-size: 12px; color: var(--ink-3); display: block; margin-top: 5px; }

/* ── 通用卡片 ───────────────────────────────── */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}
.card.pad-lg { padding: 28px; }

/* 活动卡片 */
.ecard { display: flex; flex-direction: column; }
.ecard .cover {
  height: 118px; border-radius: 10px; margin-bottom: 14px;
  background: linear-gradient(135deg, #0e3a3a, var(--brand));
  display: grid; place-items: center; color: #fff; text-align: center;
}
.ecard .cover b { font-size: 20px; display: block; }
.ecard .cover small { opacity: .75; font-size: 12px; }

/* 状态徽标 */
.badge {
  font-size: 12px; padding: 3px 9px; border-radius: 999px; font-weight: 600;
  background: var(--bg-2); color: var(--ink-2);
}
.badge.open { background: #e7f7ee; color: var(--ok); }
.badge.done { background: var(--bg-2); color: var(--ink-3); }
.badge.soon { background: #fff4e5; color: #b8730a; }

/* ── 表单 ───────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field label .req { color: var(--danger); }
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px;
  outline: 0; transition: .15s; background: #fff; font-size: 15px;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light);
}
.textarea { min-height: 84px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 验证码行 */
.code-row { display: flex; gap: 8px; }
.code-row .input { flex: 1; }
.code-row .btn { flex: 0 0 auto; }

/* 图形验证码 */
.cap-row { display: flex; gap: 8px; align-items: stretch; }
.cap-row .cap-input { flex: 1; }
.cap-img {
  flex: 0 0 auto; width: 120px; height: 44px; border: 1px solid var(--line);
  border-radius: 9px; overflow: hidden; cursor: pointer; background: #f2f5f7;
  display: grid; place-items: center; font-size: 12px; color: var(--ink-3); user-select: none;
}
.cap-img svg { width: 100%; height: 100%; display: block; }

/* 提示条 */
.note {
  padding: 12px 14px; border-radius: 9px; font-size: 14px;
  background: var(--brand-light); color: var(--brand-dark); border: 1px solid #c9ecea;
}
.note.warn { background: #fff8ec; color: #8a5a00; border-color: #f5e0bb; }
.note.err { background: #fdecec; color: #a3282c; border-color: #f5c9ca; }

/* Toast */
#toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 9px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: .22s; z-index: 200;
  box-shadow: var(--shadow-lg); max-width: 88vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 页脚 ───────────────────────────────────── */
footer {
  background: #0b1f24; color: rgba(255, 255, 255, .62); padding: 44px 0 26px; margin-top: 60px;
  font-size: 14px;
}
footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 32px; margin-bottom: 30px; }
footer h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
footer a { display: block; padding: 3px 0; color: rgba(255, 255, 255, .62); }
footer a:hover { color: #6ee7de; }
footer .bot {
  border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 18px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: rgba(255, 255, 255, .4);
}
.brandline { color: rgba(255,255,255,.5); margin-top: 8px; line-height: 1.7; }

/* ── 扫码报名 CTA ───────────────────────────── */
.signup-cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.signup-cta-text { flex: 1; min-width: 260px; }
.signup-cta-btn { display: none; }          /* 桌面默认藏起按钮，主推扫码 */
.signup-cta-qr {
  flex: 0 0 auto; text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 8px;
}
.qr-img {
  width: 160px; height: 160px; border-radius: 12px; padding: 8px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.qr-cap { font-size: 13px; color: var(--ink-2); font-weight: 600; }

/* 手机上：自己扫不了自己屏幕，藏二维码、亮出按钮 */
@media (max-width: 720px) {
  .signup-cta-qr { display: none; }
  .signup-cta-btn { display: inline-flex; }
}

/* 频道 hero 里的扫码报名块（深色底）*/
.qr-entry { display: flex; align-items: center; gap: 18px; }
.qr-entry .qr-img { width: 128px; height: 128px; }
.qr-entry-side { display: flex; flex-direction: column; gap: 4px; }
.qr-entry-side b { font-size: 17px; }
.qr-entry-side span { font-size: 13px; opacity: .75; margin-bottom: 6px; }
.qr-entry-btn { display: none; align-self: flex-start; background: #fff; color: var(--brand-dark); }
.qr-entry.on-dark b { color: #fff; }
.qr-entry.on-dark span { color: rgba(255,255,255,.75); }
@media (max-width: 720px) {
  .qr-entry .qr-img { display: none; }        /* 手机藏码、亮按钮 */
  .qr-entry-btn { display: inline-flex; }
}

/* ── 空状态 / 骨架 ──────────────────────────── */
.empty { text-align: center; padding: 56px 20px; color: var(--ink-3); }
.empty b { display: block; color: var(--ink-2); font-size: 16px; margin-bottom: 6px; }
.skel { background: var(--bg-2); border-radius: 8px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .55 } }

/* ── 移动端 ─────────────────────────────────── */
/* 导航单独用更宽的断点：频道多，窄于 980 就收进汉堡菜单，避免挤成两行 */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-right { display: none; }
  .nav-burger { display: block; margin-left: auto; }
}

@media (max-width: 860px) {
  .hero { padding: 52px 0 44px; }
  .hero h1 { font-size: 30px; }
  .search-bar { flex-direction: column; }
  .search-bar .btn { width: 100%; }
  .metrics { gap: 26px; }
  .metric b { font-size: 24px; }
  .grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  footer .cols { grid-template-columns: 1fr 1fr; }
  .head { flex-direction: column; align-items: flex-start; }
}

/* 更窄的手机：收紧间距、放大点按目标、模态自适应 */
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  section.block { padding: 40px 0; }
  .card.pad-lg { padding: 20px; }
  .head h2 { font-size: 22px; }
  .hero h1 { font-size: 26px; }
  .hero p.sub { font-size: 15px; }
  /* 卡片里「文字 + 右侧按钮」的 CTA：按钮整行、够大好点 */
  .card .btn.lg { width: 100%; }
  footer .cols { grid-template-columns: 1fr; gap: 22px; }
  /* 弹层里的二维码不超出屏幕 */
  .qr-img { max-width: 60vw; height: auto; aspect-ratio: 1; }
}

/* 触屏滚动更顺滑（后台宽表、任意横向滚动容器）*/
.tbl-wrap, [style*="overflow-x"] { -webkit-overflow-scrolling: touch; }
