/* ============================================================
   岗位索引 POSITIONS INDEX
   Design language: "Index" — editorial archive typography
   Tokens / Layout / Components
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* Surface — warm paper, never pure white as base */
  --paper:        #EFECE4;
  --paper-deep:   #E4DFD4;
  --page:         #FBFAF7;
  --surface:      #FFFFFF;
  --surface-sunk: #EFECE5;

  /* Ink — near-black, never #000 */
  --ink:    #15171A;
  --ink-2:  #4B5055;
  --ink-3:  #8A8E90;
  --ink-4:  #B4B7B8;

  /* Line — the primary structural device */
  --line:        #DED9CE;
  --line-strong: #C6C0B2;

  /* Accent — pine. Only for action & selection */
  --accent:      #2C4A3E;
  --accent-2:    #3E6656;
  --accent-soft: #E3EAE5;

  /* Signal — ochre. Only for urgency */
  --warn:      #A3402A;
  --warn-soft: #F3E2DC;

  /* Classify — 企业性质色标
     同一明度、低彩度的"墨色"，只做分类标识（图例），不用于装饰。
     5px 的点 & 10.5px 的标签是它唯一的使用场景。 */
  --n-gy: #2C4A3E;  /* 央国企 —— 松绿 */
  --n-yh: #8A6A2F;  /* 银行 —— 黄铜 */
  --n-sy: #46587A;  /* 事业单位 —— 靛 */
  --n-wz: #2E6570;  /* 外资 / 合资 —— 青 */
  --n-gf: #6B4A63;  /* 股份制 / 集体 —— 梅紫 */
  --n-my: #9C4A2C;  /* 民营 —— 赭 */
  --n-qt: #9A9D9C;  /* 其他 —— 灰 */
  --geo:  #5D7E93;  /* 地理坐标 —— 蓝灰 */

  /* Type */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI",
          "Microsoft YaHei", sans-serif;
  --num: "Inter", "SF Pro Text", "Segoe UI", ui-sans-serif, system-ui;

  /* Geometry — nearly squared */
  --r: 2px;
  --r-lg: 3px;

  /* 页头高度：文档页要把页头钉在顶部，目录、锚点都按它让位。
     手机端页头折成两行（品牌 50 + 导航 38 + 1 线），在断点里改 89px */
  --mast-h: 62px;

  /* Rhythm */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;

  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper-deep);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, dl, dd, dt, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
svg { display: block; }
::selection { background: var(--accent); color: #fff; }

/* Scrollbar — hairline, unobtrusive */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover { background: #A9A296; background-clip: content-box; }

/* ---------- 3. Utilities ---------- */
.num { font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.micro {
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.hr { height: 1px; background: var(--line); border: 0; }

/* Mobile-only affordances — hidden until the container proves narrow */
.filter-fab, .sheet-grip, .sheet-apply { display: none; }

/* Toast */
.toast {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: var(--paper);
  font-size: 12.5px;
  letter-spacing: .03em;
  padding: 10px 18px;
  border-radius: var(--r);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 60;
  max-width: 82%;
  text-align: center;
  line-height: 1.5;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   4. DECK — the design-spec shell (not part of the product UI)
   ============================================================ */
.deck { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

.deck-bar {
  flex: none;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  z-index: 30;
}
.deck-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.deck-name em {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: .14em;
  color: var(--ink-3);
  font-weight: 500;
  border-left: 1px solid var(--line-strong);
  padding-left: 10px;
}
.deck-switch { display: flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.deck-switch button {
  font-size: 12px;
  letter-spacing: .06em;
  padding: 6px 14px;
  color: var(--ink-3);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.deck-switch button + button { border-left: 1px solid var(--line-strong); }
.deck-switch button.on { background: var(--ink); color: var(--paper); }
.deck-link {
  margin-left: auto;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.deck-link:hover { color: var(--accent); border-color: var(--accent); }

.deck-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 28px;
  overflow: auto;
  background-color: var(--paper-deep);
  background-image: radial-gradient(circle at 1px 1px, rgba(21,23,26,.09) 1px, transparent 0);
  background-size: 16px 16px;
}

.device {
  width: 100%;
  max-width: 1400px;
  height: calc(100vh - 56px - 56px);
  min-height: 620px;
  background: var(--paper);
  outline: 1px solid var(--line-strong);
  position: relative;
  transition: width .3s var(--ease), height .3s var(--ease), border-radius .3s var(--ease);
}
.device.mobile {
  width: 390px;
  max-width: 390px;
  height: 844px;
  min-height: 0;
  outline: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: 0 30px 70px -32px rgba(21,23,26,.34), 0 2px 6px rgba(21,23,26,.05);
  overflow: hidden;
}

/* ============================================================
   5. APP FRAME — query container
   ============================================================ */
.app-frame {
  container-type: inline-size;
  container-name: app;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  overflow: clip;
  position: relative;
  font-size: 14.5px;
}

/* ---------- 5.1 Masthead ---------- */
.masthead {
  flex: none;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  z-index: 10;
}
.brand {
  flex: none;
  user-select: none;
  border-right: 1px solid var(--line);
  padding-right: 22px;
}
.brand-cn {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .2em;
  line-height: 1.15;
  margin-left: -2px;
}
.brand-en {
  font-size: 8.5px;
  letter-spacing: .3em;
  color: var(--ink-3);
  font-weight: 500;
  line-height: 1;
  margin-top: 3px;
  font-family: var(--num);
}

.nav { display: flex; align-items: stretch; height: 62px; gap: 22px; padding-left: 24px; }
.nav a {
  display: flex;
  align-items: center;
  font-size: 13.5px;
  color: var(--ink-3);
  border-bottom: 1.5px solid transparent;
  margin-bottom: -1px;
  transition: color .16s var(--ease), border-color .16s var(--ease);
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 500; }

.masthead-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.sync {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .01em;
  white-space: nowrap;
}
.sync i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
  flex: none;
}

/* ---------- 5.2 Search band ---------- */
.searchband {
  flex: none;
  padding: 20px 30px 0;
  display: flex;
  align-items: center;
  gap: 20px;
}
.searchbox {
  flex: 1;
  display: flex;
  align-items: center;
  height: 50px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 0 14px 0 1px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.searchbox:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44,74,62,.09);
}
.searchbox .ico { color: var(--ink-3); margin: 0 12px 0 15px; flex: none; }
.searchbox input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14.5px;
  height: 100%;
  letter-spacing: .01em;
}
.searchbox input::placeholder { color: var(--ink-4); }
.kbd {
  font-family: var(--num);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 2px 6px;
  flex: none;
  background: var(--paper);
}
.searchbox .clear-q {
  flex: none;
  color: var(--ink-3);
  padding: 4px;
  margin-right: 6px;
  border-radius: 2px;
}
.searchbox .clear-q:hover { color: var(--ink); background: var(--surface-sunk); }

.sortsel {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: border-color .16s var(--ease);
}
.sortsel:hover { border-color: var(--ink-3); }
.sortsel b { font-weight: 500; color: var(--ink); }
.sortsel .ico { color: var(--ink-3); }

/* ---------- 5.3 Main split ---------- */
.main {
  flex: 1;
  min-height: 0;
  display: flex;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

/* ---- Filters rail ---- */
.rail {
  width: 250px;
  flex: none;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 4px 22px 60px;
  background: var(--paper);
}
.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 14px;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 2;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.rail-head .micro {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--ink);
}
.rail-reset {
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .02em;
  border-bottom: 1px solid transparent;
  transition: color .16s, border-color .16s;
}

/* 数据分片还没到齐时的筛选栏占位 */
.rail-loading { padding: 26px 2px; }
.rail-loading p {
  font-size: 12.5px;
  color: var(--ink-2);
  letter-spacing: .02em;
  margin: 0 0 9px;
}
.rail-loading span {
  display: block;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--ink-4);
}
.rail-reset:hover { color: var(--warn); border-bottom-color: var(--warn); }

.fgroup { padding: 18px 0; border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.fgroup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  cursor: pointer;
}
.fgroup-head span:first-child {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--ink);
}
.fgroup-head .ico { color: var(--ink-4); transition: transform .2s var(--ease); }

/* checkbox row */
.opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5.5px 0;
  cursor: pointer;
  user-select: none;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: color .14s var(--ease);
}
.opt:hover { color: var(--ink); }
.opt .box {
  width: 14px; height: 14px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  background: var(--surface);
  position: relative;
  transition: background .14s var(--ease), border-color .14s var(--ease);
}
.opt .box::after {
  content: "";
  position: absolute;
  left: 3.5px; top: 0.5px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(42deg) scale(.4);
  opacity: 0;
  transition: opacity .12s var(--ease), transform .14s var(--ease);
}
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt input:checked + .box { background: var(--accent); border-color: var(--accent); }
.opt input:checked + .box::after { opacity: 1; transform: rotate(42deg) scale(1); }
.opt.sel { color: var(--ink); font-weight: 500; }

/* 选项列表默认竖排；cols2 排两列 —— 只给取值短、项少的维度用（招聘对象），
   一个维度省掉一半高度，筛选栏少滚一截 */
.optlist.cols2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
}
.optlist.cols2 .opt { min-width: 0; }
.optlist.cols2 .opt > span:last-child {
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* chip group (batch) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12.5px;
  line-height: 1;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink-2);
  letter-spacing: .02em;
  transition: all .14s var(--ease);
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* segmented (exam) */
.seg {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
}
.seg button {
  flex: 1;
  font-size: 12.5px;
  padding: 7px 4px;
  color: var(--ink-3);
  transition: all .14s var(--ease);
}
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button.on { background: var(--accent); color: #fff; }
.seg.four button { font-size: 11px; padding: 7px 1px; letter-spacing: 0; white-space: nowrap; }

/* ---- city tree filter ---- */
.fgroup-badge {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 1px;
}
.fgroup-empty {
  font-size: 11.5px;
  color: var(--ink-4);
  letter-spacing: .02em;
}

.city-search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 31px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  margin-bottom: 10px;
  transition: border-color .14s var(--ease);
}
.city-search:focus-within { border-color: var(--accent); }
.city-search .ico { color: var(--ink-4); flex: none; }
.city-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12.5px;
  height: 100%;
  letter-spacing: .01em;
}
.city-search input::placeholder { color: var(--ink-4); }
.city-q-clear { color: var(--ink-4); display: flex; flex: none; }
.city-q-clear:hover { color: var(--ink); }

.city-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 8px;
}
.city-grid .city-opt {
  white-space: nowrap;
  overflow: hidden;
}

/* 展开更多城市 */
.city-more {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 9px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ink-2);
  text-align: left;
  transition: color .14s var(--ease);
}
.city-more:hover { color: var(--accent); }
.city-more.top {
  margin-top: 0;
  margin-bottom: 8px;
  padding-top: 0;
  padding-bottom: 9px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}
.city-more .ico { transition: transform .18s var(--ease); flex: none; }
.city-more.open .ico { transform: rotate(180deg); }
.city-more b {
  font-family: var(--num);
  font-weight: 500;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.city-opt { padding: 4.5px 0; }
.city-empty {
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: .02em;
  line-height: 1.65;
  margin-top: 8px;
}

/* ---- Content column ---- */
.content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--page);
}

.resultbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 15px 30px 13px;
  background: var(--page);
  border-bottom: 1px solid var(--line-strong);
}
.resultbar strong {
  font-family: var(--num);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.resultbar .unit { font-size: 13px; color: var(--ink-2); }
.resultbar .hint { font-size: 12px; color: var(--ink-3); margin-left: 2px; }
/* 右侧一组：已选条件靠左，同步日期钉在这一行最右端 */
.rb-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  align-self: center;
}
.rb-right .activefilters { margin-left: 0; }
.rb-right .sync { flex: none; }
.activefilters { display: flex; flex-wrap: wrap; gap: 6px; }
.af {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  padding: 3px 7px;
  background: var(--surface-sunk);
  border-radius: 1px;
  color: var(--ink-2);
  letter-spacing: .02em;
}
.af button { color: var(--ink-3); display: flex; }
.af button:hover { color: var(--warn); }

/* ---- Column header ---- */
.collist {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) 148px 128px;
  gap: 20px;
  padding: 9px 30px;
  border-bottom: 1px solid var(--line);
  background: var(--page);
  position: sticky;
  top: 56px;
  z-index: 4;
}
.collist span {
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--ink-3);
  text-transform: uppercase;
  font-weight: 500;
}
.collist span:last-child { text-align: right; }

/* ---- Row ---- */
.rowlist { flex: 1; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) 148px 128px;
  gap: 20px;
  padding: 14px 30px 15px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  transition: background .14s var(--ease);
  align-items: start;
}
.row::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: -1px;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .18s var(--ease);
}
.row:hover { background: var(--paper); }
.row:hover::before { transform: scaleY(1); }
.row.sel { background: var(--paper); }
.row.sel::before { transform: scaleY(1); }

/* ---- Row cells ---- */
.c-co { min-width: 0; }
.co-name {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.45;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.co-meta {
  margin-top: 3px;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ink-3);
  line-height: 1.45;
  /* 多值行业会变长，两行封顶，避免个别行把列表高度撑乱 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.co-meta i {
  font-style: normal;
  margin: 0 5px;
  color: var(--ink-4);
}
/* 性质色点：整页唯一的分类色，只出现在列表行的公司名下方 */
.nat { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.co-meta .nat { color: var(--ink-2); }
.nat-dot {
  width: 5px; height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--n-qt);
}
.nat-dot.gy { background: var(--n-gy); }
.nat-dot.yh { background: var(--n-yh); }
.nat-dot.sy { background: var(--n-sy); }
.nat-dot.wz { background: var(--n-wz); }
.nat-dot.gf { background: var(--n-gf); }
.nat-dot.my { background: var(--n-my); }

.c-job { min-width: 0; }
.job-name {
  font-size: 14px;
  letter-spacing: .01em;
  line-height: 1.45;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.job-cond {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
  font-size: 11.5px;
  letter-spacing: .03em;
  color: var(--ink-3);
  line-height: 1.45;
}
/* 条件标签：比按钮更薄，只有一根 1px 线，读作"索引条目"而不是控件 */
.jc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: .06em;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 1px;
  background: var(--surface);
  color: var(--ink-3);
  white-space: nowrap;
}
/* 届别 —— 校招索引里最要紧的一列，给它整页唯一的浅绿底 */
.jc-yr {
  background: var(--accent-soft);
  border-color: #BFD3C6;
  color: var(--accent);
  font-weight: 500;
}
/* 免笔试 —— 加分项，用松绿点标出来；需要笔试就是默认态，不抢眼 */
.jc-yes { color: var(--accent); }
.jc-dot {
  width: 4px; height: 4px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
}
.c-city {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 13px;
  letter-spacing: .01em;
  line-height: 1.45;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}
.c-city .ico { color: var(--geo); flex: none; margin-top: 3px; }

.c-dl {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
}
.badge {
  flex: none;
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: .08em;
  padding: 3px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  color: var(--ink-3);
  background: transparent;
  white-space: nowrap;
}
.badge.solid { background: var(--surface-sunk); border-color: transparent; color: var(--ink-2); }
.date {
  font-family: var(--num);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  color: var(--ink);
  line-height: 1.35;
}
.date .yr { color: var(--ink-3); font-size: 11.5px; }
.left {
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 4px;
}
.left.hot { color: var(--warn); }
.left.hot::before {
  content: "";
  width: 4px; height: 4px;
  background: var(--warn);
  border-radius: 50%;
  display: block;
}
.left.past { color: var(--ink-4); }
/* ---- List footnote ---- */
.listfoot {
  padding: 24px 30px 48px;
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--ink-4);
  border-bottom: 1px solid transparent;
}

/* ---- Empty state ---- */
.empty {
  padding: 112px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.empty .rule { width: 40px; height: 1px; background: var(--line-strong); }
.empty h3 { font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.empty p { font-size: 13px; color: var(--ink-3); max-width: 320px; }
.btn-ghost {
  margin-top: 6px;
  font-size: 12.5px;
  letter-spacing: .06em;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  color: var(--ink-2);
  background: var(--surface);
  transition: all .14s var(--ease);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   6. DRAWER — job detail
   ============================================================ */
.scrim {
  position: absolute;
  inset: 0;
  background: rgba(21,23,26,.26);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s var(--ease);
  z-index: 40;
}
.scrim.on { opacity: 1; pointer-events: auto; }

.drawer {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 520px;
  max-width: 92%;
  background: var(--surface);
  border-left: 1px solid var(--line-strong);
  transform: translateX(101%);
  transition: transform .28s var(--ease);
  z-index: 41;
  display: flex;
  flex-direction: column;
  box-shadow: -24px 0 60px -40px rgba(21,23,26,.3);
}
.drawer.on { transform: translateX(0); }

.dw-head {
  flex: none;
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.dw-head .co { flex: 1; min-width: 0; }
.dw-co-name { font-size: 17px; font-weight: 600; letter-spacing: .015em; line-height: 1.4; }
.dw-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.dw-close {
  flex: none;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--ink-3);
  margin-top: 2px;
  transition: all .14s var(--ease);
}
.dw-close:hover { border-color: var(--ink-3); color: var(--ink); }

.dw-body { flex: 1; overflow-y: auto; padding: 24px 28px 24px; }

.dw-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .015em;
  line-height: 1.4;
  margin-bottom: 8px;
}
.dw-sub { font-size: 13px; color: var(--ink-3); letter-spacing: .02em; }

.countdown {
  margin: 20px 0 24px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 16px;
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
}
.countdown .big {
  font-family: var(--num);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  letter-spacing: .01em;
  line-height: 1;
}
.countdown .txt { font-size: 12.5px; color: var(--accent); letter-spacing: .03em; }
.countdown.warn { background: var(--warn-soft); border-left-color: var(--warn); }
.countdown.warn .big, .countdown.warn .txt { color: var(--warn); }
.countdown.past { background: var(--surface-sunk); border-left-color: var(--ink-4); }
.countdown.past .big, .countdown.past .txt { color: var(--ink-3); }

.dw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}
.dw-grid .cell {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.dw-grid .cell:nth-child(odd) { padding-right: 16px; }
.dw-grid .cell:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.dw-grid dt {
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--ink-3);
  margin-bottom: 5px;
  font-weight: 500;
}
.dw-grid dd { font-size: 13.5px; color: var(--ink); letter-spacing: .01em; line-height: 1.5; }

.dw-sec { margin-top: 26px; }
.dw-sec h4 {
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.dw-sec p { font-size: 13.5px; color: var(--ink-2); line-height: 1.75; letter-spacing: .01em; }

.dw-actions { display: flex; gap: 10px; margin-top: 26px; }

/* 抽屉底部动作条：脱离 dw-body 的滚动区，永远贴在抽屉底边 */
.drawer > .dw-actions {
  flex: none;
  margin-top: 0;
  padding: 14px 28px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line-strong);
  background: var(--surface);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  font-size: 13px;
  letter-spacing: .06em;
  border-radius: var(--r);
  border: 1px solid transparent;
  transition: all .16s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; flex: 1; }
.btn-primary:hover { background: var(--accent-2); }
.btn-outline { border-color: var(--line-strong); color: var(--ink-2); background: var(--surface); }
.btn-outline:hover { border-color: var(--ink-3); color: var(--ink); }

.dw-foot {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-4);
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   7. RESPONSIVE — container queries on @app
   ============================================================ */

/* --- Tablet / narrow desktop --- */
@container app (max-width: 1080px) {
  .rail { width: 214px; padding-left: 16px; padding-right: 16px; }
  .masthead { padding: 0 20px; gap: 20px; }
  .searchband { padding: 16px 20px 0; }
  .row, .collist { padding-left: 20px; padding-right: 20px; }
  .resultbar { padding-left: 20px; padding-right: 20px; }
  .row, .collist { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 100px 112px; gap: 16px; }
}

/* --- Mobile: below 900 --- */
@container app (max-width: 900px) {
  .masthead {
    height: auto;
    flex-wrap: wrap;
    padding: 0 16px;
    gap: 0;
  }
  .brand {
    border-right: 0;
    padding-right: 0;
    height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .brand-cn { font-size: 15px; letter-spacing: .16em; }
  .brand-en { font-size: 7.5px; letter-spacing: .26em; }
  /* 手机上导航折成第二行：四个入口都要点得到 */
  .nav {
    order: 3;
    width: 100%;
    height: 38px;
    gap: 20px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { font-size: 12.5px; }

  .searchband {
    padding: 12px 16px 12px;
    gap: 10px;
    position: sticky;
    top: 0;
    background: var(--paper);
    z-index: 9;
    border-bottom: 1px solid var(--line);
  }
  .searchbox { height: 44px; }
  .searchbox .ico { margin: 0 9px 0 12px; }
  .searchbox input { font-size: 14px; }
  .kbd { display: none; }
  .sortsel { height: 44px; width: 44px; padding: 0; justify-content: center; }
  .sortsel .label, .sortsel b { display: none; }

  .main {
    margin-top: 0;
    border-top: 0;
    flex-direction: column;
  }
  .rail { display: none; }

  .resultbar {
    padding: 11px 16px;
    position: static;
    border-bottom: 1px solid var(--line);
    align-items: center;
  }
  .resultbar strong { font-size: 15px; }
  .resultbar .hint { display: inline; font-size: 11.5px; margin-left: 0; }
  .resultbar .sync { font-size: 11px; gap: 5px; }
  .rb-right { gap: 0; }
  .activefilters { display: none; }

  .collist { display: none; }

  .rowlist { padding: 12px 16px 90px; display: flex; flex-direction: column; gap: 10px; }

  .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "co   co"
      "job  job"
      "city dl";
    gap: 0;
    padding: 14px 15px 13px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface);
  }
  .row::before { display: none; }
  .row:hover { background: var(--surface); }

  .c-co { grid-area: co; }
  .co-name { font-size: 14px; }
  .c-job { grid-area: job; margin-top: 9px; }
  .job-name { font-size: 13.5px; }

  .c-city {
    grid-area: city;
    align-self: center;
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
  }
  .c-city .ico { display: none; }

  .c-dl {
    grid-area: dl;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1px solid var(--line);
  }
  .date { font-size: 12.5px; }

  /* filter sheet */
  .filter-fab {
    position: absolute;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    right: 16px;
    height: 48px;
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13.5px;
    letter-spacing: .12em;
    z-index: 20;
    box-shadow: 0 8px 24px -10px rgba(21,23,26,.5);
  }
  .filter-fab .n {
    font-family: var(--num);
    font-variant-numeric: tabular-nums;
    background: rgba(255,255,255,.16);
    padding: 1px 6px;
    border-radius: 1px;
    font-size: 11.5px;
    letter-spacing: .02em;
  }

  .rail.as-sheet {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 0; right: 0; bottom: 0;
    top: auto;
    height: 84%;
    width: 100%;
    border-right: 0;
    border-top: 1px solid var(--line-strong);
    border-radius: 10px 10px 0 0;
    background: var(--surface);
    z-index: 42;
    padding: 0;
    overflow: clip;
    transform: translateY(100%);
    transition: transform .3s var(--ease);
    box-shadow: 0 -20px 50px -30px rgba(21,23,26,.4);
  }
  .rail.as-sheet.on { transform: translateY(0); }
  .rail.as-sheet .rail-head {
    flex: none;
    position: static;
    background: var(--surface);
    border-radius: 10px 10px 0 0;
    padding: 13px 20px 11px;
    margin-bottom: 0;
  }
  .rail.as-sheet .rail-head .micro { font-size: 13.5px; }
  .rail.as-sheet .rail-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 20px 8px;
  }
  .sheet-grip {
    display: block;
    flex: none;
    width: 34px; height: 3px;
    background: var(--line-strong);
    border-radius: 99px;
    margin: 10px auto 0;
  }
  .sheet-apply {
    position: static;
    flex: none;
    padding: 12px 20px 20px;
    background: var(--surface);
    border-top: 1px solid var(--line);
    display: flex;
    gap: 10px;
  }
  .sheet-apply .btn { flex: 1; }
  .rail.as-sheet .fgroup:last-child { border-bottom: 0; }

  .drawer {
    width: 100%;
    max-width: 100%;
    border-left: 0;
  }
  .dw-head { padding: 16px 18px 14px; }
  .dw-co-name { font-size: 15.5px; }
  .dw-body { padding: 20px 18px 28px; }
  .dw-title { font-size: 19px; }
  .dw-grid { grid-template-columns: 1fr; }
  .dw-grid .cell:nth-child(odd) { padding-right: 0; }
  .dw-grid .cell:nth-child(even) { padding-left: 0; border-left: 0; }
  .dw-actions { position: sticky; bottom: 0; }
  .drawer > .dw-actions { padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .dw-actions .btn { flex: 1; }
  /* 底部有「筛选条件」悬浮按钮，分页条让开它 */
  .pager { padding-bottom: calc(14px + 62px); }
}

/* --- Tablet band: cards in two columns instead of one stretched column --- */
@container app (min-width: 620px) and (max-width: 900px) {
  .rowlist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: start;
    gap: 12px;
  }
  .listfoot { grid-column: 1 / -1; }
  .filter-fab {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: auto;
    padding: 0 22px;
    transform: none;
  }
}

/* --- end of responsive layer --- */

/* ============================================================
   10. REAL DATA LAYER — 独立页壳、试用条、分页、长文本收敛
   （挂在末尾，覆盖前面的同选择器规则）
   ============================================================ */

/* ---- 10.1 独立页：不在 deck 里，直接铺满视口 ---- */
body.standalone {
  height: 100vh;
  /* 手机浏览器的地址栏会吃掉 100vh 的一部分，dvh 才是真实可视高度 */
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
}
body.standalone .app-frame {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

/* ---- 10.2 顶部试用条 ---- */
.trial-bar {
  flex: none;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line-strong);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--ink-2);
}
.tb-tag {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 3px 6px;
  border-radius: 1px;
  line-height: 1;
}
.tb-text b { font-weight: 600; color: var(--ink); }
.tb-text b.num { font-variant-numeric: tabular-nums; }
.tb-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .14s var(--ease), border-color .14s var(--ease);
}
.tb-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.trial-bar.err { background: var(--warn-soft); }
.trial-bar.err .tb-tag { background: var(--warn); }
.trial-bar.err .tb-text { color: var(--warn); }

/* ---- 10.3 长文本收敛：真数据里岗位名是一长串，两行封顶 ---- */
.co-name,
.job-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.co-name { -webkit-line-clamp: 2; line-clamp: 2; }

/* ---- 10.4 多城市 ---- */
.city-txt {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 3px;
  min-width: 0;
  line-height: 1.5;
}
.city-txt .sep { color: var(--ink-4); }
.city-more-n {
  font-family: var(--num);
  font-size: 10.5px;
  letter-spacing: .02em;
  color: var(--ink-3);
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  padding: 0 3px;
  margin-left: 2px;
  line-height: 1.5;
}
.city-none { color: var(--ink-4); }
.city-flag { color: var(--ink-2); }

/* ---- 10.5 报名截止三态 ---- */
.date.asap {
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--ink-2);
}
.date.past { color: var(--ink-4); }

/* ---- 10.6 分页 ---- */
.pager {
  /* 固定在内容区底边，翻页不用滚到底 */
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: var(--page);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 14px 30px 14px;
  border-top: 1px solid var(--line-strong);
}
.pager:empty { display: none; }
.pg-step,
.pg-num {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1;
  letter-spacing: .04em;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: border-color .14s var(--ease), color .14s var(--ease), background .14s var(--ease);
}
.pg-step:hover:not(:disabled),
.pg-num:hover:not(.on) { border-color: var(--ink-3); color: var(--ink); }
.pg-step:disabled { color: var(--ink-4); border-color: var(--line); cursor: default; }
.pg-nums { display: flex; align-items: center; gap: 4px; margin: 0 2px; }
.pg-num {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
  min-width: 30px;
  justify-content: center;
  padding: 7px 6px;
}
.pg-num.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.pg-gap {
  color: var(--ink-4);
  font-size: 12px;
  padding: 0 2px;
  letter-spacing: .1em;
}

/* 详情里的公告按钮可能变成 <a>，清掉默认下划线 */
.dw-actions a.btn { text-decoration: none; }
.dw-actions .btn[aria-disabled="true"] {
  color: var(--ink-4);
  border-color: var(--line);
  cursor: default;
}

/* ---- 10.7 移动端 ---- */
@container app (max-width: 900px) {
  .pager {
    padding: 16px 16px 96px;
    justify-content: center;
    gap: 5px;
  }
  .pg-step { padding: 8px 9px; font-size: 11.5px; }
  .city-txt { font-size: 12px; }
}

/* ---- 10.8 行内链接 & 试用条小屏 ---- */
.inline-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(44, 74, 62, .3);
  overflow-wrap: anywhere;
}
.inline-link:hover { border-bottom-color: var(--accent); }

.tb-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 780px) {
  .trial-bar {
    height: auto;
    min-height: 34px;
    padding: 7px 14px;
    gap: 8px;
  }
  .tb-text { font-size: 11.5px; }
  .tb-link { display: none; }
}

/* 分页紧跟列表，别被 flex:1 推到屏幕底 */
body.standalone .rowlist { flex: 0 0 auto; }

/* ============================================================
   11. DOC LAYOUT — 面经 / 选岗正文排版
   页面骨架在第 12 章，这里只管标题和段落的排法。
   ============================================================ */

.doc-head { padding-bottom: 20px; border-bottom: 1px solid var(--line-strong); }
.doc-head h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.35;
  margin: 0 0 10px;
}
.doc-head p {
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: .02em;
  margin: 0;
  line-height: 1.7;
}

/* 面经：序号 + 公司岗位 + 一行一句 */
.iv-sec { padding: 26px 0 4px; border-top: 1px solid var(--line); }
.iv-sec:first-of-type { border-top: 0; }
.iv-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.iv-n {
  font-family: var(--num);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  flex: none;
}
.iv-title {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.45;
  margin: 0;
}
.iv-body { padding-left: 28px; }
.iv-body p {
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--ink-2);
  margin: 0 0 3px;
  letter-spacing: .01em;
}
/* 校招科普：同一套分节，但正文是成段的说明，段落要拉开 */
.iv-body.prose p { line-height: 1.95; margin-bottom: 14px; }
.iv-body.prose p:last-child { margin-bottom: 0; }

/* 选岗：一段一段的话 */
.rm-body {
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-2);
  letter-spacing: .01em;
  margin: 0;
}
.rm-body p {
  margin: 0 0 13px;
  white-space: pre-wrap;
}
.rm-body p:last-child { margin-bottom: 0; }
.rm-extra {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* ---- 正文移动端 ---- */
@container app (max-width: 780px) {
  .doc-head h1 { font-size: 21px; }
  .iv-body { padding-left: 0; }
  .iv-title { font-size: 15.5px; }
}

/* 窄屏：结果条这一行放不下「排序说明 + 同步日期」，让排序说明退场 */
@container app (max-width: 560px) {
  .resultbar .hint { display: none; }
}

/* ============================================================
   12. 静态文档页 —— 面试经验 / 选岗思路
   内容写死在 HTML 里，靠 CSS 拼「左目录 + 右正文」，不跑脚本。
   目的就一个：让搜索引擎和禁用 JS 的浏览器都能读到全文。
   ============================================================ */

body.doc-page {
  display: block;
  height: auto;
  min-height: 100vh;
  overflow: visible;
  background: var(--page);
}
body.doc-page .app-frame {
  height: auto;
  overflow: visible;
  background: var(--page);
  /* 页头是 fixed 脱离文档流，用等高内边距把正文让下来 */
  padding-top: var(--mast-h);
}

/* 文档页是整页滚动（body 滚），页头必须自己钉住，否则往下读正文就看不着导航了。
   主列表页不用管：那里是 .content 内部滚动，页头一直在上面。
   用 fixed 而不是 sticky —— 微信内嵌浏览器 / 老安卓 WebView 对 sticky 支持参差，
   fixed 是十年前的浏览器也认的写法。 */
body.doc-page .masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
}
/* 手机端页头两行，高度不是 62 */
@media (max-width: 900px) {
  :root { --mast-h: 89px; }
}

.doc-wrap { display: flex; align-items: flex-start; }

/* ---- 左目录：跟随滚动 ---- */
.doc-rail {
  position: sticky;
  top: var(--mast-h);
  flex: none;
  width: 268px;
  max-height: calc(100vh - var(--mast-h));
  overflow-y: auto;
  background: var(--paper);
  border-right: 1px solid var(--line-strong);
  padding-bottom: 40px;
}
.doc-rail-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 18px 11px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--ink-3);
}
.doc-rail-head b {
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink-2);
}

.doc-toc { padding: 7px 9px 0; }
.doc-toc a {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 2px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
  text-decoration: none;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.doc-toc a:hover { background: var(--surface-sunk); color: var(--ink); }
.doc-toc a:target,
.doc-toc a:focus-visible { background: var(--accent-soft); color: var(--accent); }
.doc-toc a .n {
  flex: none;
  min-width: 18px;
  font-family: var(--num);
  font-size: 10.5px;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.doc-toc a .t { min-width: 0; overflow-wrap: anywhere; }

/* ---- 右正文 ---- */
.doc-main {
  flex: 1;
  min-width: 0;
  padding: 34px 44px 64px;
}
.doc-main > * { max-width: 780px; }

.doc-sec {
  padding: 28px 0 4px;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--mast-h) + 14px);
}
.doc-sec:first-of-type { border-top: 0; }
.doc-sec h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.45;
  margin: 0 0 10px;
}
.iv-sec { scroll-margin-top: calc(var(--mast-h) + 14px); }

/* ---- 移动端：目录折成顶部横条 ---- */
@container app (max-width: 780px) {
  .doc-wrap { flex-direction: column; }
  .doc-rail {
    width: 100%;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
    padding-bottom: 0;
    z-index: 8;
  }
  .doc-rail-head { display: none; }
  .doc-toc {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 9px 14px;
    scrollbar-width: none;
  }
  .doc-toc::-webkit-scrollbar { display: none; }
  .doc-toc a {
    flex: none;
    white-space: nowrap;
    padding: 5px 12px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 12px;
  }
  .doc-toc a .n { display: none; }
  .doc-main { padding: 20px 18px 56px; }
  .doc-head h1 { font-size: 21px; }
  .doc-sec, .iv-sec { scroll-margin-top: calc(var(--mast-h) + 58px); }
  .doc-sec h2 { font-size: 16.5px; }
  .iv-body { padding-left: 0; }
}

/* ============================================================
   13. FOOTER — 页脚：站点署名 + 联系邮箱
   ============================================================ */
.site-foot {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 26px;
  flex: none;
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding: 15px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}
.site-foot .sf-brand {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}
.site-foot .sf-cn {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .2em;
  line-height: 1.2;
  color: var(--ink-2);
  margin-left: -1px;
}
.site-foot .sf-en {
  font-family: var(--num);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .3em;
  line-height: 1;
  color: var(--ink-4);
  white-space: nowrap;
}
.site-foot .sf-mail {
  font-family: var(--num);
  font-size: 12px;
  letter-spacing: .03em;
  line-height: 1.4;
  color: var(--ink-2);
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
  white-space: nowrap;
}
/* 只有链接形态才有下划线反馈；纯文本（如微信号）保持静态 */
.site-foot a.sf-mail:hover,
.site-foot a.sf-mail:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* 首页：吸附在内容区最底部，左右内边距对齐结果条 */
.content > .site-foot {
  margin-top: auto;
  padding: 15px 30px 18px;
}

/* 文档页：跟在正文之后 */
.doc-main > .site-foot { margin-top: 40px; }

@container app (max-width: 900px) {
  .content > .site-foot {
    /* 底部要给「筛选条件」悬浮条让位，否则邮箱被压住 */
    padding: 14px 16px calc(74px + env(safe-area-inset-bottom, 0px));
  }
  .doc-main > .site-foot { margin-top: 30px; }
  .site-foot .sf-en { font-size: 7.5px; letter-spacing: .26em; }
}

/* ============================================================
   14. LICENSE — 激活码顶部入口 / 弹窗 / 筛选栏灰化骨架
   ============================================================ */

/* ---- 14.1 顶部入口（masthead 右侧） ---- */
.lic-btn {
  margin-left: auto;
  margin-right: -9px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--ink-3);
  border: 1px solid transparent;
  border-radius: var(--r);
  white-space: nowrap;
  transition: color .16s var(--ease), border-color .16s var(--ease),
              background .16s var(--ease);
}
.lic-btn .ico { color: currentColor; }
.lic-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface);
}
.lic-btn.on { color: var(--accent); }
.lic-btn.on:hover { border-color: var(--accent); background: var(--accent-soft); }
.lic-btn.on .ico { stroke-width: 1.9; }

/* ---- 14.2 弹窗 ---- */
.lic-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(21, 23, 26, .44);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s var(--ease);
}
.lic-scrim.on { opacity: 1; pointer-events: auto; }

.lic-card {
  width: 100%;
  max-width: 368px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 18px 22px 22px;
  transform: translateY(10px) scale(.985);
  transition: transform .18s var(--ease);
}
.lic-scrim.on .lic-card { transform: none; }

.lic-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.lic-head h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--ink);
}
.lic-x { color: var(--ink-3); padding: 2px 0 2px 8px; }
.lic-x:hover { color: var(--ink); }

.lic-body { padding-top: 16px; }
.lic-tip {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 14px;
}

.lic-input {
  width: 100%;
  height: 46px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  font-family: var(--num);
  font-size: 16px;
  letter-spacing: .13em;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: border-color .16s var(--ease);
}
.lic-input::placeholder { color: var(--ink-4); letter-spacing: .13em; }
.lic-input:focus { outline: none; border-color: var(--accent); }
.lic-input.bad { border-color: var(--warn); }

.lic-err {
  min-height: 17px;
  margin: 7px 0 0;
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--warn);
  text-align: center;
}
.lic-submit { width: 100%; height: 42px; margin-top: 3px; }
.lic-submit[disabled] { opacity: .38; cursor: not-allowed; }
.lic-submit[disabled]:hover { background: var(--accent); }

/* 已激活态 */
.lic-ok {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--accent);
}
.lic-ok .ico { flex: none; margin-top: 3px; }

.lic-info {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 16px 0 0;
  padding: 11px 13px;
  background: var(--surface-sunk);
  border-radius: var(--r);
  font-size: 12px;
}
.lic-info dt { color: var(--ink-3); letter-spacing: .06em; white-space: nowrap; }
.lic-info dd {
  margin: 0;
  font-family: var(--num);
  letter-spacing: .08em;
  color: var(--ink);
}
.lic-note {
  margin-top: 13px;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--ink-3);
}
.lic-off {
  margin-top: 15px;
  font-size: 11.5px;
  color: var(--ink-4);
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.lic-off:hover { color: var(--warn); border-bottom-color: var(--warn); }

/* ---- 14.2.1 购买入口 ---- */
/* 输入态底部的一条「还没有激活码」：不抢激活按钮的注意力，但一眼能看到 */
.lic-buy {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-3);
  text-align: center;
  transition: color .16s var(--ease);
}
.lic-buy b { color: var(--accent); font-weight: 550; border-bottom: 1px solid transparent; transition: border-color .16s var(--ease); }
.lic-buy:hover { color: var(--ink-2); }
.lic-buy:hover b { border-bottom-color: var(--accent); }

/* 购买态：二维码 + 说明 */
.lic-qr-wrap {
  margin: 4px auto 0;
  width: 100%;
  max-width: 234px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.lic-qr { display: block; width: 100%; height: auto; }
.lic-buy-tip {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-2);
  text-align: center;
}
.lic-buy-tip b {
  font-family: var(--num);
  letter-spacing: .06em;
  color: var(--ink);
  font-weight: 600;
}
.lic-buy-hint {
  margin-top: 5px;
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--ink-4);
  text-align: center;
}
.lic-back {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}
.lic-back:hover { color: var(--accent); }

/* 弹窗打开时锁住背景滚动 */
body.lic-open .content { overflow: hidden; }

/* ---- 14.3 筛选栏灰化骨架 ---- */
.rail-lock { cursor: pointer; }
.rail-lock-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 0 2px;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ink-3);
}
.rail-lock-tip svg { flex: none; }

.rail-skel { padding: 17px 0; border-bottom: 1px solid var(--line); }
.rail-skel:last-child { border-bottom: 0; }
.rail-skel h4 {
  margin: 0 0 12px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--ink-2);
}
.rail-skel i {
  display: block;
  height: 7px;
  border-radius: 1px;
  background: var(--paper-deep);
  margin-bottom: 9px;
  transition: background .16s var(--ease);
}
.rail-skel i:last-child { margin-bottom: 0; }
.rail-skel:hover i { background: #DBD5C7; }

.skel-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.skel-chips i {
  height: 22px;
  margin-bottom: 0;
  border-radius: 1px;
  background: var(--paper-deep);
}
.rail-skel:hover .skel-chips i { background: #DBD5C7; }

@container app (max-width: 900px) {
  .lic-btn { margin-right: -4px; font-size: 12px; padding: 5px 8px; }
  .lic-card { padding: 16px 18px 18px; }
}
