:root {
  color-scheme: light;
  --paper: #f7f8f3;
  --white: #fff;
  --ink: #1a2e2a;
  --muted: #4e655d;
  --line: #d3ddd4;
  --accent: #126447;
  --soft: #e5f1e7;
  --amber: #8a4d10;
  --amber-soft: #fff2d7;
  --red: #962f35;
  --red-soft: #fae9e7;
  font: 16px/1.6 "Segoe UI", "Microsoft YaHei UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: var(--accent); text-underline-offset: .2em; }
a:focus-visible { outline: 3px solid #ba742f; outline-offset: 4px; }
code { font-family: "Cascadia Mono", Consolas, monospace; font-size: .9em; overflow-wrap: anywhere; }
p { margin: 0 0 .8rem; }
h1, h2, h3 { line-height: 1.22; margin: 0; }
strong { font-weight: 700; }

.skip { position: absolute; top: .7rem; left: .7rem; padding: .45rem .8rem; background: var(--white); transform: translateY(-180%); }
.skip:focus { transform: none; }
.wrap { width: min(1160px, 94%); margin-inline: auto; }
.top { min-height: 66px; display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.2rem; justify-content: space-between; }
.brand, .top-actions, .language { display: flex; align-items: center; gap: .65rem; }
.brand { font-weight: 750; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; color: var(--white); background: var(--accent); border-radius: 7px; font: 800 .8rem/1 "Cascadia Mono", monospace; }
.back { font-size: .88rem; font-weight: 650; }
.language { border-left: 1px solid var(--line); padding-left: .8rem; }
.language a, .language span { padding: .24rem .55rem; border-radius: 5px; font-size: .86rem; }
.language [aria-current] { background: var(--soft); color: var(--ink); font-weight: 740; }

.hero { background: #163e33; color: var(--white); border-bottom: 4px solid #9cc4a3; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(240px, .72fr); gap: 35px; align-items: center; padding-block: 48px; }
.version { color: #c7e3c9; font: 700 .79rem/1.4 "Cascadia Mono", Consolas, "Microsoft YaHei UI", monospace; letter-spacing: .035em; margin-bottom: 12px; }
h1 { font-size: clamp(2.25rem, 4.4vw, 3.6rem); letter-spacing: -.04em; }
.hero p:last-child { max-width: 56ch; color: #e1eee3; margin: 14px 0 0; }
.hero-note { padding: 17px 20px; border: 1px solid #66917e; border-left: 3px solid #b0d4a6; border-radius: 6px; font-size: .92rem; }
.hero-note strong { display: block; margin-bottom: .3rem; }

.content { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; align-items: start; padding-block: 30px 56px; }
.contents { position: sticky; top: 18px; padding: 13px 0; border-right: 1px solid var(--line); }
.contents ul { margin: .45rem 0 0; padding: 0; list-style: none; }
.contents a { display: block; padding: .35rem .65rem .35rem 0; font-size: .88rem; }
.guide-body { min-width: 0; }
.guide-step { margin-bottom: 34px; padding-bottom: 28px; border-bottom: 1px solid var(--line); scroll-margin-top: 16px; }
.section-title { display: flex; align-items: baseline; gap: 11px; margin-bottom: 15px; }
.section-title > span { color: var(--accent); font: 700 .85rem/1 "Cascadia Mono", monospace; }
h2 { font-size: 1.55rem; }
.instruction-grid { display: grid; grid-template-columns: minmax(190px, .86fr) minmax(270px, 1.14fr); gap: 25px; align-items: start; }
.steps { padding-left: 1.35rem; margin: 0; }
.steps li { padding-left: .18rem; margin-bottom: .55rem; }
.steps li::marker { color: var(--accent); font-weight: 700; }
.hint { border-left: 3px solid #81ab87; padding-left: .75rem; color: var(--muted); font-size: .9rem; margin: .75rem 0 0; }

figure { min-width: 0; margin: 0; }
.ui { background: var(--white); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; box-shadow: 0 5px 12px #163e330a; font-size: .81rem; }
.ui-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 13px; background: #edf2eb; border-bottom: 1px solid var(--line); font-weight: 720; }
.ui-bar small { font-size: .72rem; color: var(--muted); }
.ui-body { display: grid; gap: 10px; padding: 13px; }
.tree { margin: 0; padding: 0; list-style: none; }
.tree ul { margin: 3px 0 0 7px; padding: 0 0 0 13px; list-style: none; border-left: 1px solid #aac0af; }
.tree li { margin: 2px 0; }
.preview-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 5px 9px; padding: 6px 9px; background: #f4f6f2; border: 1px solid #dbe3da; border-radius: 5px; }
.ui-key { font-weight: 700; }
.ui-action { color: var(--white); background: var(--accent); font-weight: 700; border-radius: 5px; padding: 3px 8px; display: inline-block; width: fit-content; }
.status { display: inline-block; border-radius: 4px; padding: 1px 6px; background: var(--soft); color: #144e37; font-weight: 720; }
.status-amber { background: var(--amber-soft); color: var(--amber); }
.status-red { background: var(--red-soft); color: var(--red); }
.subline { color: var(--muted); padding-inline: 8px; }
figcaption { color: var(--muted); font-size: .8rem; margin: 6px 0 0; }
.real-screen { margin-block-start: 14px; }
.real-screen summary { width: fit-content; color: var(--accent); font-weight: 700; cursor: pointer; }
.real-screen figure { margin: 10px 0 0; }
.real-screen img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 7px; }

.roles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.role { border: 1px solid var(--line); border-radius: 7px; background: var(--white); padding: 13px 15px; }
.role h3 { font-size: .98rem; margin-bottom: 5px; }
.role p { margin: 0; font-size: .9rem; }
.footer { display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); padding-block: 16px 24px; color: var(--muted); font-size: .86rem; }

@media (max-width: 820px) {
  .content { grid-template-columns: 1fr; gap: 10px; }
  .contents { position: static; border-right: 0; border-bottom: 1px solid var(--line); }
  .contents ul { display: flex; flex-wrap: wrap; gap: 0 15px; }
}
@media (max-width: 620px) {
  .hero-inner, .instruction-grid, .roles { grid-template-columns: 1fr; gap: 15px; }
  .hero-inner { padding-block: 27px; }
  .footer { flex-wrap: wrap; }
}
@media print {
  body { background: #fff; }
  .top-actions, .contents, .footer { display: none; }
  .content { display: block; padding-block: 16px; }
  .hero { color: var(--ink); background: #fff; }
  .hero p:last-child, .version { color: var(--ink); }
  .hero-inner { padding-block: 20px; }
  .guide-step { break-inside: avoid; }
}
