/* FYRUL 样式：白底黑字，一处荧光黄，小标签用等宽字体 */
:root {
  --fy-paper: #ffffff;
  --fy-ink: #111111;
  --fy-ink-2: #3d3d3d;
  --fy-ink-3: #6b6b6b;
  --fy-line: #111111;
  --fy-hair: #e3e3e3;
  --fy-mark: #fff04d;
  --fy-mark-soft: #fffbc7;
  --fy-col: 43rem;
  --fy-gut: 16px;
  --fy-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", "Segoe UI", sans-serif;
  --fy-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", Menlo, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 12px; }
body {
  margin: 0;
  background: var(--fy-paper);
  color: var(--fy-ink);
  font-family: var(--fy-sans);
  font-size: 17px;
  line-height: 1.8;
  overflow-wrap: break-word;
}
a { color: var(--fy-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--fy-ink); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.fy-mono { font-family: var(--fy-mono); }
.fy-skip { position: absolute; left: -9999px; top: 0; background: var(--fy-ink); color: var(--fy-paper); padding: 12px 14px; z-index: 10; }
.fy-skip:focus { left: 8px; top: 8px; }

/* 版心：单栏，左对齐，宽屏时整栏居中但正文仍是一条窄列 */
.fy-col { width: 100%; max-width: calc(var(--fy-col) + 2 * var(--fy-gut)); margin: 0 auto; padding: 0 var(--fy-gut); }

/* 顶栏 */
.fy-top { border-bottom: 1px solid var(--fy-hair); }
.fy-top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.fy-mark { font-family: var(--fy-mono); font-weight: 700; font-size: 15px; letter-spacing: .32em; text-decoration: none; padding: 2px 0; }
.fy-mark::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 2px; background: var(--fy-mark); outline: 1px solid var(--fy-ink); vertical-align: 1px; }
.fy-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--fy-mono); font-size: 13px; }
.fy-nav a { text-decoration: none; color: var(--fy-ink-2); display: inline-block; padding: 12px 0; }
.fy-nav a[aria-current="page"] { color: var(--fy-ink); background-image: linear-gradient(transparent 58%, var(--fy-mark) 58%); background-clip: content-box; background-origin: content-box; }

/* 首屏 */
.fy-hero { padding-top: 28px; }
.fy-tag { margin: 0 0 10px; font-size: 12px; letter-spacing: .04em; color: var(--fy-ink-3); }
.fy-tag::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--fy-mark); outline: 1px solid var(--fy-ink); vertical-align: 1px; }
.fy-hero h1, .fy-phead h1 { margin: 0; font-size: clamp(25px, 6.2vw, 42px); line-height: 1.3; font-weight: 800; letter-spacing: -.01em; }
.fy-seg { display: inline-block; }
.fy-dek { margin: 12px 0 0; font-size: 16px; line-height: 1.7; color: var(--fy-ink-2); }

/* 码卡 */
.fy-card { margin: 22px 0 26px; border: 2px solid var(--fy-line); padding: 14px 14px 12px; }
.fy-card-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.fy-lab { font-size: 12px; color: var(--fy-ink-3); letter-spacing: .06em; }
.fy-code { font-size: 26px; font-weight: 700; letter-spacing: .08em; padding: 0 6px; background: var(--fy-mark); line-height: 1.35; }
.fy-btn { font: inherit; font-size: 15px; line-height: 1.2; min-height: 44px; cursor: pointer; border: 2px solid var(--fy-line); border-radius: 0; padding: 9px 14px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.fy-btn-line { background: var(--fy-paper); color: var(--fy-ink); margin-left: auto; min-width: 72px; }
.fy-btn-line.is-done { background: var(--fy-ink); color: var(--fy-paper); }
.fy-btn-go { display: flex; width: 100%; margin-top: 12px; background: var(--fy-ink); color: var(--fy-paper); font-weight: 700; padding: 12px 14px; }
.fy-btn-go:hover { background: #2b2b2b; text-decoration: none; }
.fy-gain { margin: 10px 0 0; font-weight: 700; font-size: 15px; line-height: 1.6; }
.fy-gain sup { font-weight: 400; }
.fy-fine { margin: 6px 0 0; font-size: 12.5px; line-height: 1.65; color: var(--fy-ink-3); }

/* 目录 */
.fy-toc { margin: 28px 0 8px; border-top: 1px solid var(--fy-line); border-bottom: 1px solid var(--fy-hair); padding: 12px 0 10px; }
.fy-toc .fy-lab { margin: 0 0 6px; }
.fy-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: fy-toc; }
.fy-toc li { counter-increment: fy-toc; display: flex; gap: 10px; font-size: 15px; line-height: 1.6; padding: 0; }
.fy-toc li::before { content: counter(fy-toc, decimal-leading-zero); font-family: var(--fy-mono); font-size: 12px; color: var(--fy-ink-3); padding-top: 7px; min-width: 1.6em; }
.fy-toc a { text-decoration: none; display: block; padding: 4px 0; }
.fy-toc a:hover { text-decoration: underline; }

/* 正文 */
.fy-prose { padding-bottom: 8px; }
.fy-prose > p, .fy-prose li { color: var(--fy-ink); }
.fy-prose p { margin: 0 0 1em; }
.fy-prose h2 { counter-increment: fy-h2; margin: 2.6em 0 .7em; padding-top: 14px; border-top: 2px solid var(--fy-line); font-size: clamp(21px, 4.6vw, 26px); line-height: 1.4; font-weight: 800; text-wrap: balance; }
.fy-prose h2::before { content: "§ " counter(fy-h2, decimal-leading-zero); display: block; font-family: var(--fy-mono); font-size: 12px; font-weight: 400; color: var(--fy-ink-3); letter-spacing: .06em; margin-bottom: 4px; }
.fy-home .fy-prose { counter-reset: fy-h2; }
.fy-prose h3 { margin: 1.9em 0 .5em; font-size: 18.5px; line-height: 1.5; font-weight: 700; text-wrap: balance; }
.fy-prose h3::before { content: "— "; color: var(--fy-ink-3); font-weight: 400; }
.fy-prose ul, .fy-prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.fy-prose li { margin: .25em 0; }
.fy-prose strong { font-weight: 700; }
.fy-prose mark { background: linear-gradient(transparent 55%, var(--fy-mark) 55%); color: inherit; padding: 0 1px; }
.fy-prose code { font-family: var(--fy-mono); font-size: .88em; background: #f4f4f4; padding: 1px 4px; }
.fy-prose blockquote { margin: 1.2em 0; padding: 0 0 0 14px; border-left: 3px solid var(--fy-ink); color: var(--fy-ink-2); }

/* 依据、提示 */
.fy-basis { display: block; margin: 1.6em 0; padding: 10px 0 2px; border-top: 1px dashed var(--fy-ink-3); border-bottom: 1px dashed var(--fy-ink-3); font-size: 15px; color: var(--fy-ink-2); }
.fy-basis .fy-lab { display: block; margin-bottom: 4px; }
.fy-note { margin: 1.4em 0; padding: 12px 14px 2px; border-left: 4px solid var(--fy-ink); background: #f6f6f6; font-size: 15.5px; }
.fy-note-warn { background: var(--fy-mark-soft); }
.fy-note-stop { background: var(--fy-paper); border: 2px solid var(--fy-ink); border-left-width: 8px; }
.fy-note-ok { background: var(--fy-paper); border: 1px solid var(--fy-hair); border-left: 4px solid var(--fy-mark); box-shadow: inset 1px 0 0 var(--fy-ink); }
.fy-note-t { margin: 0 0 6px !important; font-size: 12px; letter-spacing: .04em; color: var(--fy-ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.fy-note-k { font-weight: 700; color: var(--fy-ink); }
.fy-note-k::before { content: "■ "; font-size: 9px; vertical-align: 1px; }
.fy-note-ok .fy-note-k::before { content: "✓ "; font-size: 12px; }
.fy-note-stop .fy-note-k::before { content: "! "; font-size: 12px; }
.fy-note-h { font-family: var(--fy-sans); font-size: 15px; font-weight: 700; color: var(--fy-ink); letter-spacing: 0; }

/* 步骤（HowTo） */
.fy-steps { list-style: none; padding: 0 !important; margin: 1em 0 1.4em; counter-reset: fy-step; border-left: 2px solid var(--fy-ink); }
.fy-steps li { counter-increment: fy-step; position: relative; padding: 2px 0 12px 44px; margin: 0; }
.fy-steps li::before { content: counter(fy-step); position: absolute; left: 10px; top: 3px; font-family: var(--fy-mono); font-size: 13px; width: 22px; height: 22px; line-height: 20px; text-align: center; border: 1px solid var(--fy-ink); background: var(--fy-paper); }
.fy-step-t { display: block; font-weight: 700; }
.fy-step-x { display: block; color: var(--fy-ink-2); }

/* 一道道门 */
.fy-gates { margin: 1.4em 0; }
.fy-gates ol { list-style: none; margin: 0; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 0; border: 1px solid var(--fy-ink); }
.fy-gates li { margin: 0; padding: 10px 10px 12px; border-right: 1px solid var(--fy-ink); display: flex; flex-direction: column; gap: 2px; }
.fy-gates li:last-child { border-right: 0; background: var(--fy-mark-soft); }
.fy-gate-no { font-size: 11px; color: var(--fy-ink-3); }
.fy-gates b { font-size: 15px; line-height: 1.45; }
.fy-gates small { font-size: 12.5px; line-height: 1.55; color: var(--fy-ink-2); }
.fy-gates figcaption { font-size: 13px; color: var(--fy-ink-3); margin-top: 6px; }

/* 表格 */
.fy-table { margin: 1.2em 0 1.5em; overflow-x: auto; }
.fy-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.fy-table th { text-align: left; font-family: var(--fy-mono); font-size: 12px; font-weight: 400; color: var(--fy-ink-3); letter-spacing: .04em; border-bottom: 2px solid var(--fy-ink); padding: 6px 8px 6px 0; }
.fy-table td { vertical-align: top; border-bottom: 1px solid var(--fy-hair); padding: 8px 10px 8px 0; }
.fy-table[data-n="2"] td:first-child { white-space: nowrap; padding-right: 16px; }

/* FAQ */
.fy-faq details { border-bottom: 1px solid var(--fy-hair); }
.fy-faq details:first-of-type { border-top: 1px solid var(--fy-hair); }
.fy-faq summary { cursor: pointer; list-style: none; padding: 12px 28px 12px 0; position: relative; font-weight: 700; line-height: 1.6; }
.fy-faq summary::-webkit-details-marker { display: none; }
.fy-faq summary::after { content: "+"; position: absolute; right: 2px; top: 10px; font-family: var(--fy-mono); font-weight: 400; font-size: 18px; }
.fy-faq details[open] summary::after { content: "−"; }
.fy-faq details p { margin: 0 0 14px; color: var(--fy-ink-2); }

/* 署名 */
.fy-byline { margin-top: 2.6em; padding-top: 12px; border-top: 1px solid var(--fy-ink); font-size: 14.5px; color: var(--fy-ink-2); }
.fy-byline .fy-mono { font-size: 12.5px; color: var(--fy-ink-3); }
.fy-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fy-tags .fy-lab { margin-right: 4px; }
.fy-tags a { display: inline-flex; align-items: center; min-height: 34px; padding: 2px 10px; border: 1px solid var(--fy-ink); color: var(--fy-ink); text-decoration: none; font-size: 14px; }
.fy-tags a:hover { background: var(--fy-mark); }
.fy-tags span:not(.fy-lab) { display: inline-flex; align-items: center; min-height: 34px; padding: 2px 4px; font-size: 14px; color: var(--fy-ink-3); }

/* 站务页、列表页 */
.fy-crumbs { padding-top: 22px; font-size: 12px; color: var(--fy-ink-3); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.fy-crumbs a { color: var(--fy-ink-3); display: inline-block; padding: 2px 0; }
.fy-phead { padding: 14px 0 6px; margin-bottom: 18px; border-bottom: 2px solid var(--fy-ink); }
.fy-phead h1 { font-size: clamp(24px, 5.6vw, 34px); }
.fy-intro { color: var(--fy-ink-2); margin-top: 10px; }
.fy-entries { list-style: none; margin: 0; padding: 0; }
.fy-numbered { counter-reset: fy-e; }
.fy-numbered li { counter-increment: fy-e; }
.fy-numbered li::before { content: counter(fy-e, decimal-leading-zero); font-family: var(--fy-mono); font-size: 12px; color: var(--fy-ink-3); padding-top: 5px; min-width: 2.2em; flex: none; }
.fy-numbered li > a { flex: 1; }
.fy-entries li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--fy-hair); padding: 12px 0; }
.fy-entries a { text-decoration: none; display: flex; flex-direction: column; }
.fy-entries a b { font-size: 17px; line-height: 1.5; }
.fy-entries a span { font-size: 14px; color: var(--fy-ink-3); line-height: 1.6; }
.fy-entries time, .fy-entries .fy-n { font-size: 12px; color: var(--fy-ink-3); white-space: nowrap; padding-top: 4px; }
.fy-turn { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; font-size: 15px; }
.fy-turn a { display: inline-block; padding: 12px 4px; }
.fy-cover { margin: 18px auto 0; }
.fy-meta-line { font-size: 12.5px; color: var(--fy-ink-3); margin: 10px 0 0; }

/* 页脚 */
.fy-foot { margin-top: 64px; border-top: 2px solid var(--fy-ink); padding: 22px 0 34px; font-size: 13.5px; line-height: 1.75; color: var(--fy-ink-2); }
.fy-foot-say { margin: 0 0 14px; }
.fy-foot-links { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
.fy-foot-links a { display: inline-block; padding: 4px 0; }
.fy-foot-links a { color: var(--fy-ink); }
.fy-foot-end { margin: 0; font-size: 12px; color: var(--fy-ink-3); }
.fy-foot-end a { color: var(--fy-ink-3); }

/* 屏幕状态分流 */
.fy-state { margin: 1.4em 0; border: 1px solid var(--fy-ink); }
.fy-state-say { margin: 0 !important; padding: 10px 14px; border-bottom: 1px solid var(--fy-ink); background: #fafafa; display: flex; flex-direction: column; gap: 4px; }
.fy-state-q { font-weight: 700; font-size: 16px; line-height: 1.6; }
.fy-state-q::before { content: "「"; }
.fy-state-q::after { content: "」"; }
.fy-state-do { padding: 10px 14px 0 38px; position: relative; font-size: 15.5px; }
.fy-state-do::before { content: "→"; position: absolute; left: 14px; top: 9px; font-family: var(--fy-mono); }

/* 截图、自绘图、并排 */
.fy-shot, .fy-fig { margin: 1.5em 0; }
.fy-shot img { display: block; width: 100%; border: 1px solid var(--fy-ink); background: #f3f3f3; }
.fy-shot-phone { max-width: 300px; }
.fy-shot-phone img { border: 6px solid var(--fy-ink); border-radius: 22px; }
.fy-fig img { display: block; width: 100%; }
.fy-shot figcaption, .fy-fig figcaption, .fy-cover figcaption { margin-top: 8px; font-size: 13px; line-height: 1.6; color: var(--fy-ink-3); padding-left: 14px; position: relative; }
.fy-shot figcaption::before, .fy-fig figcaption::before, .fy-cover figcaption::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; background: var(--fy-mark); outline: 1px solid var(--fy-ink); }
.fy-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 1.5em 0; align-items: start; }
.fy-pair .fy-shot, .fy-pair .fy-fig { margin: 0; max-width: none; }
.fy-pair .fy-shot-phone img { border-width: 4px; border-radius: 16px; }
.fy-cover { margin-top: 20px; }
.fy-cover img { display: block; width: 100%; border: 1px solid var(--fy-hair); }

/* 相关文章、首页最新单篇 */
.fy-related, .fy-latest { margin-top: 2.6em; }
.fy-prose .fy-related h2::before, .fy-prose .fy-latest h2::before { content: "→"; }
.fy-rel-list { list-style: none; padding: 0 !important; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.fy-rel-list li { margin: 0; border-top: 1px solid var(--fy-hair); }
.fy-rel-list a { display: flex; flex-direction: column; padding: 12px 0 14px; text-decoration: none; }
.fy-rel-list a b { line-height: 1.5; }
.fy-rel-list a span { font-size: 14px; color: var(--fy-ink-3); line-height: 1.6; margin-top: 2px; }
.fy-rel-list a:hover b, .fy-entries a:hover b { background: linear-gradient(transparent 60%, var(--fy-mark) 60%); }
.fy-latest-all { margin: 10px 0 0 !important; font-family: var(--fy-mono); font-size: 13px; }
.fy-latest-all a { display: inline-block; padding: 10px 0; }

/* 宽屏：H2 的节号挪到左边空白里，正文那一列不动 */
@media (min-width: 1100px) {
  .fy-prose h2 { position: relative; }
  .fy-prose h2::before { position: absolute; left: -7.2em; top: 19px; margin: 0; text-align: right; width: 6.4em; }
  .fy-card { padding: 18px 20px 14px; }
  .fy-btn-go { width: auto; display: inline-flex; padding: 12px 22px; }
}

/* 窄屏 */
/* 手机与触屏：可点的行至少 44px 高 */
@media (max-width: 760px), (pointer: coarse) {
  .fy-toc a { padding: 10px 0; }
  .fy-toc li::before { padding-top: 13px; }
  .fy-foot-links a, .fy-meta-line a, .fy-foot-end a, .fy-mark { display: inline-flex; align-items: center; min-height: 44px; padding-top: 0; padding-bottom: 0; }
  .fy-crumbs a { padding: 12px 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .fy-hero { padding-top: 18px; }
  .fy-dek { font-size: 15px; margin-top: 8px; }
  .fy-card { margin-top: 14px; padding: 12px 12px 10px; }
  .fy-code { font-size: 22px; }
  .fy-gates ol { grid-template-columns: 1fr; }
  .fy-gates li { border-right: 0; border-bottom: 1px solid var(--fy-ink); flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .fy-gates li:last-child { border-bottom: 0; }
  .fy-gates small { flex-basis: 100%; }
  .fy-table[data-n="3"] table, .fy-table[data-n="4"] table, .fy-table[data-n="5"] table { display: block; }
  .fy-table[data-n="3"] thead, .fy-table[data-n="4"] thead, .fy-table[data-n="5"] thead { display: none; }
  .fy-table[data-n="3"] tbody, .fy-table[data-n="4"] tbody, .fy-table[data-n="5"] tbody,
  .fy-table[data-n="3"] tr, .fy-table[data-n="4"] tr, .fy-table[data-n="5"] tr { display: block; }
  .fy-table[data-n="3"] tr, .fy-table[data-n="4"] tr, .fy-table[data-n="5"] tr { border-bottom: 1px solid var(--fy-ink); padding: 6px 0; }
  .fy-table[data-n="3"] td, .fy-table[data-n="4"] td, .fy-table[data-n="5"] td { display: grid; grid-template-columns: 6.2em 1fr; gap: 10px; border: 0; padding: 4px 0; }
  .fy-table[data-n="3"] td::before, .fy-table[data-n="4"] td::before, .fy-table[data-n="5"] td::before { content: attr(data-col); font-family: var(--fy-mono); font-size: 12px; line-height: 1.9; color: var(--fy-ink-3); }
  .fy-table[data-n="3"] td:first-child, .fy-table[data-n="4"] td:first-child, .fy-table[data-n="5"] td:first-child { font-weight: 700; }
  .fy-entries li { flex-wrap: wrap; }
  .fy-entries li > a { flex: 1 1 calc(100% - 3em); }
  .fy-entries time, .fy-entries .fy-n { order: 3; flex-basis: 100%; padding-top: 0; }
  .fy-numbered time, .fy-numbered .fy-n { padding-left: calc(2.2em + 12px); }
  .fy-tags a, .fy-tags span:not(.fy-lab) { min-height: 44px; }
}
@media (max-width: 560px) {
  .fy-rel-list { grid-template-columns: 1fr; }
  .fy-pair { gap: 10px; }
  .fy-state-do { padding-left: 32px; }
  .fy-state-do::before { left: 12px; }
}
@media (max-width: 360px) {
  .fy-nav { gap: 2px 10px; font-size: 12px; }
  .fy-mark { letter-spacing: .22em; }
}
@media print {
  .fy-top, .fy-foot, .fy-toc, .fy-card .fy-btn { display: none; }
}
