@charset "UTF-8";

/* 阅读页的基础尺度 */
:root {
  color-scheme: dark;
  --paper: #080a09;
  --sheet: #0e110f;
  --ink: #f3f5f1;
  --muted: #a7afa7;
  --leaf: #b5f36b;
  --rule: #2b322c;
  --soft-rule: #1d241f;
  --rail-width: 176px;
  --measure: 1120px;
  --gutter: clamp(22px, 4.5vw, 76px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  -webkit-text-size-adjust: 100%;
}

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

button,
input {
  font: inherit;
}

img,
video {
  display: block;
  max-width: 100%;
}

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

h2,
h3 {
  line-height: 1.45;
  font-weight: 600;
  overflow-wrap: anywhere;
}

p,
dd,
td {
  overflow-wrap: anywhere;
}

::selection {
  background: var(--leaf);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 5px;
}

.assistive,
.chapter-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.reading-skip {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 18px;
  transform: translateY(-160%);
  background: var(--leaf);
  color: var(--paper);
}

.reading-skip:focus {
  transform: translateY(0);
}

/* 窄屏先使用折叠章节栏，展开后保持正常文档流 */
.chapter-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: center;
  column-gap: 18px;
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.rail-logo,
.colophon-logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
}

.rail-logo img,
.colophon-logo img {
  width: 104px;
  height: auto;
}

.chapter-key {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  cursor: pointer;
}

.chapter-key__lines,
.chapter-key__lines::before,
.chapter-key__lines::after {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--ink);
  transition: transform 180ms ease, background 180ms ease;
}

.chapter-key__lines {
  position: relative;
}

.chapter-key__lines::before,
.chapter-key__lines::after {
  position: absolute;
  left: 0;
  content: "";
}

.chapter-key__lines::before {
  transform: translateY(-6px);
}

.chapter-key__lines::after {
  transform: translateY(6px);
}

.chapter-toggle:checked + .chapter-key .chapter-key__lines {
  background: transparent;
}

.chapter-toggle:checked + .chapter-key .chapter-key__lines::before {
  transform: rotate(45deg);
}

.chapter-toggle:checked + .chapter-key .chapter-key__lines::after {
  transform: rotate(-45deg);
}

.chapter-toggle:focus-visible + .chapter-key {
  outline: 2px solid var(--leaf);
  outline-offset: 4px;
}

.chapter-links {
  display: none;
  grid-column: 1 / -1;
  padding-top: 18px;
}

.chapter-toggle:checked ~ .chapter-links {
  display: block;
}

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

.chapter-list a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding-block: 7px;
  color: var(--muted);
  font-size: 14px;
  transition: color 160ms ease;
}

.chapter-list a:hover,
.return-link:hover,
.reading-cue:hover {
  color: var(--leaf);
}

.rail-device {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  margin-top: 14px;
  padding: 8px 14px;
  border: 1px solid #4d643b;
  color: var(--leaf);
  font-size: 14px;
}

.rail-device:hover {
  border-color: var(--leaf);
  background: #14200e;
}

@media (min-width: 70rem) {
  .chapter-rail {
    position: fixed;
    z-index: 10;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: var(--rail-width);
    padding: 34px 24px 28px;
    overflow-y: auto;
    border-right: 1px solid var(--rule);
    border-bottom: 0;
  }

  .chapter-toggle,
  .chapter-key {
    display: none;
  }

  .rail-logo {
    flex-shrink: 0;
  }

  .chapter-links,
  .chapter-toggle:checked ~ .chapter-links {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding-top: clamp(64px, 12vh, 120px);
  }

  .chapter-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .chapter-list a {
    border-bottom: 1px solid var(--soft-rule);
  }

  .rail-device {
    margin-top: auto;
  }
}

/* 主体为连续手册，不为每个章节建立重复的面板框 */
.reading-room,
.book-end {
  width: 100%;
  padding-inline: var(--gutter);
}

.reading-room > section,
.book-end > div {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
}

.reading-room > section + section {
  padding-block: 54px 62px;
  border-top: 1px solid var(--rule);
}

.chapter-heading {
  display: grid;
  gap: 19px;
  margin-bottom: 32px;
}

.chapter-heading h2,
.dispatches > h2 {
  font-size: clamp(27px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.chapter-heading > p {
  max-width: 760px;
  color: var(--muted);
}

@media (min-width: 70rem) {
  .reading-room,
  .book-end {
    width: calc(100% - var(--rail-width));
    margin-left: var(--rail-width);
  }

  .reading-room > section + section {
    padding-block: 76px 84px;
  }

  .chapter-heading {
    grid-template-columns: minmax(170px, 0.8fr) minmax(0, 1.7fr);
    gap: 32px;
    align-items: start;
    margin-bottom: 44px;
  }

  .chapter-heading > p {
    padding-top: 7px;
  }
}

/* 开场：文字与完整视频各占一个真实内容位置 */
.introduction {
  display: grid;
  justify-items: start;
  gap: 38px;
  padding-block: 49px 58px;
}

.introduction-words {
  min-width: 0;
}

.subject-line {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.introduction-title {
  display: grid;
  gap: 10px;
  margin-bottom: 23px;
  font-size: clamp(29px, 4.2vw, 46px);
  letter-spacing: -0.04em;
}

.introduction-keyword,
.introduction-statement {
  display: block;
}

.introduction-statement {
  color: var(--leaf);
  font-size: clamp(26px, 3.3vw, 39px);
  line-height: 1.5;
}

.introduction-copy {
  max-width: 570px;
  color: var(--muted);
  line-height: 1.95;
}

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

.solid-link,
.outline-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 48px;
  padding: 11px 20px;
  border: 1px solid var(--leaf);
  border-radius: 3px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  transition: background 160ms ease, border-color 160ms ease;
}

.solid-link {
  background: var(--leaf);
  color: #11170b;
}

.solid-link:hover {
  border-color: #c6ff85;
  background: #c6ff85;
}

.outline-link {
  border-color: #485244;
  background: transparent;
  color: var(--ink);
}

.outline-link:hover {
  border-color: var(--leaf);
  background: #131c0f;
}

.reading-cue {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  min-height: 44px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 13px;
}

.introduction-film {
  justify-self: center;
  width: min(58vw, 238px);
  height: auto;
  object-fit: contain;
}

@media (min-width: 42rem) and (max-width: 69.999rem) {
  .introduction {
    grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.7fr);
    align-items: center;
    column-gap: 32px;
    padding-block: 62px 70px;
  }

  .introduction-film {
    width: 100%;
    max-width: 226px;
  }
}

@media (min-width: 70rem) {
  .introduction {
    grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.8fr);
    align-items: center;
    gap: clamp(32px, 4.3vw, 70px);
    min-height: 680px;
    padding-block: 64px 76px;
  }

  .introduction-film {
    width: 100%;
    max-width: 254px;
  }
}

@media (min-width: 88rem) {
  .introduction-title {
    font-size: 50px;
  }

  .introduction-statement {
    font-size: 41px;
  }

  .introduction {
    min-height: 730px;
  }
}

/* 功能采用定义条目，每条承担一个具体职责 */
.toolkit-topics {
  border-top: 1px solid var(--rule);
}

.toolkit-topic {
  display: grid;
  gap: 13px;
  padding-block: 27px 30px;
  border-bottom: 1px solid var(--rule);
}

.toolkit-topic dt {
  color: var(--ink);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.5;
}

.toolkit-topic dd {
  min-width: 0;
  max-width: 760px;
  color: var(--muted);
}

@media (min-width: 42rem) {
  .toolkit-topic {
    grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.7fr);
    gap: 32px;
    padding-block: 34px 38px;
  }

  .toolkit-topic dt {
    font-size: 25px;
  }

  .toolkit-topic dd {
    padding-top: 2px;
  }
}

/* 两个场景是主次文章，不是连续安装步骤 */
.scenario-pair {
  display: grid;
  gap: 26px;
}

.scenario-essay {
  padding: 27px 24px 30px;
  border-top: 2px solid var(--leaf);
  background: var(--sheet);
}

.scenario-essay h3 {
  margin-bottom: 17px;
  font-size: 25px;
  letter-spacing: -0.02em;
}

.scenario-essay p {
  color: var(--muted);
}

.scenario-essay--aside {
  border-top-color: #52604c;
  background: transparent;
}

@media (min-width: 42rem) {
  .scenario-pair {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
    align-items: start;
    gap: 38px;
  }

  .scenario-essay {
    padding: 32px 30px 38px;
  }

  .scenario-essay--aside {
    margin-top: 54px;
    padding-inline: 0;
  }
}

/* 终端记录使用原生表格；小屏按行读取，不出现横向表格滚动 */
.terminal-table {
  display: block;
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.terminal-table caption,
.terminal-table thead {
  display: none;
}

.terminal-table tbody {
  display: block;
}

.terminal-table tr {
  display: grid;
  gap: 17px;
  padding: 27px 0 30px;
  border-top: 1px solid var(--rule);
}

.terminal-table tr:last-child {
  border-bottom: 1px solid var(--rule);
}

.terminal-table th[scope="row"] {
  color: var(--ink);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.5;
}

.terminal-table td {
  display: block;
  min-width: 0;
  color: var(--muted);
  line-height: 1.85;
}

.terminal-table td::before {
  display: block;
  margin-bottom: 5px;
  color: #d0d8cb;
  content: attr(data-label);
  font-size: 12px;
}

.terminal-table td:last-child span {
  display: inline-block;
  margin-right: 16px;
}

.terminal-table td:last-child span:last-child {
  margin-right: 0;
}

@media (min-width: 42rem) {
  .terminal-table {
    display: table;
    table-layout: fixed;
  }

  .terminal-table thead {
    display: table-header-group;
    color: var(--muted);
    font-size: 13px;
  }

  .terminal-table tbody {
    display: table-row-group;
  }

  .terminal-table tr {
    display: table-row;
  }

  .terminal-table th,
  .terminal-table td {
    display: table-cell;
    padding: 26px 24px 28px 0;
    vertical-align: top;
  }

  .terminal-table th:first-child {
    width: 24%;
  }

  .terminal-table th:last-child {
    width: 23%;
    padding-right: 0;
  }

  .terminal-table thead th {
    padding-block: 0 18px;
    font-weight: 400;
  }

  .terminal-table td:last-child {
    padding-right: 0;
    color: #c3cebb;
    font-size: 14px;
  }

  .terminal-table td::before {
    content: none;
  }

  .terminal-table td:last-child span {
    display: block;
    margin: 0;
  }
}

/* 问答是连续索引，可原生展开，多条可同时阅读 */
.answer-entries {
  padding: 0;
  border-bottom: 1px solid var(--rule);
  list-style: none;
  counter-reset: answer;
}

.answer-entries > li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  border-top: 1px solid var(--rule);
  counter-increment: answer;
}

.answer-entries > li::before {
  padding-top: 25px;
  color: #799065;
  content: counter(answer, decimal-leading-zero);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.answer-entries details {
  min-width: 0;
}

.answer-entries summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 80px;
  padding-block: 22px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.65;
  cursor: pointer;
  list-style: none;
  overflow-wrap: anywhere;
}

.answer-entries summary::-webkit-details-marker {
  display: none;
}

.answer-entries summary::after {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 1px solid var(--leaf);
  border-bottom: 1px solid var(--leaf);
  content: "";
  transform: rotate(45deg) translateY(-3px);
}

.answer-entries details[open] > summary::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.answer-entries details[open] > summary {
  color: var(--leaf);
}

.answer-prose {
  max-width: 850px;
  padding: 0 22px 29px 0;
  color: var(--muted);
}

@media (min-width: 42rem) {
  .answer-entries > li {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 18px;
  }

  .answer-entries summary {
    font-size: 20px;
  }
}

/* 快讯仅保留图片与标题，比例由图片容器统一负责 */
.dispatches > h2 {
  margin-bottom: 30px;
}

.dispatch-row {
  display: grid;
  gap: 35px;
}

.dispatch-story {
  min-width: 0;
}

.dispatch-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--sheet);
}

.dispatch-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dispatch-story h3 {
  margin-top: 17px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.7;
}

@media (min-width: 42rem) {
  .dispatch-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 22px;
  }

  .dispatch-story h3 {
    margin-top: 18px;
    font-size: 18px;
  }
}

/* 行动页尾与品牌签名合并，但不再重复正文 */
.book-end {
  padding-block: 0 23px;
}

.closing-invitation {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 27px;
  padding: 33px 0 38px;
  border-top: 1px solid #506440;
}

.closing-invitation h2 {
  max-width: 570px;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.025em;
}

.closing-invitation .outline-link {
  flex-shrink: 0;
  border-color: #506440;
  color: var(--leaf);
}

.book-colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 25px;
  padding-block: 25px 0;
  border-top: 1px solid var(--rule);
}

.book-colophon p {
  width: 100%;
  order: 3;
  color: var(--muted);
  font-size: 12px;
}

.return-link {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-height: 44px;
  color: var(--muted);
  font-size: 12px;
}

@media (min-width: 42rem) {
  .closing-invitation {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    padding-block: 44px 49px;
  }

  .book-colophon p {
    flex: 1;
    width: auto;
    order: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

