/* ---------------------------------------------------------------
   站点样式
   设计原则：内容优先、单列可读栏宽、低饱和暖纸配色、零外部字体请求。
   --------------------------------------------------------------- */

:root {
  color-scheme: light;

  --bg: #fbfaf8;
  --bg-tint: #f4f1eb;
  --surface: #ffffff;
  --ink: #1b1b1a;
  --ink-soft: #3d3e3c;
  --muted: #78746c;
  --line: #e6e2d9;
  --line-soft: #f0ece4;
  --accent: #9a3412;
  --accent-soft: #fbeee5;
  --selection: #f7dcc7;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --page: 44rem;
  --radius: 10px;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #14140f;
  --bg-tint: #1c1c16;
  --surface: #1a1a15;
  --ink: #ecebe6;
  --ink-soft: #cfcdc5;
  --muted: #969287;
  --line: #302f27;
  --line-soft: #24241d;
  --accent: #f0955f;
  --accent-soft: #2a1d13;
  --selection: #46331f;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #14140f;
    --bg-tint: #1c1c16;
    --surface: #1a1a15;
    --ink: #ecebe6;
    --ink-soft: #cfcdc5;
    --muted: #969287;
    --line: #302f27;
    --line-soft: #24241d;
    --accent: #f0955f;
    --accent-soft: #2a1d13;
    --selection: #46331f;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--selection);
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 680;
  letter-spacing: -0.018em;
  line-height: 1.22;
}

h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.3vw, 2.5rem);
}

h2 {
  font-size: 1.18rem;
}

h3 {
  font-size: 1.02rem;
}

code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--bg-tint);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.86em;
}

/* ---------- 布局 ---------- */

.wrap {
  width: min(var(--page), 100%);
  margin: 0 auto;
  padding-inline: 22px;
  /* 长路径、模块名这类没有断点的词在手机上允许折行，不再把页面撑出一条横向滚动 */
  overflow-wrap: anywhere;
}

main.wrap {
  padding-block: 8px 72px;
}

/* ---------- 顶栏 ---------- */

.site-header {
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 640;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.92rem;
}

.site-nav a {
  padding: 5px 9px;
  white-space: nowrap;
  border-radius: 7px;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--bg-tint);
  color: var(--ink);
}

.theme-toggle {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  margin-left: 4px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--muted);
  color: var(--ink);
}

/* ---------- 首页自我介绍 ---------- */

.intro {
  padding-block: 54px 40px;
  border-bottom: 1px solid var(--line-soft);
}

.kicker {
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 22ch;
}

.intro .bio {
  max-width: 36em;
  margin-top: 18px;
  color: var(--ink-soft);
}

.intro .bio + .bio {
  margin-top: 12px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.links a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- 区块标题 ---------- */

.section {
  padding-block: 34px;
  border-bottom: 1px solid var(--line-soft);
}

.section:last-of-type {
  border-bottom: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.section-head h2 {
  color: var(--ink);
}

.text-link {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.15s;
}

.text-link:hover {
  color: var(--accent);
}

/* ---------- 笔记列表 ---------- */

.post-list {
  padding: 0;
  list-style: none;
}

.post-list > li {
  border-bottom: 1px solid var(--line-soft);
}

.post-list > li:last-child {
  border-bottom: 0;
}

.post {
  display: block;
  padding: 16px 12px 16px 0;
  margin-inline: -12px;
  padding-left: 12px;
  border-radius: var(--radius);
  transition: background 0.15s;
}

.post:hover {
  background: var(--bg-tint);
}

.post-date {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.post-title {
  margin-top: 2px;
  font-size: 1.05rem;
  font-weight: 620;
  letter-spacing: -0.012em;
  line-height: 1.4;
}

.post:hover .post-title {
  color: var(--accent);
}

.post-summary {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.62;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.post-tags span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.post-tags span::before {
  content: "#";
  opacity: 0.55;
}

/* ---------- 年份分组 ---------- */

.year-group {
  margin-top: 30px;
}

.year-group:first-of-type {
  margin-top: 14px;
}

.year-label {
  position: sticky;
  top: 58px;
  padding: 6px 0;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

/* ---------- 主题 / tag ---------- */

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  padding: 0;
  list-style: none;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.tag-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tag-chip b {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
}

.tag-chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.tag-chip[aria-pressed="true"] b {
  color: inherit;
}

.more-tags {
  margin-top: 9px;
}

.more-tags > summary {
  display: inline-flex;
  width: fit-content;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.84rem;
  list-style: none;
}

.more-tags > summary::-webkit-details-marker {
  display: none;
}

.more-tags > summary::after {
  content: " ▾";
}

.more-tags[open] > summary::after {
  content: " ▴";
}

.more-tags > summary:hover {
  color: var(--accent);
}

.more-tags .tag-cloud {
  margin-top: 9px;
}

/* ---------- 搜索 ---------- */

.filters {
  margin: 18px 0 4px;
}

.search-box {
  position: relative;
  display: block;
}

.search-box input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-box input:focus {
  border-color: var(--accent);
  outline: none;
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.result-count {
  margin-top: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.empty-state {
  padding: 40px 0;
  color: var(--muted);
  text-align: center;
}

/* ---------- 页脚 ---------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  margin-top: 10px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-block: 26px 42px;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer a:hover {
  color: var(--accent);
}

/* ---------- 404 ---------- */

.notfound {
  padding-block: 90px 60px;
}

.notfound p {
  margin-top: 14px;
  color: var(--muted);
}

.notfound .links {
  margin-top: 26px;
}

/* ---------- 响应式 ---------- */

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .intro {
    padding-block: 38px 30px;
  }

  .intro h1,
  .intro .bio {
    max-width: none;
  }

  .site-nav {
    font-size: 0.86rem;
    gap: 0;
    flex-wrap: wrap;          /* 7 个入口在 340–380px 放不下一行，允许换行而不是横向溢出 */
    justify-content: flex-end;
    row-gap: 2px;
  }

  .site-nav a {
    padding: 4px 5px;
  }

  .site-header .wrap {
    gap: 8px;
  }

  .brand > span:last-child {
    display: none;
  }
}

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

@media print {
  .site-header,
  .site-footer,
  .filters,
  .theme-toggle {
    display: none;
  }
}

/* ---------- 雷达 ---------- */

.radar-intro h1 {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
}

.radar-pager {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.radar-pager a:hover {
  color: var(--accent);
}

.radar-stats {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
}

.radar-failed {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.radar-failed summary {
  cursor: pointer;
  width: fit-content;
}

.radar-failed p {
  margin-top: 4px;
}

.radar-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 30px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}

.radar-heading b {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
}

.radar-heading.prio-high {
  border-bottom-color: var(--accent);
}

.radar-low > summary {
  cursor: pointer;
  list-style: none;
}

.radar-low > summary::-webkit-details-marker {
  display: none;
}

.radar-low > summary .radar-heading::after {
  content: "展开 ▾";
  margin-left: auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
}

.radar-low[open] > summary .radar-heading::after {
  content: "收起 ▴";
}

.radar-list {
  padding: 0;
  list-style: none;
}

.radar-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.radar-item:last-child {
  border-bottom: 0;
}

.radar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.badge {
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--bg-tint);
  color: var(--ink-soft);
  font-weight: 600;
}

.prio-high .badge {
  background: var(--accent-soft);
  color: var(--accent);
}

.radar-title {
  margin-top: 6px;
  font-size: 1.05rem;
  font-weight: 620;
  letter-spacing: -0.012em;
  line-height: 1.4;
}

.radar-title a:hover {
  color: var(--accent);
}

.radar-summary {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.radar-why {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.radar-why::before {
  content: "→ ";
  color: var(--accent);
}

.radar-item .post-tags {
  margin-top: 8px;
}

.muted-date {
  margin-left: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
}

.radar-pick .post-date {
  text-transform: none;
}

/* ---------- 活动清单 ---------- */

.event-list {
  padding: 0;
  list-style: none;
}

.event-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.event-row:last-child {
  border-bottom: 0;
}

.event-date {
  display: flex;
  flex-direction: column;
  padding-top: 2px;
  color: var(--ink);
  font-family: var(--mono);
  line-height: 1.2;
}

.event-date b {
  font-size: 1.05rem;
  font-weight: 650;
}

.event-date span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.event-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 1.02rem;
  font-weight: 620;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.event-title a:hover {
  color: var(--accent);
}

.event-span,
.event-src {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
}

.star {
  color: var(--accent);
  font-size: 0.85rem;
}

.new-badge {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
}

.event-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.85rem;
}

.event-meta .ddl {
  color: var(--ink-soft);
  font-weight: 600;
}

.event-meta .ddl.soon {
  color: var(--accent);
}

.event-summary {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.6;
}

.rel-low .event-title,
.rel-low .event-summary {
  color: var(--muted);
}

.radar-heading .text-link {
  margin-left: auto;
  font-size: 0.82rem;
}

@media (max-width: 560px) {
  .event-row {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
  }
}

/* ---------- 状态页 ---------- */

.check-list {
  padding: 0;
  list-style: none;
}

.check {
  padding: 14px 0 14px 14px;
  border-left: 3px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
}

.check.has-issue {
  border-left-color: var(--accent);
}

.check h3 {
  font-size: 0.98rem;
}

.check ul {
  margin-top: 6px;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.65;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 10px;
}

:not(pre) > code {
  overflow-wrap: anywhere;
}

.src-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.src-table th,
.src-table td {
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.src-table th {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.src-table td.err {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.src-ok b { color: var(--muted); font-weight: 500; }
.src-warn b { color: var(--ink-soft); }
.src-bad b { color: var(--accent); }

/* ---------- 门户 ---------- */

.portal-intro {
  padding-block: 46px 30px;
  border-bottom: 1px solid var(--line-soft);
}

.portal-intro h1 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem);
}

.portal-intro .bio {
  max-width: 38em;
  margin-top: 14px;
  color: var(--ink-soft);
}

.portal-intro .bio b {
  color: var(--accent);
  font-weight: 650;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 0.15s, transform 0.15s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.card-role {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.card-name {
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.012em;
}

.card-lock {
  font-size: 0.8rem;
}

.card-blurb {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}

.card-status {
  margin-top: auto;
  padding-top: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.prose p,
.prose ul {
  margin-top: 12px;
  color: var(--ink-soft);
}

.prose ul {
  padding-left: 1.2em;
}

.prose li + li {
  margin-top: 6px;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
}

@media (max-width: 560px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------
   上手指南 /guides/
   --------------------------------------------------------------- */

.guide-path {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.guide-step {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.guide-step h3 {
  font-size: 1.05rem;
  line-height: 1.4;
}

.guide-step h3 a {
  color: var(--ink);
}

.guide-step h3 a:hover {
  color: var(--accent);
}

.guide-step p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

.guide-step .guide-meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.guide-step.is-draft {
  background: var(--bg-tint);
  border-style: dashed;
}

.guide-step.is-draft h3 {
  color: var(--muted);
}

.guide-num {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
}

.is-draft .guide-num {
  background: var(--line-soft);
  color: var(--muted);
}

.guide .kicker a {
  color: inherit;
}

.guide .lead-p,
.guide .section > p {
  margin-top: 12px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.guide .section a:not(.button) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
}

.tldr {
  margin-top: 18px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--bg-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.tldr p:first-child {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tldr ul,
.tldr ol {
  margin-top: 8px;
  padding-left: 1.2em;
  color: var(--ink-soft);
  line-height: 1.7;
}

.prereq {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.prereq a {
  color: var(--accent);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.plan {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.plan.featured {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.plan-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.plan-badge {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
}

.plan-price {
  margin-top: 6px;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.plan-price span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
}

.plan ul {
  margin-top: 10px;
  padding-left: 1.1em;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.7;
}

.offer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px 16px;
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.offer-tag {
  padding: 2px 8px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.offer-body {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

.offer .button {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}

.offer .button:hover {
  filter: brightness(1.1);
}

.offer + .offer {
  margin-top: 10px;
}

.aff::after {
  content: "推荐";
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7em;
  vertical-align: 0.15em;
}

.aff-off {
  color: inherit;
  text-decoration: none;
  cursor: default;
}

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin-top: 16px;
}

.steps > li {
  position: relative;
  counter-increment: step;
  padding: 0 0 22px 3rem;
  border-left: 1px solid var(--line);
  margin-left: 1.1rem;
}

.steps > li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -1.15rem;
  top: -2px;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
}

.steps h3 {
  font-size: 1.02rem;
  line-height: 2.2rem;
}

.steps p {
  margin-top: 6px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.kv {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.kv td {
  padding: 9px 10px;
  border-top: 1px solid var(--line-soft);
  vertical-align: top;
  line-height: 1.6;
  color: var(--ink-soft);
}

.kv td:first-child {
  width: 30%;
  color: var(--ink);
  font-weight: 600;
}

.warn,
.tip {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.65;
}

.warn {
  background: var(--accent-soft);
  color: var(--accent);
}

.tip {
  background: var(--bg-tint);
  color: var(--ink-soft);
}

.guide code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-tint);
  font-family: var(--mono);
  font-size: 0.88em;
}

.next {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.disclosure {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.disclosure:empty {
  display: none;
}

.updated {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
}

@media (max-width: 560px) {
  .offer {
    grid-template-columns: auto 1fr;
  }

  .offer .button {
    grid-column: 1 / -1;
    text-align: center;
  }

  .kv td:first-child {
    width: 38%;
  }
}

.offer[hidden] {
  display: none;
}

.offer.plain {
  border-color: var(--line);
  background: var(--bg-tint);
}

.offer.plain .offer-tag {
  border-color: var(--muted);
  color: var(--muted);
}

.offer-how {
  padding: 8px 12px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .offer-how {
    grid-column: 1 / -1;
    white-space: normal;
  }
}

.card-mock {
  margin: 16px 0 0;
}

.card-face {
  position: relative;
  width: min(100%, 22rem);
  aspect-ratio: 1.586;
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  background: radial-gradient(120% 90% at 80% 10%, #3a3428 0%, #15140f 55%, #0b0b09 100%);
  color: #f3efe6;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.card-bank {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.card-bank span {
  margin-left: 6px;
  color: #cbb98a;
  font-weight: 400;
  font-size: 0.72rem;
}

.card-chip {
  align-self: center;
  width: 2.2rem;
  height: 1.6rem;
  border-radius: 5px;
  background: linear-gradient(135deg, #d9c9a2, #9c8a5c);
}

.card-no {
  font-family: var(--mono);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: #e6e0d2;
}

.card-brand {
  justify-self: end;
  font-style: italic;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.card-brand span {
  display: block;
  margin-top: -4px;
  text-align: right;
  font-style: normal;
  font-weight: 400;
  font-size: 0.62rem;
  color: #cbb98a;
}

.card-mock figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.guide .plain-list {
  margin-top: 10px;
  padding-left: 1.2em;
  color: var(--ink-soft);
  line-height: 1.8;
}

.warn ol {
  margin-top: 8px;
  padding-left: 1.3em;
  color: var(--ink);
}

.warn li + li {
  margin-top: 4px;
}

.table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.cmp {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.cmp th,
.cmp td {
  padding: 9px 10px;
  border-top: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
  color: var(--ink-soft);
}

.cmp th {
  border-top: 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.cmp td:first-child {
  color: var(--ink);
  white-space: nowrap;
}

.cmp td:first-child span {
  color: var(--muted);
  font-size: 0.78rem;
}

.radar-events-link {
  margin-top: 28px;
  padding: 10px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-tint);
}

.share-label {
  margin-right: auto;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.btn-sm {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-sm.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.guide h3.sub {
  margin-top: 26px;
  font-size: 1.05rem;
}

.guide-support {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-tint);
}

.guide-support[hidden] { display: none; }
.guide-support h2 { margin: 4px 0 8px; font-size: 1.15rem; }
.guide-support p { margin: 0; color: var(--ink-soft); }
.guide-support .support-note { margin-top: 8px; color: var(--muted); font-size: 0.82rem; }
.support-methods { display: flex; gap: 14px; }
.support-method { margin: 0; text-align: center; }
.support-method img { display: block; width: 180px; height: auto; object-fit: contain; border-radius: 8px; background: #fff; }
.support-method figcaption { margin-top: 5px; color: var(--muted); font-size: 0.78rem; }

@media (max-width: 640px) {
  /* 两张二维码并排：各 38vw + 14px 间距，在 360–640px 都放得下，不再把网格撑出屏幕 */
  .guide-support { grid-template-columns: minmax(0, 1fr); }
  .guide-support > * { min-width: 0; }
  .support-methods { justify-content: center; flex-wrap: wrap; }
  .support-method img { width: min(38vw, 180px); height: auto; }
}

.comments {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.comments-note {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 0.85rem;
}

.match {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  vertical-align: 0.15em;
  border: 1px solid var(--line);
  color: var(--muted);
}

.match-高 {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.match-中 {
  color: var(--ink-soft);
}

.picks {
  margin: 18px 0 8px;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.pick-list {
  margin-top: 10px;
  padding-left: 1.3em;
  line-height: 1.7;
}

.pick-list li + li {
  margin-top: 8px;
}

/* 专题追踪 */
.track-highlights { margin: .6rem 0 0; padding-left: 1.2rem; }
.track-highlights li { margin: .25rem 0; line-height: 1.5; }
.card .track-highlights { font-size: .88rem; color: var(--muted, #6b6b66); }
.radar-heading small { font-size: .8rem; font-weight: 400; color: var(--muted, #6b6b66); margin-left: .4rem; }
