/* 伯周 — phone-first prototype. Flat colour, no gradients. Colours live here. */
:root {
  /* 伯周咨询: neutral greys and blue actions from their workspace (bozhou.nevatown.cn), red from the logo for brand moments */
  --bg: #f7f7f7; --card: #fff; --ink: #242424; --ink-2: #525252; --ink-3: #7a7a7a; --line: #e5e5e5;
  --brand: #d91f2b; --acc: #3972d2; --acc-ink: #fff; --acc-soft: #e8effb; --deep: #2a4f94;
  --ok: #176f47; --ok-soft: #eaf4ee;
  --amber: #78500c; --amber-soft: #fff4d6; --red: #b42335; --red-soft: #fcecef; --grey-soft: #ebebeb;
  --ease: cubic-bezier(.2, .7, .2, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink); font-size: 15px; line-height: 1.55;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; background: var(--bg); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, p { margin: 0; }

#app { height: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; }
#view { flex: 1; overflow-y: auto; padding: 18px 16px 28px; scrollbar-width: none; }
#view::-webkit-scrollbar { display: none; }
#view > * { animation: rise .32s var(--ease) both; }
#view.still > * { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* tab bar */
#tabs { position: relative; z-index: 2; display: flex; background: var(--card); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
#tabs[hidden] { display: none; }
#tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink-3); padding: 4px 0; }
#tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#tabs button[aria-current="page"] { color: var(--acc); font-weight: 600; }
#tabs .mid i { width: 42px; height: 42px; margin-top: -18px; border-radius: 50%; font-size: 0; background: #f8f8f8 url(img/icon.png) center / 74% no-repeat;
  box-shadow: 0 0 0 1px var(--line), 0 0 0 5px var(--card); }
#tabs .mid[aria-current="page"] i { box-shadow: 0 0 0 2px var(--acc), 0 0 0 5px var(--card); }

/* type */
.eyebrow { font-size: 12px; color: var(--ink-3); letter-spacing: .06em; }
.h1 { font-size: 24px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.h2 { font-size: 16px; font-weight: 600; margin: 26px 0 10px; display: flex; justify-content: space-between; align-items: baseline; }
.h2 small, .link { font-size: 13px; font-weight: 400; color: var(--acc); }
.muted { color: var(--ink-2); font-size: 13px; }
.tiny { color: var(--ink-3); font-size: 12px; }

.top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; min-height: 32px; }
.top .h1 { flex: 1; }
.back { width: 32px; height: 32px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 18px; flex: none; }
.top .ttl { flex: 1; font-weight: 600; }
.mark { width: 36px; height: 36px; border-radius: 50%; flex: none; font-size: 0; background: #f8f8f8 url(img/icon.png) center / 74% no-repeat; box-shadow: 0 0 0 1px var(--line); }
.mark.s { width: 26px; height: 26px; }

/* surfaces */
.card { background: var(--card); border-radius: 16px; padding: 14px; }
.card + .card { margin-top: 10px; }
button.card, a.card { display: block; width: 100%; text-align: left; }
button.card.cand { display: flex; }
.brief { background: var(--brand); color: #fff; border-radius: 20px; padding: 18px; }
.brief p { font-size: 17px; line-height: 1.55; margin: 10px 0 16px; }
.brief p b { font-weight: 700; }
.brief .who { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255, 255, 255, .88); }
.brief .mark { box-shadow: none; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.stat { background: var(--card); border-radius: 14px; padding: 12px; }
.stat b { display: block; font-size: 22px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--ink-2); }
.stat.hot { background: var(--amber-soft); }
.stat.hot b { color: var(--amber); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: var(--grey-soft); color: var(--ink); transition: transform .12s var(--ease); white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn.pri { background: var(--acc); color: var(--acc-ink); }
.btn.light { background: #fff; color: var(--ink); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* tags & chips */
.tag { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--grey-soft); color: var(--ink-2); white-space: nowrap; }
.tag.rec { background: var(--acc-soft); color: var(--acc); }
.tag.onsite { background: var(--ok-soft); color: var(--ok); }
.tag.interview, .tag.warn { background: var(--amber-soft); color: var(--amber); }
.tag.out { background: var(--red-soft); color: var(--red); }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--card); font-size: 13px; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chip.pick { background: var(--card); border: 1px solid var(--line); white-space: normal; text-align: left; border-radius: 12px; }
.chip.pick[aria-pressed="true"] { background: var(--acc-soft); border-color: var(--acc); color: var(--deep); }

/* candidate rows */
.cand { display: flex; gap: 12px; align-items: center; }
.cand .name { font-weight: 600; }
.cand .one { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ring { flex: none; position: relative; display: grid; place-items: center; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring circle { fill: none; stroke-width: 3.2; }
.ring .bg { stroke: var(--grey-soft); }
.ring .fg { stroke: var(--acc); stroke-linecap: round; }
.ring.mid .fg { stroke: #c9962b; }
.ring.low .fg { stroke: var(--ink-3); }
.ring b { position: absolute; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ring.big b { font-size: 26px; }
.ring.big small { position: absolute; top: 62%; font-size: 10px; color: var(--ink-3); }
.decide { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* job rows + funnel */
.job .t { font-weight: 600; }
.funnel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 12px; }
.funnel div { background: var(--bg); border-radius: 10px; padding: 7px 4px; text-align: center; }
.funnel b { display: block; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.funnel span { font-size: 10.5px; color: var(--ink-2); }
.funnel .on { background: var(--acc-soft); }
.funnel .on b { color: var(--acc); }

/* feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 9px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.feed li:last-child { border: 0; }
.feed time { flex: none; width: 40px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 12px; padding-top: 1px; }

/* candidate detail */
.hero { display: flex; gap: 14px; align-items: center; }
.hero .h1 { font-size: 22px; }
.say { background: var(--card); color: var(--ink); border-left: 3px solid var(--brand); border-radius: 16px; padding: 14px; margin-top: 14px; }
.say .who { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 6px; color: var(--brand); font-weight: 600; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list li:last-child { border: 0; padding-bottom: 0; }
.list li:first-child { padding-top: 0; }
.list small { display: block; color: var(--ink-2); font-size: 12.5px; }
.ic { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; margin-top: 1px; }
.ic.y { background: var(--ok-soft); color: var(--ok); }
.ic.p { background: var(--amber-soft); color: var(--amber); }
.ic.n { background: var(--red-soft); color: var(--red); }
.dim { display: grid; grid-template-columns: 76px 1fr 28px; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.dim i { display: block; height: 6px; border-radius: 3px; background: var(--grey-soft); overflow: hidden; }
.dim i u { display: block; height: 100%; background: var(--acc); border-radius: 3px; }
.dim b { text-align: right; font-variant-numeric: tabular-nums; }
.qa { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
.qa .q { color: var(--ink-2); }
.qa .a { margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--acc); }
.actions { position: sticky; bottom: -28px; z-index: 1; margin: 22px -16px -28px; padding: 12px 16px 14px; background: var(--bg); border-top: 1px solid var(--line); display: flex; gap: 8px; }
.actions .btn { flex: 1; padding-left: 8px; padding-right: 8px; }
.banner { border-radius: 14px; padding: 12px 14px; font-size: 13.5px; margin-top: 12px; background: var(--amber-soft); color: var(--amber); }
.banner.ok { background: var(--ok-soft); color: var(--ok); }
.banner.bad { background: var(--red-soft); color: var(--red); }

/* forms */
textarea, input[type="text"] { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 12px 14px; outline: none; resize: none; }
textarea:focus, input[type="text"]:focus { border-color: var(--acc); }
.set { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.set:last-child { border: 0; padding-bottom: 0; }
.set:first-child { padding-top: 0; }
.set small { display: block; color: var(--ink-2); font-size: 12.5px; line-height: 1.45; }
.sw { flex: none; width: 44px; height: 26px; border-radius: 13px; background: #c9c9c9; position: relative; transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.sw[aria-checked="true"] { background: var(--acc); }
.sw[aria-checked="true"]::after { transform: translateX(18px); }
.sw[disabled] { opacity: .55; }
input[type="range"] { width: 100%; accent-color: var(--acc); margin: 10px 0 2px; }

/* chat */
.chat { display: flex; flex-direction: column; height: 100%; }
#view.flush { padding: 0; overflow: hidden; }
.chat .top { padding: 18px 16px 0; margin-bottom: 8px; }
.log { flex: 1; overflow-y: auto; padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: none; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: 14.5px; animation: rise .25s var(--ease) both; }
.msg.bz { background: var(--card); align-self: flex-start; border-bottom-left-radius: 6px; }
.msg.me { background: var(--acc); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.msg p + p { margin-top: 8px; }
.msg .btn { margin-top: 10px; }
.msg table { border-collapse: collapse; width: 100%; font-size: 13px; margin-top: 8px; }
.msg th, .msg td { text-align: left; padding: 5px 6px 5px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.msg th { font-weight: 600; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: blink 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.suggest { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 8px; scrollbar-width: none; }
.composer { display: flex; gap: 8px; padding: 8px 16px 12px; background: var(--bg); }
.composer input { border-radius: 999px; }
.composer .btn { width: 44px; height: 44px; padding: 0; flex: none; }

/* welcome */
.welcome { min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 12px 8px; }
.welcome .logo { height: 52px; width: auto; align-self: flex-start; }
.welcome h1 { font-size: 30px; line-height: 1.3; font-weight: 600; }
.welcome h1 em { font-style: normal; color: var(--brand); }
.welcome ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.welcome li { display: flex; gap: 12px; font-size: 14.5px; }
.welcome li b { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; font-size: 12px; }

/* JD draft */
.jd h3 { font-size: 13px; color: var(--ink-3); font-weight: 500; margin: 14px 0 4px; }
.jd h3:first-child { margin-top: 0; }
.jd ul { margin: 0; padding-left: 18px; font-size: 14px; }
.typing { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; }
.empty { text-align: center; color: var(--ink-2); font-size: 14px; padding: 28px 12px; }

/* bottom sheet + toast */
#sheet { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 10; animation: fade .2s both; }
#sheet[hidden] { display: none; }
#sheet .body { width: 100%; max-width: 480px; max-height: 88%; overflow-y: auto; background: var(--bg); border-radius: 22px 22px 0 0; padding: 20px 16px 18px; animation: up .28s var(--ease) both; }
#sheet h2 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
#sheet .picks { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
#sheet .picks.inline { flex-direction: row; flex-wrap: wrap; }
#sheet .letter { background: var(--card); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
#toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 13.5px; padding: 10px 16px; border-radius: 999px;
  z-index: 20; max-width: 88%; text-align: center; animation: rise .25s var(--ease) both; }
#toast[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- candidate-facing (to C) additions ---------- */
.tag.gift { background: var(--amber-soft); color: var(--amber); margin-top: 6px; }
.promo { display: flex !important; align-items: center; gap: 10px; margin-top: 10px; background: var(--amber-soft); }
.promo b, .promo .muted { display: block; }
.promo .muted { color: var(--amber); }
.go { color: var(--ink-3); font-size: 20px; flex: none; }
button.banner { display: block; width: 100%; text-align: left; }
.banner.gift b { font-weight: 700; }
.ic.num { background: var(--grey-soft); color: var(--ink-2); }
.bul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.steps { display: flex; gap: 4px; margin: 12px 0 8px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--grey-soft); }
.steps .done { background: var(--acc); }
.steps .now { background: var(--acc); opacity: .45; }
.reward { margin-top: 8px; font-size: 13px; color: var(--amber); }
.reward b { font-size: 16px; }
.reward.paid { color: var(--ok); }
.sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 16px; }
.sum b { display: block; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sum span { font-size: 12px; opacity: .88; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 34px 16px; border: 1.5px dashed var(--acc); border-radius: 16px; background: var(--acc-soft); cursor: pointer; }
.drop b { color: var(--acc); font-size: 16px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fields .wide { grid-column: 1 / -1; }
.field span { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.field input { padding: 9px 12px; border-radius: 10px; }
.seg { display: flex; background: var(--grey-soft); border-radius: 12px; padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; padding: 8px; border-radius: 10px; font-size: 14px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; margin: 14px 0 16px; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--acc); }
.mark.you { background: var(--acc-soft); color: var(--acc); font-size: 16px; font-weight: 600; display: grid; place-items: center; width: 44px; height: 44px; box-shadow: none; }
#sheet .letter b { color: var(--ink); }
.msg .btn.light { background: var(--grey-soft); }
