/* 公开岗位站。只有这一份样式；CSP 不许内联样式，所以别在 HTML / JS 里写 style=""
 *
 * 风格（ww 2026-09-23：「大厂专业风、实用主义、性能感、精炼」；同日定了配色：白底 / 深灰 + Telegram 蓝）：
 *   中性底色 + 一个主色，主色只落在咨询按钮、选中的方向、薪资、高薪上；
 *   跟着系统走深色 / 浅色：白天在户外看长段岗位描述，白底更好读；
 *   列表是一张表，电脑上一个岗位一行（岗位名 + 一句简介 / 方向 / 薪资），首屏能看到十来个；
 *   直角、细线、等宽数字；没有阴影、没有毛玻璃、没有悬停位移（低端手机上滚动也不掉帧）。
 *   字体只用系统字体：CSP 不许外链字体，也省掉一次下载。
 */
:root {
  /* 深色（系统开了深色模式）：深灰，不是纯黑——来的是求职者，不是来看格调的 */
  --bg: #16181c;
  --raise: #1f2227;          /* 悬停行、输入框底 */
  --ink: #f1f3f5;
  --ink-2: #dde1e6;          /* 长段正文：比标题软一点 */
  --muted: #9aa3ad;
  --faint: #6b737c;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .2);
  --scrim: rgba(0, 0, 0, .6);
  --warn: #ff6b61;           /* 只给防冒充提示用 */
  /* 主色是 Telegram 蓝：站上唯一的动作就是「去 Telegram 咨询」，按钮是它的颜色，一眼知道点了去哪。
     只用在能点的主动作、选中的方向、薪资、高薪上，别拿它装饰 */
  --accent: #2f9be4;
  --accent-ink: #fff;
  --accent-soft: rgba(47, 155, 228, .16);
  --pay: #5ab8f5;            /* 薪资：求职者扫列表先看的就是它 */
  --sun: block;              /* 深色时显示太阳（点了变浅色），浅色时显示月亮 */
  --moon: none;
  --r: 2px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Segoe UI",
          "Microsoft YaHei", "Noto Sans CJK SC", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
/* 浅色：系统是浅色且没手动选深色，或者手动选了浅色（顶栏的切换按钮，记在 localStorage） */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fff;
    --raise: #f3f5f7;
    --ink: #111418;
    --ink-2: #1f2328;
    --muted: #5b6470;
    --faint: #8b95a1;
    --line: rgba(16, 24, 40, .1);
    --line-strong: rgba(16, 24, 40, .22);
    --scrim: rgba(16, 24, 40, .45);
    --warn: #d93025;
    --accent: #2481cc;       /* 白底上白字按钮要够对比度，比 Telegram 图标的亮蓝深一档 */
    --accent-ink: #fff;
    --accent-soft: #e8f3fc;
    --pay: #1b6fb5;
    --sun: none;
    --moon: block;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #fff;
  --raise: #f3f5f7;
  --ink: #111418;
  --ink-2: #1f2328;
  --muted: #5b6470;
  --faint: #8b95a1;
  --line: rgba(16, 24, 40, .1);
  --line-strong: rgba(16, 24, 40, .22);
  --scrim: rgba(16, 24, 40, .45);
  --warn: #d93025;
  --accent: #2481cc;       /* 白底上白字按钮要够对比度，比 Telegram 图标的亮蓝深一档 */
  --accent-ink: #fff;
  --accent-soft: #e8f3fc;
  --pay: #1b6fb5;
  --sun: none;
  --moon: block;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.6 var(--sans); font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a[href=""] { display: none !important; }
[hidden] { display: none !important; }   /* 没配咨询号时按钮自动消失，不靠 JS */
button, input, select { font: inherit; color: inherit; }
.wrap { width: min(1200px, 100% - 32px); margin: 0 auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: var(--ink); color: var(--bg); }

/* ---- 顶栏 ---- */
.top { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in { height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.seal {
  flex: none; width: 24px; height: 24px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font: 800 10px/1 var(--sans); letter-spacing: -.02em;
}
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line-strong);
  background: transparent; font-weight: 600; font-size: 14px; letter-spacing: .02em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn svg { width: 15px; height: 15px; }
.top .btn { height: 32px; padding: 0 14px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r); background: none; color: var(--muted); cursor: pointer;
  transition: color .12s, border-color .12s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-btn svg { width: 16px; height: 16px; }
.i-sun { display: var(--sun); }
.i-moon { display: var(--moon); }

/* ---- 首屏：一条带子，不占半屏 ---- */
.hero { padding: 28px 0 22px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
h1 { margin: 0; font-weight: 700; font-size: 32px; line-height: 1.15; letter-spacing: -.01em; }
.lede { margin: 6px 0 0; max-width: 36em; color: var(--muted); font-size: 14px; }
.updated { margin: 2px 0 0; color: var(--faint); font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, auto); }
.stat { padding: 0 0 0 20px; margin-left: 20px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; margin-left: 0; }
.stat b { display: block; font-weight: 600; font-size: 22px; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---- 筛选 ---- */
.filters { position: sticky; top: 52px; z-index: 20; background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0 0; }
.filter-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.toggles { display: flex; gap: 8px; }
.seg { display: flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.seg button {
  height: 36px; padding: 0 14px; border: 0; border-left: 1px solid var(--line); background: none;
  color: var(--muted); font-size: 14px; white-space: nowrap; cursor: pointer; transition: color .1s, background-color .1s;
}
.seg button:first-child { border-left: 0; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed=true] { background: var(--accent-soft); color: var(--pay); font-weight: 600; }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.seg-sm button { height: 28px; padding: 0 10px; font-size: 13px; }
.field { position: relative; }
.field svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
input[type=search] {
  width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--raise); padding: 0 12px 0 36px; outline: none; appearance: none; -webkit-appearance: none;
  font-size: 14px;
}
input[type=search]::placeholder { color: var(--faint); }
input[type=search]:focus { border-color: var(--accent); }
input:focus-visible, .icon-btn:focus-visible, .btn:focus-visible, .chip:focus-visible, .close:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 2px;
}
.card:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
/* 方向：一排标签页，选中的下面一道线 */
.chips { display: flex; gap: 22px; margin-top: 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0; border: 0; border-bottom: 2px solid transparent;
  background: none; color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer;
}
.chip:hover { color: var(--ink); }
.chip i { font-style: normal; color: var(--faint); margin-left: 5px; font-size: 12px; }
.chip[aria-pressed=true] { color: var(--ink); border-bottom-color: var(--accent); }
.chip[aria-pressed=true] i { color: var(--muted); }

/* ---- 列表：一张表，一个岗位一行 ---- */
.main { padding: 0 0 64px; }
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.result-bar strong { color: var(--ink); font-weight: 600; }
.link-btn { border: 0; background: none; padding: 0; color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.jobs-head, .card {
  display: grid; column-gap: 20px; align-items: center;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 240px) 116px;
}
.jobs-head { padding: 0 12px 8px; border-bottom: 1px solid var(--line-strong); color: var(--faint); font-size: 12px; }
.jobs-head span:last-child { text-align: right; }
.jobs { display: block; }
.card {
  padding: 11px 12px; border-bottom: 1px solid var(--line);
  text-decoration: none; cursor: pointer; transition: background-color .1s;
}
.card:hover { background: var(--raise); }
.card:visited h2 { color: var(--muted); }   /* 看过的岗位变淡：翻四百多个时知道哪些点开过 */
.card { content-visibility: auto; contain-intrinsic-size: auto 46px; }   /* 屏幕外的行先不排版，滚到了再算 */
.card .code { color: var(--faint); font-size: 12px; }
.card .body { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.card h2 {
  flex: none; max-width: 58%; margin: 0; font-weight: 600; font-size: 15px; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card .summary {
  flex: 1 1 auto; min-width: 0; color: var(--muted); font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card .pills { flex-wrap: nowrap; overflow: hidden; }
.card .pay { color: var(--pay); font-weight: 600; font-size: 15px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { flex: none; padding: 0 6px; border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); font-size: 12px; line-height: 20px; white-space: nowrap; }
.pill.loc { color: var(--ink); border-color: var(--line-strong); max-width: 12em; overflow: hidden; text-overflow: ellipsis; }
.pill.hot { background: var(--accent-soft); border-color: transparent; color: var(--pay); font-weight: 600; }
mark { background: var(--accent-soft); color: var(--ink); padding: 0 1px; }
.more-row { display: flex; justify-content: center; margin-top: 24px; }
.empty, .loading { padding: 64px 16px; text-align: center; color: var(--muted); border-bottom: 1px solid var(--line); }
.empty a { color: var(--ink); }

/* ---- 详情（弹窗 + 独立页共用） ---- */
dialog {
  width: min(760px, 100% - 24px); max-height: min(88vh, 900px); padding: 0;
  border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); color: var(--ink);
}
dialog::backdrop { background: var(--scrim); }
dialog[open] { display: flex; flex-direction: column; animation: open .14s ease-out; }
@keyframes open { from { opacity: 0; transform: translateY(8px); } }
.detail-head { padding: 22px 24px 18px; border-bottom: 1px solid var(--line); position: relative; }
.detail-head .card-top { display: flex; gap: 16px; color: var(--faint); font-size: 12px; }
.detail-head h2, .detail-head h1 { margin: 8px 44px 10px 0; font-weight: 700; font-size: clamp(22px, 3.4vw, 30px); line-height: 1.25; letter-spacing: -.01em; }
dialog .detail-head .card-top { padding-right: 44px; }
.detail-head .salary { color: var(--pay); font-weight: 600; font-size: 20px; }
.pay-note { margin: 2px 0 0; color: var(--faint); font-size: 12px; }
[tabindex="-1"]:focus { outline: none; }
.detail-head .pills { margin-top: 12px; }
.close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: var(--r);
  border: 1px solid var(--line); background: none; font-size: 20px; line-height: 1; cursor: pointer;
}
.close:hover { border-color: var(--ink); }
.detail-body { padding: 20px 24px; overflow-y: auto; }
.industry { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.jd { white-space: pre-line; margin: 0; font-size: 15px; line-height: 1.85; max-width: 40em; color: var(--ink-2); }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--bg); }
.detail-actions .btn { height: 42px; }
.detail-actions .btn-primary { flex: 1 1 220px; }
.hint { margin: 0; padding: 0 24px 18px; color: var(--faint); font-size: 12px; }

.page-job .main { padding-top: 24px; }
.back { display: inline-block; margin-bottom: 16px; color: var(--muted); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--ink); }
.job-sheet { max-width: 820px; border: 1px solid var(--line); border-radius: var(--r); }
.job-sheet .detail-actions { position: sticky; bottom: 0; }

/* ---- 页脚 ---- */
.footer { border-top: 1px solid var(--line); padding: 32px 0 44px; color: var(--muted); font-size: 13px; }
.promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 28px; }
.promise b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.official { display: flex; flex-wrap: wrap; gap: 6px 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--faint); }
.official strong { color: var(--muted); font-weight: 500; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: var(--r); background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600;
  transition: opacity .15s, transform .15s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.clone-warning { display: none; position: fixed; inset: 0; z-index: 100; background: var(--scrim); place-items: center; padding: 16px; }
.clone-warning.show { display: grid; }
.clone-box { max-width: 440px; padding: 26px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--warn); }
.clone-box h2 { margin: 0 0 8px; color: var(--warn); font-weight: 700; font-size: 22px; }
.clone-box p { margin: 0 0 16px; color: var(--muted); }

/* ---- 窄屏 ---- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 16px; }
  .jobs-head, .card { grid-template-columns: 60px minmax(0, 1fr) minmax(0, 160px) 104px; column-gap: 14px; }
  .card .body { display: block; }
  .card h2 { max-width: none; }
  .card .summary { display: block; }
}
@media (max-width: 680px) {
  body { font-size: 14.5px; }
  .hero { padding: 16px 0 14px; }
  h1 { font-size: 24px; }
  .lede { margin-top: 2px; font-size: 13px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat { padding-left: 10px; margin-left: 0; }
  .stat b { font-size: 18px; }
  .stat span { font-size: 11px; }
  .filters { position: static; padding-top: 10px; }   /* 手机上顶栏+筛选一起吸顶会吃掉四分之一屏 */
  .filter-row { grid-template-columns: 1fr; gap: 8px; }
  .toggles { gap: 6px; }
  .seg { flex: 1 1 auto; }
  .seg button { flex: 1 1 0; height: 34px; padding: 0 6px; font-size: 13px; }
  .seg[data-key="high"] { flex: none; }
  .seg-sm { flex: none; }
  .seg-sm button { flex: none; height: 28px; padding: 0 9px; font-size: 12.5px; }
  .chips { gap: 18px; margin-top: 2px; }
  .jobs-head { display: none; }
  /* 一行：岗位名 | 薪资 / 一句简介 / 编号 + 标签 */
  .card {
    grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; row-gap: 3px;
    grid-template-areas: "title title pay" "summ summ summ" "code pills pills"; align-items: baseline; padding: 11px 0;
  }
  .card:hover { background: none; }
  .card { contain-intrinsic-size: auto 88px; }
  .card .body { display: contents; }   /* 简介单独占满一行，不和薪资挤 */
  .card h2 { grid-area: title; }
  .card .summary { grid-area: summ; }
  .card .pay { grid-area: pay; max-width: 9em; }
  .card .code { grid-area: code; font-size: 11px; }
  .card .pills { grid-area: pills; gap: 4px; }
  .card .pill { font-size: 11px; line-height: 18px; padding: 0 5px; }
  .card h2 { font-size: 15px; }
  .card .summary { font-size: 12.5px; }
  .promises { grid-template-columns: 1fr; gap: 14px; }
  .top .btn span { display: none; }
  .top .btn { width: 34px; padding: 0; }
  dialog { width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; border-width: 1px 0 0; }
  .detail-head, .detail-body, .detail-actions { padding-left: 16px; padding-right: 16px; }
  .detail-actions .btn { flex: 1 1 0; padding: 0 10px; }
  .detail-actions .btn-primary { flex: 1 1 100%; height: 46px; font-size: 15px; }
  .hint { padding: 0 16px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
