/* ============================================================
   打工换宿指南 — 设计系统
   ============================================================ */
:root {
  --bg: #f7f8f6;
  --surface: #ffffff;

  --ink: #152019;
  --ink-2: #33443a;
  --muted: #5d6c64;
  --muted-2: #83918a;
  --line: #e5eae6;
  --line-strong: #d2dbd4;

  --green-50: #eef7f2;
  --green-100: #d9ecdf;
  --green-600: #2b8a58;
  --green-700: #1d6141;

  --sand: #f5efe4;
  --amber: #a16a2c;
  --amber-50: #fbf2e6;
  --amber-line: #f0dfc6;

  --radius: 16px;
  --radius-sm: 11px;
  --shadow-1: 0 1px 2px rgba(18, 40, 28, .04), 0 2px 8px rgba(18, 40, 28, .04);
  --shadow-2: 0 2px 6px rgba(18, 40, 28, .05), 0 16px 36px rgba(18, 40, 28, .08);
  --header-h: 62px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: calc(var(--header-h) + 18px); }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.68;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: var(--header-h);
}
.brand {
  font-weight: 750; font-size: 16.5px; color: var(--ink);
  display: flex; align-items: center; gap: 9px; white-space: nowrap;
  letter-spacing: -.2px;
}
.brand:hover { text-decoration: none; }
.brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--green-600);
  box-shadow: 0 0 0 4px rgba(43, 138, 88, .13);
  display: inline-block; flex: none;
}
.nav-links {
  display: flex; gap: 4px; font-size: 14px;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  mask-image: linear-gradient(90deg, transparent 0, #000 12px);
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--muted); padding: 7px 11px; border-radius: 8px;
  white-space: nowrap; transition: background .15s, color .15s;
}
.nav-links a:hover { color: var(--green-700); background: var(--green-50); text-decoration: none; }

/* ---------------- hero ---------------- */
.hero { position: relative; padding: 74px 0 8px; }
.hero::before {
  content: ""; position: absolute; z-index: 0;
  top: -220px; left: 50%; transform: translateX(-50%);
  width: 1100px; height: 620px; pointer-events: none;
  background:
    radial-gradient(46% 52% at 26% 46%, rgba(43, 138, 88, .16), transparent 68%),
    radial-gradient(42% 46% at 74% 34%, rgba(161, 106, 44, .11), transparent 66%);
  filter: blur(6px);
}
.hero > * { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 650; letter-spacing: .3px;
  color: var(--green-700); background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 6px 13px; margin-bottom: 20px;
}
.eyebrow i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green-600);
  font-style: normal;
}

.hero h1 {
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.18; letter-spacing: -.02em;
  margin: 0 0 16px; max-width: 17em; font-weight: 800;
}
.hero h1 em {
  font-style: normal; color: var(--green-700);
  background: linear-gradient(transparent 62%, rgba(43, 138, 88, .18) 62%);
  padding: 0 2px;
}
.hero p {
  font-size: 16.5px; color: var(--muted); margin: 0 0 26px; max-width: 660px;
}
.hero-actions { display: flex; gap: 11px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 21px; border-radius: 999px;
  font-size: 14.5px; font-weight: 680; font-family: inherit;
  border: 1px solid transparent; cursor: pointer; line-height: 1.4;
  transition: background .16s, border-color .16s, transform .16s, box-shadow .16s;
}
.btn-primary { background: var(--green-600); color: #fff; box-shadow: 0 2px 10px rgba(43, 138, 88, .22); }
.btn-primary:hover { background: var(--green-700); text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: rgba(255, 255, 255, .9); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--green-600); color: var(--green-700); text-decoration: none; }

/* stats strip */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 34px 0 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-1);
}
.stat { padding: 17px 20px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat b {
  display: block; font-size: 23px; letter-spacing: -.03em;
  font-weight: 780; color: var(--ink); line-height: 1.25;
}
.stat b small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.stat span { font-size: 12.5px; color: var(--muted); }

/* ---------------- sections ---------------- */
.section { padding: 46px 0 6px; }
.section-head { margin-bottom: 20px; }
.section-title {
  font-size: clamp(21px, 2.4vw, 26px); margin: 0;
  letter-spacing: -.015em; font-weight: 760; line-height: 1.35;
}
.section-sub { color: var(--muted); margin: 7px 0 0; font-size: 14.5px; }

/* ---------------- type cards ---------------- */
.type-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 12px;
}
.type-card {
  position: relative; display: block;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 17px 18px 15px;
  text-decoration: none; color: inherit;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.type-card:hover {
  transform: translateY(-3px); border-color: var(--green-600);
  box-shadow: var(--shadow-2); text-decoration: none;
}
.type-card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 720; letter-spacing: -.01em; }
.type-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.type-card .count {
  display: inline-block; margin-top: 12px !important;
  font-size: 12.5px; font-weight: 700; color: var(--green-700);
  background: var(--green-50); border-radius: 999px; padding: 3px 10px;
}

/* ---------------- filters ---------------- */
.filters {
  position: sticky; top: var(--header-h); z-index: 40;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 15px; margin-bottom: 18px; box-shadow: var(--shadow-1);
}
.filters-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#type-chips {
  flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px;
  scrollbar-width: none; -ms-overflow-style: none;
}
#type-chips::-webkit-scrollbar { display: none; }
.chip {
  padding: 6px 13px; border-radius: 999px; font-size: 13.5px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  user-select: none; white-space: nowrap; font-weight: 550;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--green-600); color: var(--green-700); }
.chip.active { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.filters input[type="search"], .filters select {
  padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line);
  font-size: 14px; background: #fff; color: var(--ink); font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.filters input[type="search"]:focus, .filters select:focus {
  outline: none; border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(43, 138, 88, .12);
}
.filters label.check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.filters label.check input { accent-color: var(--green-600); }
.grow { flex: 1; min-width: 180px; }

/* ---------------- library grid ---------------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(315px, 1fr));
  gap: 14px;
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-2); }

.card .top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; margin-bottom: 8px;
}
.card h3 {
  margin: 0; font-size: 17px; font-weight: 720;
  line-height: 1.38; letter-spacing: -.01em;
}
.card .badge {
  flex: none; font-size: 11.5px; font-weight: 650;
  padding: 3px 9px; border-radius: 999px;
  background: var(--green-50); color: var(--green-700);
  white-space: nowrap; line-height: 1.7;
}
.card .meta {
  color: var(--muted); font-size: 12.5px; margin: 0 0 12px;
  line-height: 1.55;
}

.spec { display: grid; gap: 7px; margin: 0; }
.spec > div { display: grid; grid-template-columns: 58px 1fr; gap: 8px; align-items: start; }
.spec dt { color: var(--muted); font-size: 12.5px; line-height: 1.62; }
.spec dd {
  margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.62;
}
.spec dd.fee { font-weight: 700; color: var(--green-700); }

.card .tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  display: inline-block; font-size: 11.5px; color: var(--muted);
  background: #f2f5f3; border-radius: 6px; padding: 2px 8px; line-height: 1.7;
}

.card .foot {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.compare-wrap {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none;
}
.compare-wrap input { accent-color: var(--green-600); }
.site-link {
  font-size: 12.5px; font-weight: 700; color: var(--green-700);
  background: var(--green-50); border-radius: 999px; padding: 6px 13px;
  white-space: nowrap; transition: background .15s, color .15s;
}
.site-link:hover { background: var(--green-600); color: #fff; text-decoration: none; }

.more-wrap { display: flex; justify-content: center; margin-top: 22px; }
#more-btn { min-width: 200px; }
#more-btn[hidden] { display: none; }
.result-count { font-size: 13px; color: var(--muted); margin: 0 0 12px; }

/* ---------------- compare ---------------- */
.compare-bar {
  position: sticky; bottom: 16px; z-index: 45; display: none;
  background: var(--ink); color: #fff; border-radius: 13px;
  padding: 12px 16px; margin: 20px 0;
  align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 10px 30px rgba(12, 30, 20, .24);
}
.compare-bar .labels { font-size: 13.5px; line-height: 1.5; }
.compare-bar .btn { padding: 8px 15px; font-size: 13px; }
.compare-table-wrap { overflow-x: auto; margin-top: 18px; }
table.compare {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; font-size: 13.5px;
}
table.compare th, table.compare td {
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
table.compare th { background: var(--green-50); color: var(--green-700); font-weight: 700; }
table.compare tbody td:first-child { color: var(--muted); white-space: nowrap; font-size: 13px; }
table.compare tr:last-child td { border-bottom: none; }

/* ---------------- accordions (guides / pitfalls) ---------------- */
.acc-list { display: grid; gap: 10px; }
.acc {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.acc[open] { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.acc summary {
  cursor: pointer; list-style: none;
  padding: 15px 18px; display: flex; align-items: center;
  justify-content: space-between; gap: 14px;
  font-weight: 700; font-size: 15.5px; letter-spacing: -.01em;
  color: var(--ink);
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { background: #fbfcfb; }
.acc summary .n {
  margin-left: auto; font-size: 12px; font-weight: 650; color: var(--green-700);
  background: var(--green-50); border-radius: 999px; padding: 2px 10px; white-space: nowrap;
}
.acc summary::after {
  content: ""; flex: none; width: 7px; height: 7px; margin-top: -3px;
  border-right: 2px solid var(--muted-2); border-bottom: 2px solid var(--muted-2);
  transform: rotate(45deg); transition: transform .2s ease;
}
.acc[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.acc-body { padding: 4px 18px 18px; }
.acc-body .lead { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.acc-body ul { margin: 0; padding-left: 19px; }
.acc-body li { margin: 7px 0; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.acc-body li b { color: var(--ink); font-weight: 700; }

/* pitfalls */
.pit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.pit {
  background: var(--amber-50); border: 1px solid var(--amber-line);
  border-radius: 12px; overflow: hidden;
}
.pit summary {
  cursor: pointer; list-style: none; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 700; font-size: 14px; color: var(--amber);
}
.pit summary::-webkit-details-marker { display: none; }
.pit summary::after {
  content: ""; flex: none; width: 6px; height: 6px; margin-top: -2px;
  border-right: 2px solid #c99a63; border-bottom: 2px solid #c99a63;
  transform: rotate(45deg); transition: transform .2s;
}
.pit[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.pit .pit-body { padding: 0 16px 13px; font-size: 13px; line-height: 1.65; color: #6b4b25; }

/* ---------------- footer ---------------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 48px;
  padding: 40px 0 56px; color: var(--muted); font-size: 13px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .6));
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px;
  margin-bottom: 26px;
}
.footer-grid h4 {
  margin: 0 0 10px; font-size: 13px; font-weight: 700;
  color: var(--ink); letter-spacing: .2px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 6px 0; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--green-700); }
.footer-grid p { margin: 0; line-height: 1.7; max-width: 34em; }
.footer-brand {
  font-weight: 750; color: var(--ink); font-size: 15px;
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.footer-brand .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--green-600);
}
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 18px;
  font-size: 12.5px; color: var(--muted-2);
}
.disclaimer {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 17px;
  font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 26px;
}

/* back to top */
#to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-1); color: var(--ink); cursor: pointer;
  display: none; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; transition: transform .16s, border-color .16s;
}
#to-top.show { display: flex; }
#to-top:hover { transform: translateY(-2px); border-color: var(--green-600); }

/* ---------------- guides grid ---------------- */
.guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 13px; }
.guide-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 19px; color: inherit; text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.guide-card:hover { transform: translateY(-3px); border-color: var(--green-600); box-shadow: var(--shadow-2); text-decoration: none; }
.guide-card h3 { margin: 0 0 8px; font-size: 16.5px; line-height: 1.42; font-weight: 720; letter-spacing: -.01em; }
.guide-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.guide-card .count {
  font-size: 12.5px; color: var(--green-700); font-weight: 700; margin-top: 13px !important;
}

/* ---------------- article page ---------------- */
.article { max-width: 740px; padding: 46px 0 10px; }
.article h1 {
  font-size: clamp(26px, 3.4vw, 34px); line-height: 1.28;
  margin: 0 0 14px; letter-spacing: -.02em; font-weight: 800;
}
.article-meta {
  color: var(--muted); font-size: 13px; margin: 0 0 20px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.article .lead { font-size: 16.5px; color: var(--ink-2); margin: 0 0 30px; line-height: 1.75; }
.article-sec { margin-bottom: 30px; }
.article-sec h2 {
  font-size: 21px; margin: 0 0 12px; padding-left: 12px;
  border-left: 3px solid var(--green-600); line-height: 1.4;
  letter-spacing: -.01em; font-weight: 750;
}
.article-sec p { margin: 0 0 13px; font-size: 15.5px; line-height: 1.78; }
.article-sec ul { margin: 0 0 13px; padding-left: 20px; }
.article-sec li { margin: 8px 0; font-size: 15.5px; line-height: 1.75; }
.faq { margin: 0; }
.faq dt { font-weight: 700; font-size: 15.5px; margin-top: 16px; color: var(--ink); }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 5px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.75; }
.cta-box {
  background: linear-gradient(160deg, #f0f9f3, #eaf4ee);
  border: 1px solid #cfe7d8; border-radius: var(--radius);
  padding: 26px; text-align: center; margin: 34px 0;
}
.cta-box h3 { margin: 0 0 7px; font-size: 18px; letter-spacing: -.01em; }
.cta-box p { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; }

/* 文章来源与核实说明（可信度信号，同时给读者交代数据出处） */
.src-note {
  margin: 34px 0 0; padding: 20px 22px;
  background: #faf9f5; border: 1px solid #ece7db; border-radius: var(--radius-sm, 10px);
  font-size: 13.5px; line-height: 1.75; color: var(--muted);
}
.src-note h3 { margin: 0 0 8px; font-size: 15px; color: var(--ink); letter-spacing: -.01em; }
.src-note p { margin: 0 0 8px; }
.src-note p:last-child { margin-bottom: 0; }
.src-note b { color: var(--ink); }

/* ---------------- responsive ---------------- */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 46px 0 4px; }
  .hero p { font-size: 15.5px; }
  .section { padding: 36px 0 4px; }
  .grid { grid-template-columns: 1fr; }
  .pit-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .nav-links { font-size: 13px; }
  .nav-links a { padding: 6px 8px; }
  .filters { padding: 11px 12px; }
  .article h1 { font-size: 25px; }
  .article-sec h2 { font-size: 19px; }
  .compare-bar { flex-direction: column; align-items: stretch; gap: 9px; }
  .compare-bar .labels { font-size: 12.5px; }
  .stat b { font-size: 20px; }
}
