/* ==========================================================================
   伴行 BANXING · 社区陪伴服务
   设计语言：中性留白 + 静蓝主色 + 细分隔线，弱装饰、强秩序
   ========================================================================== */

:root {
  --ink: #161f29;
  --text: #485460;
  --muted: #7d8794;
  --line: #e8ecf1;
  --line-strong: #d8dee7;
  --bg: #ffffff;
  --soft: #f7f9fc;
  --soft-2: #f1f5fa;

  --brand: #2f6aa8;
  --brand-600: #24578c;
  --brand-700: #193f6b;
  --brand-50: #f2f6fb;
  --brand-100: #e1ebf6;
  /* 卡片渐变：131° 方向，左上深 → 右下浅（光源来自右下），亮端不过分发白以保证白字可读 */
  --brand-grad: linear-gradient(131deg, #1d5cba 0%, #2f83db 46%, #6fbdf6 100%);
  --brand-grad-hover: linear-gradient(131deg, #2368c8 0%, #3690e6 46%, #7dc8fa 100%);
  /* 服务卡片立体投影：四层叠加，近处贴地、远处扩散，避免单层大阴影发灰 */
  --card-shadow: 0 1px 1px rgba(15, 45, 90, .06),
                 0 6px 12px -4px rgba(21, 74, 140, .16),
                 0 18px 34px -14px rgba(21, 74, 140, .26),
                 0 34px 60px -30px rgba(21, 74, 140, .32);
  --card-shadow-hover: 0 2px 2px rgba(15, 45, 90, .07),
                       0 10px 18px -6px rgba(21, 74, 140, .20),
                       0 26px 44px -16px rgba(21, 74, 140, .30),
                       0 46px 76px -32px rgba(21, 74, 140, .38);
  --green: #1f9e6e;

  --accent: #a9754c;
  --accent-soft: #fbf4ee;

  --radius: 14px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  --shadow-sm: 0 1px 2px rgba(22, 31, 41, .05);
  --shadow-md: 0 12px 32px -18px rgba(22, 31, 41, .26);
  --shadow-lg: 0 24px 60px -30px rgba(22, 31, 41, .33);

  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei",
          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* 标题用宋体衬线：纤细、有笔锋，接近印刷品气质 */
  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC",
           "Noto Serif CJK SC", "SimSun", ui-serif, Georgia, serif;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

/* 入场动画会短暂把文字/照片推出画布，在 html 上裁掉横向溢出；
   注意不能写 body：body 的 overflow 会传播到视口从而导致自身不裁切，仍会出现横向滚动条。
   clip 不建立滚动容器，sticky 头部不受影响。 */
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  font: 400 1rem/1.75 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0;
}
p { margin: 0 0 1em; }
img, svg { max-width: 100%; }

.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

/* ---------------- 顶栏 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 74px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }

.brand-mark {
  display: block;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  object-fit: contain;
  transition: transform .35s cubic-bezier(.22,.61,.36,1);
}
.brand:hover .brand-mark { transform: translateY(-1px) scale(1.04); }

.brand-text { display: flex; align-items: baseline; gap: 10px; }
.brand-text b {
  font-family: var(--serif);
  font-size: 1.3125rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .08em;
}
.brand-text i {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--muted);
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  letter-spacing: .06em;
}

.main-nav { display: flex; align-items: center; gap: 6px; }

.main-nav a {
  position: relative;
  padding: 8px 14px;
  font-size: 0.9375rem;
  color: var(--text);
  border-radius: var(--radius-xs);
  transition: color .18s, background .18s;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.main-nav a:hover { color: var(--brand); }
.main-nav a:hover::after,
.main-nav a.on::after { transform: scaleX(1); }
.main-nav a.on { color: var(--brand); font-weight: 600; }

.header-tools { display: flex; align-items: center; gap: 10px; }
#auth { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#auth button { height: 38px; padding: 0 16px; font-size: 0.875rem; border-radius: var(--radius-xs); }
#auth .nav-quiet { height: 38px; display: inline-flex; align-items: center; }
.who { font-size: 0.875rem; font-weight: 600; color: var(--green); white-space: nowrap; }

.nav-quiet {
  font-size: 0.8438rem;
  color: var(--muted);
  padding: 0 4px;
  white-space: nowrap;
  transition: color .18s;
}
.nav-quiet:hover { color: var(--brand); }

/* 页面标题区 */
.page-head { padding: 56px 0 34px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.page-head h1 { margin: 14px 0 10px; }
.page-head h1:first-child { margin-top: 0; }
.page-head > p { margin: 0; max-width: 640px; }
.page-head .actions { margin-top: 26px; }

/* ---------------- 按钮 ---------------- */
button, .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s, transform .18s;
}
button:hover, .pill:hover { border-color: #c2ccc5; background: var(--soft); }
button:active, .pill:active { transform: translateY(1px); }
button:disabled { opacity: .6; cursor: default; }

button.primary, .pill.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}
button.primary:hover, .pill.primary:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  box-shadow: 0 10px 22px -12px rgba(21, 58, 100, .75);
}

button.orange, .pill.orange {
  background: #fff;
  border-color: rgba(255, 255, 255, .5);
  color: var(--ink);
  font-weight: 600;
}
button.orange:hover, .pill.orange:hover { background: #fff; border-color: #fff; }

.btn-quiet {
  height: 34px;
  padding: 0 12px;
  font-size: 0.8125rem;
  color: var(--text);
  background: transparent;
  border-color: var(--line);
}
.btn-quiet:hover { color: var(--brand); border-color: var(--brand-100); background: var(--brand-50); }
/* 大字模式开启态：按钮本身给个明确的"已启用"反馈 */
.btn-quiet.on { color: #fff; background: var(--brand); border-color: var(--brand); }
.btn-quiet.on:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 0; }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--brand);
  white-space: nowrap;
}
.link-more::after { content: "→"; transition: transform .2s; }
.link-more:hover::after { transform: translateX(3px); }

/* ---------------- 布局 ---------------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 32px 96px; }

main h1 {
  font-size: clamp(1.875rem, 3.4vw, 2.625rem);
  line-height: 1.3;
  margin: 56px 0 12px;
}
main h1 + .muted { margin-bottom: 8px; }
main h2 { font-size: clamp(1.4375rem, 2.4vw, 1.875rem); line-height: 1.35; margin: 56px 0 20px; }
main h3 { font-size: 1.0625rem; line-height: 1.5; margin: 0 0 6px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.muted { color: var(--muted); }

/* ---------------- 首屏 ---------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .88fr);
  gap: 64px;
  align-items: center;
  padding: 76px 0 84px;
}

.hero h1 {
  font-size: clamp(2.375rem, 4.4vw, 3.625rem);
  line-height: 1.28;
  letter-spacing: .01em;
  font-weight: 500;
  margin: 22px 0 24px;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand);
}

.hero > div > p {
  max-width: 460px;
  font-size: 1.0312rem;
  font-weight: 400;
  line-height: 1.95;
  color: var(--text);
}

/* 首屏入场：文字自左向右滑入，照片自右向左滑入（错峰，避免一起弹出来） */
@keyframes hero-in-right {
  from { opacity: 0; transform: translate3d(-84px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes hero-in-left {
  from { opacity: 0; transform: translate3d(120px, 0, 0) scale(.97); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
.hero > div > * {
  animation: hero-in-right 1s cubic-bezier(.22, .61, .36, 1) both;
}
.hero > div > :nth-child(1) { animation-delay: .04s; }
.hero > div > :nth-child(2) { animation-delay: .12s; }
.hero > div > :nth-child(3) { animation-delay: .20s; }
.hero > div > :nth-child(4) { animation-delay: .28s; }
.hero > div > :nth-child(5) { animation-delay: .36s; }
.hero > .hero-media {
  animation: hero-in-left 1.18s cubic-bezier(.22, .61, .36, 1) .16s both;
}

.hero .actions { margin-top: 34px; }
.hero .actions .pill { height: 48px; padding: 0 26px; font-size: 0.9688rem; }

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.8438rem;
  color: var(--muted);
}
.trust span { display: inline-flex; align-items: center; gap: 7px; }

/* 首屏视觉 */
.hero-media { margin: 0; }

.art {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, #eef4fb 0%, #e3ecf7 55%, #e9f0fa 100%);
  height: 452px;
  border: 1px solid rgba(22, 31, 41, .05);
}
.art svg { display: block; width: 100%; height: 100%; }
.art-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transform: scale(1.001);
}

.art-note {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 2px 0;
  font-size: 0.8125rem;
  color: var(--muted);
}
.art-note strong { color: var(--ink); font-weight: 600; font-size: 0.875rem; }

/* ---------------- 服务卡片 ---------------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 { margin: 12px 0 0; }
.section-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.section-top h2 { margin: 12px 0 0; }
.section-top > a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--brand);
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* 服务卡片：蓝色渐变底 + 立体投影 + 斜向白光扫过（无描边，靠阴影与底色分层） */
.grid > .card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--brand-grad);
  border: 0;
  padding: 27px 25px 23px;
  box-shadow: var(--card-shadow);
  transition: box-shadow .3s, transform .3s, background .3s;
}
.grid > .card > * { position: relative; z-index: 2; }
.grid > .card::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: -55%;
  bottom: -55%;
  left: 0;
  width: 42%;
  background: linear-gradient(100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, .14) 34%,
    rgba(255, 255, 255, .46) 50%,
    rgba(255, 255, 255, .14) 66%,
    rgba(255, 255, 255, 0) 100%);
  transform: translateX(-170%) skewX(-16deg);
  animation: card-sheen 6.5s cubic-bezier(.35, .6, .35, 1) infinite;
  pointer-events: none;
}
.grid > .card:hover {
  background: var(--brand-grad-hover);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-4px);
}
.grid > .card:hover::after { animation-duration: 2.4s; }

@keyframes card-sheen {
  0%   { transform: translateX(-170%) skewX(-16deg); opacity: 0; }
  7%   { opacity: 1; }
  52%  { transform: translateX(360%) skewX(-16deg); opacity: 1; }
  63%  { opacity: 0; }
  100% { transform: translateX(360%) skewX(-16deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .grid > .card::after { animation: none; opacity: 0; }
  .hero > div > *,
  .hero > .hero-media { animation: none; }
}

.grid > .card h3 { color: #fff; text-shadow: 0 1px 3px rgba(9, 40, 80, .28); }
.grid > .card p { color: rgba(255, 255, 255, .97); font-weight: 500; text-shadow: 0 1px 2px rgba(9, 40, 80, .26); }
.grid > .card .muted { color: rgba(255, 255, 255, .9); }

.icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--brand);
}
/* 白底圆形图标片：柔和投影 + 极细内描边，图标为扁平渐变的 PNG 插画（brand/icons/） */
.icon-img {
  display: block;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  box-shadow:
    inset 0 0 0 1px rgba(22, 31, 41, .06),
    0 10px 22px -12px rgba(22, 31, 41, .42),
    0 2px 5px -2px rgba(22, 31, 41, .10);
  transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s;
}
.card:hover .icon-img {
  transform: translateY(-3px);
  box-shadow:
    inset 0 0 0 1px rgba(22, 31, 41, .06),
    0 16px 26px -12px rgba(22, 31, 41, .4),
    0 3px 7px -2px rgba(22, 31, 41, .10);
}

.card h3 { margin: 0 0 8px; font-size: 1.125rem; font-weight: 500; letter-spacing: .01em; }
.card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--muted);
  min-height: 50px;
}
.card .muted { display: block; margin-top: auto; padding-top: 18px; font-size: 0.8438rem; }
.card > button, .card > .primary {
  width: 100%;
  height: 40px;
  margin-top: 18px;
  font-size: 0.9062rem;
  color: var(--brand);
  background: #fff;
  border-color: var(--brand-100);
  font-weight: 600;
}
.card > button:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 10px 20px -12px rgba(21, 58, 100, .8);
}
/* 渐变卡片里的按钮：白底蓝字，和深底拉开对比 */
.grid > .card > button,
.grid > .card > .primary {
  border-color: transparent;
  color: var(--brand-700);
  box-shadow: 0 10px 20px -14px rgba(10, 28, 52, .9);
}
.grid > .card > button:hover {
  background: #f2f7fd;
  border-color: transparent;
  color: var(--brand-600);
  box-shadow: 0 14px 24px -14px rgba(10, 28, 52, .85);
}

/* ---------------- 公益横幅 ---------------- */
.banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin: 72px 0;
  padding: 46px 52px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, .07) 0%, transparent 55%),
    linear-gradient(115deg, var(--brand-700) 0%, var(--brand) 62%, #21528a 100%);
  color: #fff;
  overflow: hidden;
}
.banner > div { position: relative; z-index: 1; max-width: 640px; }
.banner span,
.banner .eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}
.banner .eyebrow::before { background: rgba(255, 255, 255, .5); }
.banner h1, .banner h2 {
  margin: 12px 0 12px;
  color: #fff;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.35;
}
.banner p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 0.9375rem; }
.banner > a, .banner button { position: relative; z-index: 1; flex-shrink: 0; }
.banner > div > button, .banner > div > .pill { margin-top: 22px; }
.banner > div > button.orange { background: #fff; border-color: #fff; color: var(--brand-700); height: 44px; padding: 0 22px; }
.banner > div > button.orange:hover { background: #f2f7fd; }
.banner > a.pill { height: 46px; padding: 0 24px; }
.banner > span:last-child { font-size: 96px; line-height: 1; opacity: .13; }

/* ---------------- 流程 ---------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
.steps article {
  padding: 34px 32px 0 0;
  border-right: 1px solid var(--line);
}
.steps article:last-child { border-right: 0; padding-right: 0; }
.steps article + article { padding-left: 32px; }
.steps span {
  display: block;
  margin-bottom: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--accent);
}
.steps h3 { font-size: 1.1875rem; font-weight: 500; margin: 0 0 9px; }
.steps p { margin: 0; font-size: 0.875rem; }

/* ---------------- 统计 ---------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 32px 0 8px;
}
.stats .card {
  padding: 26px 26px 24px;
  font-size: 0.8438rem;
  color: var(--muted);
}
.stats b {
  display: block;
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--ink);
  font-feature-settings: "tnum";
}

/* ---------------- 列表 / 订单 ---------------- */
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px;
  margin: 0 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.row:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.row > div:first-child { min-width: 0; }
.row h3 { margin: 10px 0 5px; font-size: 1.0625rem; font-weight: 500; letter-spacing: .01em; }
.row .muted { font-size: 0.875rem; }
.row small { display: block; margin-top: 6px; color: #61726a; font-size: 0.8438rem; line-height: 1.7; }
.row > div:last-child { display: flex; gap: 10px; flex-shrink: 0; }
.row button { height: 38px; padding: 0 16px; font-size: 0.875rem; }

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--radius-xs);
  font-size: 0.7812rem;
  font-weight: 600;
  letter-spacing: .01em;
  background: var(--soft-2);
  color: #4d6157;
}
.badge.warn { background: #fdf3e3; color: #9a6420; }
.badge.info { background: #eef4f9; color: #2f6383; }
.badge.cyan { background: #eaf5f5; color: #2b6f6f; }
.badge.blue { background: #edf2fb; color: #33578f; }
.badge.purple { background: #f2effb; color: #5a4a90; }
.badge.green { background: var(--brand-50); color: var(--brand); }
.badge.gray { background: #f1f3f2; color: #66766d; }

.review {
  margin-top: 10px;
  padding: 12px 16px;
  background: var(--soft);
  border-left: 2px solid var(--brand-100);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-size: 0.8438rem;
  color: var(--text);
}
.review b { color: var(--ink); }

.empty {
  padding: 72px 32px;
  text-align: center;
  background: var(--soft);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty h3 { margin: 0 0 6px; font-size: 1.0625rem; font-weight: 500; }
.empty p { margin: 0; font-size: 0.875rem; }

.notice {
  margin: 20px 0;
  padding: 14px 18px;
  background: var(--accent-soft);
  border: 1px solid #f2e6d9;
  border-radius: var(--radius-sm);
  font-size: 0.8438rem;
  color: #8a6544;
}

/* ---------------- 筛选 ---------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.filters button {
  height: 34px;
  padding: 0 14px;
  font-size: 0.8438rem;
  color: var(--text);
  background: #fff;
  border-color: var(--line);
  border-radius: 999px;
}
.filters button:hover { background: var(--soft); border-color: var(--line-strong); }
.filters button.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}
.filters button i {
  font-style: normal;
  margin-left: 6px;
  font-size: 0.75rem;
  opacity: .68;
}

/* ---------------- 工作台 ---------------- */
.dashboard {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding-top: 48px;
}

.sidebar {
  position: sticky;
  top: 106px;
  padding: 22px 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sidebar h3 {
  margin: 0 0 14px;
  padding: 0 10px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar a {
  display: block;
  padding: 10px 12px;
  margin-bottom: 2px;
  border-radius: var(--radius-xs);
  font-size: 0.9062rem;
  color: var(--text);
  cursor: pointer;
  transition: background .16s, color .16s;
}
.sidebar a:hover { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.sidebar a.on {
  background: #fff;
  color: var(--brand);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--brand), var(--shadow-sm);
}
.sidebar a:last-child {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8438rem;
}
.dashboard > section { min-width: 0; }
.dashboard > section > h1 { margin-top: 0; font-size: clamp(1.625rem, 2.8vw, 2.125rem); }
.dashboard > section > h2:first-child { margin-top: 0; }
.dashboard > section > h2 { margin-top: 44px; }

/* ---------------- 弹窗 / 表单 ---------------- */
dialog {
  width: min(540px, 92vw);
  padding: 34px 36px 32px;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow-lg);
  /* 大字模式下表单会变高，超出视口时内部滚动，避免内容被裁掉 */
  max-height: min(88vh, 900px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
dialog::backdrop { background: rgba(15, 30, 25, .45); backdrop-filter: blur(2px); }
dialog h2 { margin: 0 0 6px; font-size: 1.4375rem; font-weight: 500; }
dialog p { font-size: 0.875rem; }
dialog .notice { margin: 16px 0 4px; }
/* 弹窗内联报错：必须贴着表单出现，用户才能立刻知道为什么没提交成功 */
.form-error {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  border: 1px solid #f3d5cd;
  background: #fdf2ef;
  color: #b23c28;
  font-size: 0.8438rem;
  line-height: 1.6;
}
.form-error[hidden] { display: none; }

label {
  display: block;
  margin: 18px 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}
label > span { display: block; }

input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 11px 13px;
  font: inherit;
  font-size: 0.9062rem;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 58, 100, .12);
}
textarea { min-height: 92px; resize: vertical; line-height: 1.7; }
dialog .actions { margin-top: 26px; }
dialog .actions + p { margin: 16px 0 0; }
dialog .muted a { color: var(--brand); font-weight: 500; }

/* ---------------- 页脚 ---------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--soft);
  padding: 48px 0 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr auto 1.4fr;
  gap: 40px;
  align-items: start;
}
.footer-brand { display: grid; gap: 8px; }
.footer-brand strong {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--ink);
}
.footer-brand span { font-size: 0.8438rem; color: var(--muted); }

.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 0.8438rem; }
.footer-nav a { color: var(--text); }
.footer-nav a:hover { color: var(--brand); }

.footer-legal {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
  font-size: 0.8125rem;
  color: var(--muted);
}
.footer-legal a { color: var(--text); }
.footer-legal a:hover { color: var(--brand); }
.footer-legal small { font-size: 0.7812rem; color: var(--muted); }

/* ---------------- 提示 ---------------- */
/* 提示条是 popover（top layer），否则会被 <dialog> 的遮罩压暗、看不见；
   popover 自带 inset:0 / margin:auto / 边框，这里全部复位成右下角浮条 */
#toast {
  position: fixed;
  inset: auto;
  left: 50%;
  bottom: 36px;
  margin: 0;
  width: auto;
  height: auto;
  border: 0;
  overflow: visible;
  z-index: 100;
  display: none;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-size: 0.875rem;
  box-shadow: var(--shadow-md);
}
#toast:popover-open { display: block; }

/* ---------------- 大字模式 ----------------
   全站字号统一用 rem（基准 16px），大字模式只改根字号即可整体等比放大。
   旧版只覆盖了 4 个选择器，而绝大多数文字是写死 px 的，所以几乎看不出变化。 */
html { font-size: 100%; }              /* 跟随浏览器默认（通常 16px），不覆盖用户的无障碍设置 */
html.big { font-size: 131.25%; }       /* 16px → 21px，即 +31%：差距明显，又不至于糊成一片 */

/* 大字模式下几处写死高度的地方同步放宽，避免文字被挤或截断 */
.big .header-inner { height: auto; min-height: 3.5em; padding: 0.35em 0; }
.big .brand-mark { width: 2.35em; height: 2.35em; }   /* 44px → 49px，跟着字号一起长 */
.big #auth button,
.big #auth .nav-quiet,
.big .header-tools .btn-quiet { height: 2.6em; }
.big .hero .actions .pill { height: 3.1em; }
.big .hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.big .card > button { min-height: 3.2em; }
.big .row button { height: 2.6em; }
.big .banner h2, .big .section-head h2 { line-height: 1.3; }
/* 弹窗表单在大字模式下会高于视口，让提交/取消按钮吸底，不用滚到底才找得到；
   底部用向上渐隐的白底，滚过的内容像"滑到按钮后面"，不会看起来像被硬切掉 */
.big dialog form .actions {
  position: sticky;
  bottom: -1.6em;
  margin-top: 1em;
  padding: 1.6em 0 1.7em;
  background: linear-gradient(to top, #fff 64%, rgba(255, 255, 255, 0));
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { gap: 44px; }
  .hero h1 { font-size: clamp(2.125rem, 4.2vw, 2.75rem); }
}

@media (max-width: 900px) {
  .shell { padding: 0 24px; }
  main { padding: 0 24px 72px; }
  .header-inner { height: auto; flex-wrap: wrap; padding-top: 14px; padding-bottom: 12px; row-gap: 10px; }
  .header-tools { flex-shrink: 0; }
  #auth { flex-wrap: nowrap; }
  #auth .nav-quiet { display: none; }
  .main-nav { order: 3; width: 100%; justify-content: space-between; gap: 0; overflow-x: auto; }
  .main-nav a { padding: 6px 8px; font-size: 0.875rem; }
  .main-nav a::after { left: 8px; right: 8px; }
  .hero { grid-template-columns: 1fr; padding: 48px 0 56px; gap: 40px; }
  .art { height: 360px; }
  .banner { flex-direction: column; align-items: flex-start; padding: 34px 30px; margin: 56px 0; }
  .banner > span:last-child { display: none; }
  .steps { grid-template-columns: 1fr; border-top: 0; }
  .steps article {
    padding: 24px 0;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .steps article + article { padding-left: 0; }
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .dashboard { grid-template-columns: 1fr; gap: 28px; }
  .sidebar { position: static; display: flex; gap: 6px; overflow-x: auto; padding: 8px; }
  .sidebar h3, .sidebar a:last-child { display: none; }
  .sidebar a { margin: 0; white-space: nowrap; }
  .footer-inner { grid-template-columns: 1fr; gap: 26px; }
  .footer-legal { justify-items: start; text-align: left; }
  .brand-text i { display: none; }
}

@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.0625rem; }
  .hero .actions { flex-direction: column; align-items: stretch; }
  .hero .actions .pill { width: 100%; flex: none; }
  .section-head, .section-top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .row { flex-direction: column; align-items: stretch; padding: 20px; }
  .row > div:last-child { justify-content: flex-end; }
  dialog { padding: 26px 22px; }
  .header-tools .btn-quiet { display: none; }
  #auth button { padding: 0 14px; }
  .footer-legal small { line-height: 1.7; }
}
