/* 攻略频道专用样式 —— 与子时工具箱主题统一：橙色主题 / 4px 圆角 / 克制排版 */
:root {
  --guide-max: 860px;
}

/* ============ 频道首页 ============ */
.hero-desc { margin: 14px 0 0; font-size: 15px; line-height: 1.7; color: rgba(255, 255, 255, .78); max-width: 640px; }
.guide-notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff8f3; border: 1px solid #f5d9c4; border-radius: 4px;
  padding: 14px 16px; margin: 0 0 28px; font-size: 14px; line-height: 1.7; color: var(--ink-2);
}
.guide-notice svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--accent-ink); margin-top: 2px; }
.guide-notice b { color: var(--ink); }

.guide-hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.guide-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  padding: 22px 20px; text-decoration: none; color: inherit;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.guide-card:hover { transform: translateY(-4px); border-color: var(--accent-soft); box-shadow: 0 14px 32px rgba(21, 23, 26, .08); }
.guide-card .card-top { display: flex; align-items: center; justify-content: space-between; }
.guide-card .card-icon {
  width: 46px; height: 46px; border-radius: 4px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  font-size: 15px; font-weight: 700; letter-spacing: .02em;
}
.guide-card .card-index { font-size: 13px; color: var(--ink-3); letter-spacing: .12em; }
.guide-card h3 { font-size: 18px; font-weight: 650; margin: 0; }
.guide-card p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--ink-2); }
.guide-card .card-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.guide-card .card-go { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; color: var(--accent-ink); display: inline-flex; align-items: center; gap: 6px; }
.guide-card .card-go .i { width: 15px; height: 15px; }

.tag {
  display: inline-block; font-size: 12px; line-height: 1; padding: 6px 10px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.tag.hot { background: #fff3ea; border-color: #f5d9c4; color: var(--accent-ink); }

.guide-search { position: relative; max-width: 560px; margin: 0 0 26px; }
.guide-search input {
  width: 100%; padding: 13px 16px 13px 44px; font-size: 15px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--ink);
}
.guide-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(242, 102, 43, .14); }
.guide-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.guide-search-empty { display: none; padding: 26px; text-align: center; color: var(--ink-3); font-size: 14px; }

/* ============ 文章页布局 ============ */
.guide-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; }
.guide-toc { position: sticky; top: calc(var(--header-h, 72px) + 20px); max-height: calc(100vh - var(--header-h, 72px) - 40px); overflow: auto; }
.guide-toc .toc-title { font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--ink-3); margin: 0 0 12px; }
.guide-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.guide-toc a {
  display: block; padding: 8px 12px; border-radius: 4px; font-size: 14px; line-height: 1.5;
  color: var(--ink-2); text-decoration: none; border-left: 2px solid transparent;
}
.guide-toc a:hover { background: var(--surface-2); color: var(--ink); }
.guide-toc a.is-active { border-left-color: var(--accent); background: #fff6f0; color: var(--accent-ink); font-weight: 600; }
.guide-toc .toc-sub { padding-left: 14px; }
.guide-toc .toc-sub a { font-size: 13px; padding: 6px 12px; }
.guide-toc-mobile { display: none; }

.guide-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }

/* ============ 文章排版 ============ */
.guide-article { max-width: var(--guide-max); font-size: 15.5px; line-height: 1.85; color: var(--ink); }
.guide-article > *:first-child { margin-top: 0; }
.guide-article h2 {
  font-size: 21px; font-weight: 700; line-height: 1.4; margin: 44px 0 16px;
  padding-left: 14px; border-left: 4px solid var(--accent); scroll-margin-top: calc(var(--header-h, 72px) + 16px);
}
.guide-article h2:first-of-type { margin-top: 8px; }
.guide-article h3 {
  font-size: 17px; font-weight: 650; margin: 30px 0 12px; color: var(--ink);
  scroll-margin-top: calc(var(--header-h, 72px) + 16px);
}
.guide-article h4 { font-size: 15.5px; font-weight: 650; margin: 22px 0 8px; }
.guide-article p { margin: 0 0 14px; }
.guide-article ul, .guide-article ol { margin: 0 0 16px; padding-left: 22px; }
.guide-article li { margin-bottom: 8px; }
.guide-article li::marker { color: var(--accent-ink); font-weight: 600; }
.guide-article strong { font-weight: 650; }
.guide-article .num { font-variant-numeric: tabular-nums; color: var(--accent-ink); font-weight: 600; }

.guide-article table { width: 100%; border-collapse: collapse; margin: 16px 0 22px; font-size: 14px; line-height: 1.6; display: block; overflow-x: auto; }
.guide-article thead { display: table; width: 100%; table-layout: fixed; }
.guide-article tbody { display: table; width: 100%; table-layout: fixed; }
.guide-article th, .guide-article td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.guide-article th { background: var(--surface-2); font-weight: 650; white-space: nowrap; }
.guide-article tbody tr:nth-child(even) td { background: #fbfbfc; }
.guide-article td.num, .guide-article th.num { text-align: right; white-space: nowrap; }

.formula {
  background: #0f1c2b; color: #e8eef5; border-radius: 4px; padding: 14px 18px; margin: 14px 0 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.7;
  overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}
.formula .f-note { color: #9fb3c8; font-family: inherit; }

.callout { border-radius: 4px; padding: 14px 16px; margin: 16px 0; font-size: 14.5px; line-height: 1.75; border: 1px solid; }
.callout p { margin: 0 0 8px; } .callout p:last-child { margin-bottom: 0; }
.callout.tip { background: #fff8f1; border-color: #f2d3b8; }
.callout.tip .callout-title { color: var(--accent-ink); }
.callout.warn { background: #fff5f5; border-color: #f3c1c1; }
.callout.warn .callout-title { color: #b33737; }
.callout.info { background: #f4f8fd; border-color: #c9dcf2; }
.callout.info .callout-title { color: #2b5f9e; }
.callout-title { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }

.priority { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 16px; font-size: 14.5px; }
.priority .p-item { background: #fff6f0; border: 1px solid #f2d3b8; color: var(--ink); border-radius: 4px; padding: 7px 12px; font-weight: 600; }
.priority .p-sep { color: var(--accent-ink); font-weight: 700; }

.guide-source {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-3); line-height: 1.7;
}
.guide-source a { color: var(--accent-ink); }

/* ============ 计算工具页 ============ */
.calc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.calc-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 24px 22px;
}
.calc-panel h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.calc-panel .calc-desc { margin: 0 0 18px; font-size: 13.5px; color: var(--ink-2); line-height: 1.65; }
.calc-panel .input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calc-result {
  margin-top: 18px; background: var(--surface-2); border: 1px dashed var(--line-strong);
  border-radius: 4px; padding: 16px 18px; font-size: 15px; line-height: 1.8;
}
.calc-result .r-total { font-size: 20px; font-weight: 700; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.calc-result table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 10px; }
.calc-result th, .calc-result td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.calc-result td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent-ink); }
.calc-actions { display: flex; gap: 10px; margin-top: 16px; }
.btn-calc {
  appearance: none; border: 0; cursor: pointer; border-radius: 999px; padding: 11px 26px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: 0 10px 26px rgba(242, 102, 43, .28); transition: background .2s ease;
}
.btn-calc:hover { background: var(--accent-ink); }
.btn-ghost {
  appearance: none; cursor: pointer; border-radius: 999px; padding: 11px 22px;
  background: transparent; border: 1px solid var(--line-strong); color: var(--ink-2); font-size: 14px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }

/* ============ 首页攻略板块 ============ */
.guide-band-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.guide-band-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 20px 18px;
  text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 8px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.guide-band-card:hover { transform: translateY(-4px); border-color: var(--accent-soft); box-shadow: 0 14px 30px rgba(21,23,26,.08); }
.guide-band-card .band-idx { font-size: 12px; letter-spacing: .14em; color: var(--accent-ink); font-weight: 700; }
.guide-band-card h3 { margin: 0; font-size: 17px; font-weight: 700; }
.guide-band-card p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.guide-band-card .card-go { margin-top: auto; padding-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--accent-ink); display: inline-flex; align-items: center; gap: 6px; }
.guide-band-card .card-go .i { width: 14px; height: 14px; }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .guide-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-band-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 760px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); }
  .guide-toc { display: none; }
  .guide-toc-mobile { display: block; margin-bottom: 20px; }
  .guide-toc-mobile details { border: 1px solid var(--line); border-radius: 4px; background: #fff; }
  .guide-toc-mobile summary {
    padding: 13px 16px; font-size: 14.5px; font-weight: 650; cursor: pointer; list-style: none;
    display: flex; align-items: center; justify-content: space-between; color: var(--accent-ink);
  }
  .guide-toc-mobile summary::-webkit-details-marker { display: none; }
  .guide-toc-mobile .toc-list { padding: 4px 8px 12px; max-height: 46vh; overflow: auto; }
  .guide-toc-mobile a { display: block; padding: 9px 12px; font-size: 14px; color: var(--ink-2); text-decoration: none; border-radius: 4px; }
  .guide-toc-mobile a:active { background: var(--surface-2); }
  .guide-hub-grid, .calc-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-band-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .guide-band-card { padding: 16px 14px; }
  .guide-band-card h3 { font-size: 15.5px; }
  .guide-band-card p { font-size: 12.5px; }
  .guide-article { font-size: 15px; }
  .guide-article h2 { font-size: 19px; margin-top: 36px; }
  .guide-article h3 { font-size: 16px; }
  .calc-panel { padding: 20px 16px; }
  .calc-panel .input-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-notice { font-size: 13.5px; }
}

/* 移动端宽表格横向滚动 */
.table-scroll{overflow-x:visible}
@media (max-width:640px){
  .table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin-left:-20px;margin-right:-20px;padding-left:20px;padding-right:20px}
  .table-scroll table{min-width:640px}
}
