/* 找工地图 · 岗位列表 + 岗位详情样式
   从 FancyTeams_standalone_.html 摘出，沿用 .jp-（list）和 .jd-（detail）前缀，
   不与 .ft- / .t4- 现有命名冲突。 */

/* =============================================================
   岗位列表 (.jp-)
   ============================================================= */

.jp-page{
  background: #ffffff;
  min-height: 100vh;
}
.ai-has-sidebar.jp-page{
  padding-left: var(--ai-sb-width);
}
@media (max-width: 900px){
  .ai-has-sidebar.jp-page{ padding-left: 0; }
}

/* Hero / promo / sticky 筛选行复用首页同款 .ft-hero / .ft-promo-row /
   .ft-search-section / .ft-filter-row，规则已在 home.css 里，不再重复。 */

/* ── 列表 ── */
.jp-list-wrap{
  width: 100%;
  max-width: 1075px;
  padding: 48px 24px 0;
}
.jp-list-card{
  background: transparent;
  padding: 0;
}
.jp-list{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 单行 — 独立行，无阴影，hover 高亮。
   覆盖式 anchor 模式：行本身是 div（为了不嵌套 <a>），里面有 .jp-job-cover
   做主入口铺满整行，团队块 .jp-team 用 z-index 浮在 cover 之上。 */
.jp-job-row{
  position: relative;
  display: grid;
  grid-template-columns: 1fr 22px;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  margin: 0;
  background: #ffffff;
  border-radius: 20px;
  corner-shape: squircle;
  -webkit-corner-shape: squircle;
  cursor: pointer;
  color: inherit;
  transition: background .15s ease;
}
.jp-job-row:hover{ background: #f5f5f5; }
/* 列表行的 open chip 尺寸单独缩到 22px，不动首页卡片上的 28px 默认值 */
.jp-job-row > .ft-card-open{
  justify-self: end;
  width: 24px;
  height: 24px;
}
.jp-job-row > .ft-card-open svg{ width: 12px; height: 12px; }

/* 整行的覆盖式 anchor —— SEO 拿得到 href，视觉上不可见。 */
.jp-job-cover{
  position: absolute;
  inset: 0;
  z-index: 1;
  text-indent: -9999px;
  overflow: hidden;
  border-radius: inherit;
  color: transparent;
}
.jp-job-cover:focus-visible{
  outline: 2px solid #1d1d1f;
  outline-offset: -2px;
}

.jp-left{
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

/* 团队列 — 固定宽度便于跨行对齐；浮在 .jp-job-cover 之上做独立链接。 */
.jp-team{
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 200px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  transition: opacity .15s ease;
}
.jp-team:hover{ opacity: 0.65; }
.jp-team-logo{
  width: 20px;
  height: 20px;
  border-radius: 12px;
  corner-shape: squircle;
  -webkit-corner-shape: squircle;
  object-fit: cover;
  flex-shrink: 0;
  background: #f5f5f7;
  box-sizing: border-box;
}
.jp-team-id{ min-width: 0; line-height: 1.25; }
.jp-team-name{
  font-size: 15px;
  font-weight: 400;
  color: #1d1d1f;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 角色列 */
.jp-role-block{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.3;
}
.jp-role{
  min-width: 0;
  font-size: 15.5px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: #1d1d1f;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.jp-role-title{
  font-weight: 400;
  color: #1d1d1f;
}
.jp-role .jp-hot{
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 14px;
  line-height: 1;
}

/* meta 行：地点 · 经验 */
.jp-meta{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.jp-loc{
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: #86868b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jp-exp-text::before{
  content: "·";
  color: #d2d2d7;
  margin-right: 8px;
}

/* ── Mobile (≤ 820px)：两行布局 ── */
@media (max-width: 820px){
  /* 顶部留白从 64 收到 32：移动端 hero 已经离顶很近，列表不需要再大块呼吸 */
  .jp-list-wrap{ padding-top: 32px; }
  .jp-job-row{
    grid-template-columns: 1fr auto;
    grid-template-areas: "left arr";
    gap: 6px 14px;
    /* 上下 padding +4 (14 → 18)，让 .jp-job-cover (inset:0) 跟着撑出更大的点击 / 视觉区域 */
    padding: 18px 12px;
  }
  .jp-left{
    grid-area: left;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .jp-team{ width: auto; }
  .jp-job-row > .ft-card-open{ grid-area: arr; align-self: center; }
}

/* ── 空态 ── */
.jp-empty{
  padding: 96px 24px;
  text-align: center;
  color: #86868b;
  font-size: 15px;
}
.jp-empty .em{ font-size: 32px; margin-bottom: 10px; }
.jp-empty .reset{
  margin-top: 14px;
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: #1d1d1f;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  border: 0;
}

/* =============================================================
   岗位详情 (.jd-)
   ============================================================= */

.jd-page{
  background: #ffffff;
  min-height: 100vh;
  /* 整页禁止水平滚动 —— 任意元素溢出（长标题、宽 chip 行、长 URL 等）都被裁剪
     而不是顶出横向滚动条。
     用 clip 不用 hidden：hidden 会让另一个轴隐式变成 auto，把 .jd-page 变成
     滚动容器，破坏内部 .jd-aside 的 position: sticky。clip 不创建 scroll
     container，sticky 走外层 viewport 的 scroll context，正常吸顶。 */
  overflow-x: clip;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  color: #1d1d1f;
  letter-spacing: -0.005em;
}

.jd-main{
  padding-top: 56px;
  padding-bottom: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.jd-wrap{
  width: 100%;
  max-width: 900px;
  padding: 0 24px;
  /* 必须 border-box —— 默认 content-box 下 width:100% + padding 会让 wrap
     总宽超过父容器，配合 .jd-main 的 align-items: center 把超宽 box 居中后，
     内容反而被推到视口边缘，看上去像完全没有左右边距。
     team detail 通过 .t4 *{ box-sizing: border-box } 全局兜底，JD 没有这条
     全局规则，必须在 .jd-wrap 自己写。 */
  box-sizing: border-box;
}

/* —— Job hero ——
   §1.5：section 之间靠大间距，不用分割线。hero 以 padding-bottom 72px 把
   body 段推开，body 自身不再 padding-top。mobile 用 56。 */
.jd-hero{
  padding-bottom: 72px;
}
@media (max-width: 720px){
  .jd-hero{ padding-bottom: 56px; }
}
.jd-eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;          /* 跟 .jp-team-name 对齐 */
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.5;
  color: #86868b;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.jd-eyebrow-logo{
  width: 20px;
  height: 20px;
  border-radius: 8px;
  corner-shape: squircle;
  -webkit-corner-shape: squircle;
  object-fit: cover;
  background: #f5f5f5;            /* bg-soft */
  box-shadow: inset 0 0 0 0.5px #ececef;  /* line-1 */
}
.jd-eyebrow-team{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #1d1d1f;
  font-weight: 400;
  text-decoration: none;
  transition: opacity .15s ease;
}
.jd-eyebrow-team:hover{ opacity: .65; }
.jd-eyebrow-team-arr{
  width: 11px;
  height: 11px;
  color: #86868b;
}

.jd-title{
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", system-ui, sans-serif;
  font-size: 39px;          /* hero-xl */
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.022em;
  color: #1d1d1f;
  margin: 0;
}
@media (max-width: 720px){
  .jd-title{ font-size: min(7.5vw, 39px); }
}
.jd-hot{
  display: inline-block;
  margin-left: 10px;
  font-size: 24px;
  vertical-align: middle;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

/* —— Facts —— 直接用 team detail 的 .t4-hero-chiprow / .t4-chip，
   §1.6 chip 必带 icon，已在 JSX 内联 SVG。这里不再单独定义 .jd-facts。 */

/* —— Body：左 prose + 右 aside ——
   padding-top 由 .jd-hero padding-bottom 接管（§1.5：section 大间距）。 */
.jd-body{
  display: grid;
  grid-template-columns: 1fr 268px;
  gap: 68px;
  padding-top: 0;
}
@media (max-width: 820px){
  .jd-body{ grid-template-columns: 1fr; gap: 32px; }
  /* 页面两端边距随屏宽缩放（6.5vw），与 team.css 的 .t4-doc 同一套规则。
     在 body 塌成单列的同一断点切换，保证"移动布局"和"移动边距"同步出现。
     注意：底部固定工具栏 .jd-aside 用 position: fixed; left:0; right:0 跳出
     .jd-wrap 的 box，工具栏始终满视口宽 → 这条 padding 不会影响它。 */
  .jd-wrap{ padding: 0 6.5vw; }
}

/* .jd-prose 的 markdown 渲染样式已抽出到 markdown.css，与团队页 .t4-md 共用。 */

/* —— Aside（sticky 招聘联系人 + apply） ——
   §1.4：white bg + shadow-3，无 border。 */
.jd-aside{
  position: sticky;
  top: 24px;
  align-self: start;
  background: #ffffff;
  border-radius: 20px;
  corner-shape: squircle;
  -webkit-corner-shape: squircle;
  box-shadow: 0 14px 44px -10px rgba(0,0,0,0.10);  /* shadow-3 */
  padding: 28px 22px;
}
@media (max-width: 820px){ .jd-aside{ position: static; } }

.jd-hm{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.jd-hm-avatar{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f5f5f5 center/cover no-repeat;       /* bg-soft */
  flex-shrink: 0;
  box-shadow: inset 0 0 0 0.5px #ececef;            /* line-1 */
}
.jd-hm-meta{ min-width: 0; line-height: 1.3; }
/* §1.1 + §5 Main+Sub 文本对：name / role 同字号同字重（t-body 16/400），
   用 ink-1 / ink-3 区分主副。不再用字重 500 / 400 做层级。 */
.jd-hm-name{
  font-size: 14px;          /* t-body */
  font-weight: 400;
  color: #1d1d1f;           /* ink-1 */
  letter-spacing: -0.005em;
}
.jd-hm-role{
  font-size: 14px;          /* t-body — 同 name */
  font-weight: 400;
  color: #86868b;           /* ink-3 */
  letter-spacing: -0.005em;
  margin-top: 2px;
}

.jd-apply{
  appearance: none;
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #1d1d1f;
  color: #ffffff;
  font: inherit;
  font-size: 14.5px;        /* t-row-sm */
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: opacity .18s ease, transform .08s ease;
}
.jd-apply:hover{ opacity: .85; }
.jd-apply:active{ transform: scale(.98); }
.jd-apply-note{
  margin-top: 10px;
  font-size: 12px;          /* t-caption */
  line-height: 1.45;
  color: #86868b;
  text-align: center;
}

/* —— 其他岗位 ——
   §1.5：margin-top 72 取代 border-top + padding-top 的分割线方案。 */
.jd-others{
  margin-top: 72px;
}
@media (max-width: 720px){
  .jd-others{ margin-top: 56px; }
}
/* .section-title 自身不带 margin（参见 team.css 定义）；JD 没有 .t4-sec-head
   wrapper，下方留白在这里补足，跟 team detail 的 .t4-sec-head margin-bottom 一致。 */
.jd-others > .section-title{ margin: 0 0 24px; }
/* 列表容器：参考 .t4-jobs ── flex 列，行间 2px 视觉紧凑，无外框、无分隔线。 */
.jd-others-list{
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* 单行：参考 .t4-job-row 排列；exp 跟 loc 合并到一行（参考 JobsPage 行布局）。
   1fr (role + loc·exp) / 18px (arrow)；行有 0 -14 的负 margin 把 hover 高亮
   往两侧外扩，不会被容器 padding 切边。 */
.jd-other-row{
  display: grid;
  grid-template-columns: 1fr 18px;
  align-items: center;
  gap: 16px;
  padding: 16px 14px;
  margin: 0 -14px;
  border-radius: 10px;
  corner-shape: squircle;
  -webkit-corner-shape: squircle;
  background: transparent;
  text-decoration: none;
  color: inherit;
  transition: background .15s ease;
  cursor: pointer;
}
.jd-other-row:hover{ background: #f5f5f5; }    /* bg-soft */
.jd-other-main{ min-width: 0; }
.jd-other-role{
  font-size: 15px;          /* t-row（与 t4-job-role 一致） */
  line-height: 1.4;
  color: #1d1d1f;
  font-weight: 400;
}
.jd-other-loc{
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.4;
  color: #86868b;            /* ink-3 */
}
.jd-other-loc .dot{
  margin: 0 8px;
  color: #d2d2d7;            /* 同 .jp-exp-text::before 的细灰分隔 */
}
.jd-other-arr{
  color: #a1a1a6;            /* ink-4 */
  font-size: 14px;
  text-align: right;
}
.jd-other-row:hover .jd-other-arr{ color: #1d1d1f; }

/* —— 团队回访卡 ——
   外层 .jd-revisit-section 负责段间距 + 顶部 section-title 留白（参考 .jd-others）。
   §1.5：margin-top 72；§1.4：shadow-3 / shadow-hover-3 单层。 */
.jd-revisit-section{ margin-top: 72px; }
.jd-revisit-section > .section-title{ margin: 0 0 24px; }
@media (max-width: 720px){
  .jd-revisit-section{ margin-top: 56px; }
}
.jd-revisit{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 22px;
  background: #ffffff;
  border-radius: 24px;
  corner-shape: squircle;
  -webkit-corner-shape: squircle;
  box-shadow: 0 14px 44px -10px rgba(0,0,0,0.10);   /* shadow-3 */
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.jd-revisit:hover{
  transform: translateY(-1px);
  box-shadow: 0 22px 56px -10px rgba(0,0,0,0.14);   /* shadow-hover-3 */
}
.jd-revisit-logo{
  width: 56px;
  height: 56px;
  border-radius: 16px;
  corner-shape: squircle;
  -webkit-corner-shape: squircle;
  object-fit: cover;
  background: #f5f5f5;                             /* bg-soft */
  box-shadow: inset 0 0 0 0.5px #ececef;           /* line-1 */
}
.jd-revisit-body{ min-width: 0; }
.jd-revisit-name{
  font-size: 17px;          /* t-card-name */
  font-weight: 500;
  color: #1d1d1f;
  letter-spacing: -0.01em;
}
.jd-revisit-tag{
  font-size: 14px;          /* t-meta */
  color: #86868b;
  margin-top: 4px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.jd-revisit-facts{
  margin-top: 8px;
  font-size: 12px;          /* t-caption */
  color: #86868b;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.jd-revisit-facts em{ font-style: normal; color: #1d1d1f; }
.jd-revisit-facts .dot{ color: #d2d2d7; }
/* 右侧 CTA 用 .ft-card-open（28px 圆形 chip + SVG 箭头），样式见 home.css；
   这里只补一句：卡片 hover 时让 chip 跟首页卡片一致地保持静态色调（home.css
   已经写了 .ft-card:hover .ft-card-open 的恒等态，对 .jd-revisit 不生效，所以
   不需要在这里覆写）。 */

/* —— 移动端 (≤ 720)：对齐 team detail 的响应式节奏 ——
   - .jd-page overflow-x: hidden + .jd-main padding-top 76px → 让 hero 不撞固定返回按钮
     （参考 team.css 的 .t4-scroll 处理）
   - .jd-wrap 切到 6.5vw 水平 padding（参考 .t4-doc），左右边距随屏宽缩放，
     与首页 / 团队详情页的窄屏边距保持一致
   - aside / revisit / others 在窄屏收紧 padding 与圆角，避免 22~32px 在小屏上视觉过空 */
@media (max-width: 720px){
  /* padding-bottom 留 180px 给底部固定工具栏让位，免得最后一段内容被盖住 */
  .jd-main{ padding-top: 76px; padding-bottom: 180px; }
  /* .jd-wrap 的 6.5vw 边距规则已在 ≤820 媒体查询里设过，这里不再重复。 */
  .jd-eyebrow{ margin-bottom: 14px; }
  .jd-other-row{ padding: 14px 12px; margin: 0 -12px; }
  .jd-revisit{ padding: 18px; gap: 14px; border-radius: 20px; }
  .jd-revisit-logo{ width: 48px; height: 48px; border-radius: 14px; }

  /* —— Aside 在手机端切换成 Airbnb 式底部工具栏 ——
     招聘负责人在左 / CTA 在右；"48h 回复"提示在窄屏挤不下先隐掉；
     iOS 底部安全区用 env(safe-area-inset-bottom) 补 padding，避免按钮压在 home indicator 上 */
  .jd-aside{
    position: fixed;
    /* 必须显式 top: auto —— 否则基础规则的 sticky 状态留下 top: 24px，
       叠加 bottom: 0 会让 fixed 元素被拉伸成 "从 top:24 到 bottom:0" 的全高条，
       看起来像贴在视口顶部。 */
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    corner-shape: squircle;
    -webkit-corner-shape: squircle;
    box-shadow: 0 -8px 28px -8px rgba(0, 0, 0, 0.15);
  }
  .jd-hm{ flex: 1; min-width: 0; margin: 0; gap: 10px; }
  .jd-hm-avatar{ width: 36px; height: 36px; }
  /* name / role 字号/字重不在窄屏二次缩 —— §1.1 同字号同字重，靠 ink-1/ink-3 分主副 */
  .jd-apply{
    flex-shrink: 0;
    width: auto;
    height: 44px;
    padding: 0 22px;
    min-width: 132px;
  }
  .jd-apply-note{ display: none; }
}

/* —— 返回按钮 ——
   .jp-back-btn 仍在列表页（有 sidebar，需偏移）；
   .jd-back-btn 跟 .t4-back-btn 一致：frosted pill + line-1 细描边，固定左上。 */
.jp-back-btn{
  position: fixed;
  top: 16px;
  left: calc(var(--ai-sb-width, 264px) + 16px);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);          /* shadow-1 */
  color: #1d1d1f;
  font-size: 13px;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.005em;
}
@media (max-width: 900px){
  .jp-back-btn{ left: 12px; }
}

.jd-back-btn{
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid #ececef;          /* line-1（§1.5 允许：吸顶 nav 细线） */
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: transform .2s ease;
}
.jd-back-btn:hover{ transform: scale(0.96); }
