/* P15 学生分步图解与教材阅读层 */
.p15-reading-layer {
  --p15-blue: #1769aa;
  --p15-blue-soft: #edf6ff;
  --p15-blue-line: #b9d8ee;
  --p15-teal: #087f73;
  --p15-teal-soft: #e9f7f4;
  --p15-teal-line: #addbd3;
  --p15-ink: #153243;
  --p15-muted: #48616f;
  --p15-line: #c9dbe0;
  --p15-surface: #ffffff;
  --p15-canvas: #f7fbfc;
  margin-top: 20px;
  color: var(--p15-ink);
  font-size: 14px;
  line-height: 1.55;
}

.p15-reading-details,
.p15-glossary {
  overflow: hidden;
  background: var(--p15-surface);
  border: 1px solid var(--p15-line);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(16, 64, 74, .05);
}

.p15-reading-summary,
.p15-glossary-summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  color: var(--p15-ink);
  background: linear-gradient(90deg, #f5fbfc, #ffffff);
  cursor: pointer;
  list-style: none;
}

.p15-reading-summary::-webkit-details-marker,
.p15-glossary-summary::-webkit-details-marker {
  display: none;
}

.p15-reading-summary:focus-visible,
.p15-glossary-summary:focus-visible {
  outline: 2px solid var(--p15-blue);
  outline-offset: -2px;
}

.p15-reading-summary-leading {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.p15-reading-summary-title,
.p15-glossary-title {
  color: var(--p15-ink);
  font-size: 16px;
  font-weight: 700;
}

.p15-reading-summary-subtitle {
  overflow: hidden;
  color: var(--p15-muted);
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.p15-reading-status,
.p15-glossary-count {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 9px;
  color: var(--p15-blue);
  background: var(--p15-blue-soft);
  border: 1px solid var(--p15-blue-line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
}

.p15-reading-details[open] > .p15-reading-summary,
.p15-glossary[open] > .p15-glossary-summary {
  border-bottom: 1px solid var(--p15-line);
}

.p15-reading-body {
  padding: 14px;
  background: #fcfeff;
}

.p15-reading-intro {
  margin: 0 0 12px;
  color: var(--p15-muted);
  font-size: 14px;
  line-height: 1.6;
}

.p15-step-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(260px, .93fr);
  gap: 14px;
  align-items: start;
}

.p15-step-figure {
  min-width: 0;
  margin: 0;
  padding: 8px;
  background: var(--p15-surface);
  border: 1px solid var(--p15-line);
  border-radius: 9px;
}

.p15-step-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 170px;
}

.p15-step-figure figcaption {
  margin: 7px 3px 1px;
  color: var(--p15-muted);
  font-size: 14px;
  line-height: 1.5;
}

.p15-step-copy {
  min-width: 0;
}

.p15-step-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 3px 0 13px;
}

.p15-step-number {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  background: var(--p15-teal);
  border-radius: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
}

.p15-step-kicker {
  margin: 0 0 3px;
  color: var(--p15-teal);
  font-size: 13px;
  font-weight: 700;
}

.p15-step-copy h3 {
  margin: 0;
  color: var(--p15-ink);
  font-size: 19px;
  line-height: 1.4;
}

.p15-observation,
.p15-check-action {
  margin: 0 0 10px;
  padding: 11px 12px;
  border: 1px solid;
  border-left-width: 4px;
  border-radius: 7px;
  font-size: 14px;
  line-height: 1.65;
}

.p15-observation {
  color: #285363;
  background: var(--p15-teal-soft);
  border-color: var(--p15-teal-line);
  border-left-color: var(--p15-teal);
}

.p15-check-action {
  color: #214d72;
  background: var(--p15-blue-soft);
  border-color: var(--p15-blue-line);
  border-left-color: var(--p15-blue);
}

.p15-observation strong,
.p15-check-action strong {
  display: block;
  margin-bottom: 2px;
  color: var(--p15-ink);
  font-size: 14px;
}

.p15-reading-controls {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--p15-line);
}

.p15-reading-button {
  min-width: 96px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.p15-reading-button-primary {
  color: #ffffff;
  background: var(--p15-blue);
  border-color: var(--p15-blue);
}

.p15-reading-button-primary:hover {
  background: #0f568e;
}

.p15-reading-button-secondary {
  color: var(--p15-blue);
  background: var(--p15-blue-soft);
  border-color: var(--p15-blue-line);
}

.p15-reading-button-secondary:hover {
  background: #deeffb;
}

.p15-reading-button:focus-visible {
  outline: 2px solid var(--p15-teal);
  outline-offset: 2px;
}

.p15-reading-button[disabled] {
  cursor: not-allowed;
  opacity: .45;
}

.p15-reading-position {
  min-width: 92px;
  color: var(--p15-muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.p15-keyboard-hint {
  margin: 8px 0 0;
  color: var(--p15-muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.p15-glossary {
  margin-top: 10px;
}

.p15-glossary-summary {
  min-height: 44px;
  background: #f8fcfb;
}

.p15-glossary-count {
  color: var(--p15-teal);
  background: var(--p15-teal-soft);
  border-color: var(--p15-teal-line);
  font-size: 12px;
}

.p15-glossary-content {
  padding: 10px 14px 13px;
}

.p15-glossary-toolbar {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.p15-term-search-label {
  flex: 0 0 auto;
  color: var(--p15-ink);
  font-size: 14px;
  font-weight: 700;
}

.p15-term-search {
  flex: 1 1 190px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  color: var(--p15-ink);
  background: #ffffff;
  border: 1px solid #9cbcc3;
  border-radius: 7px;
  font-size: 14px;
  line-height: 1.4;
}

.p15-term-search:focus-visible {
  outline: 2px solid var(--p15-blue);
  outline-offset: 2px;
  border-color: var(--p15-blue);
}

.p15-term-search-status {
  flex: 0 0 auto;
  color: var(--p15-muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.p15-glossary-note {
  margin: 0 0 9px;
  color: var(--p15-muted);
  font-size: 13px;
  line-height: 1.5;
}

.p15-glossary-no-results {
  margin: 0 0 9px;
  padding: 8px 10px;
  color: #7a5600;
  background: #fff8df;
  border: 1px solid #e1bd57;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
}

.p15-term.is-hidden {
  display: none;
}

.p15-term-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  margin: 0;
}

.p15-term {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
  align-items: start;
  padding: 7px 8px;
  background: #fbfefe;
  border: 1px solid #d9e8e9;
  border-radius: 6px;
}

.p15-term dt {
  color: var(--p15-teal);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.p15-term dd {
  min-width: 0;
  margin: 0;
  color: var(--p15-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* 统一的原创 SVG 图示样式。文本保持足够对比度，便于 390 px 阅读。 */
.p15-step-svg text {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.p15-svg-canvas { fill: var(--p15-canvas); stroke: #d7e8ea; stroke-width: 1; }
.p15-svg-title { fill: var(--p15-ink); font-size: 16px; font-weight: 700; }
.p15-svg-label { fill: var(--p15-ink); font-size: 14px; font-weight: 700; }
.p15-svg-note { fill: var(--p15-muted); font-size: 13px; }
.p15-svg-warning-text { fill: #8a5a00; font-size: 13px; font-weight: 700; }
.p15-svg-badge-text { fill: #ffffff; font-size: 13px; font-weight: 700; }
.p15-svg-placeholder { fill: #6d848c; font-size: 13px; }

.p15-svg-arm { stroke: #a8bec4; stroke-width: 18; stroke-linecap: round; }
.p15-svg-arm-segment { stroke: #6aa9ad; stroke-width: 20; stroke-linecap: round; opacity: 0; }
.p15-svg-highlight-mid { opacity: 1; }
.p15-svg-center-plate { fill: #e2eef0; stroke: #78979f; stroke-width: 2; }
.p15-svg-center-mark { fill: #ffffff; stroke: #4b7882; stroke-width: 2; }
.p15-svg-highlight-center { fill: #c8eee5; stroke: var(--p15-teal); stroke-width: 3; }
.p15-svg-mid-dot { fill: #ffffff; stroke: #61848b; stroke-width: 2; }
.p15-svg-mid-dot.p15-svg-highlight-mid { fill: #d1f1ec; stroke: var(--p15-teal); stroke-width: 3; }
.p15-svg-motor-pad { fill: #ffffff; stroke: #78979f; stroke-width: 2; }
.p15-svg-motor-core { fill: #d6e7ea; stroke: #4b7882; stroke-width: 2; }
.p15-svg-motor-label { fill: var(--p15-ink); font-size: 11px; font-weight: 700; }
.p15-motor-position.p15-svg-highlight-end .p15-svg-motor-pad { fill: #d5eef0; stroke: var(--p15-blue); stroke-width: 3; }
.p15-motor-position.p15-svg-highlight-end .p15-svg-motor-core { fill: #bde3e7; stroke: var(--p15-blue); stroke-width: 2; }
.p15-svg-nose-line { stroke: var(--p15-blue); stroke-width: 2; }
.p15-svg-nose-head { fill: var(--p15-blue); }
.p15-svg-nose-label { fill: var(--p15-blue); font-size: 13px; font-weight: 700; }
.p15-svg-faded { opacity: .45; }
.p15-svg-badge { stroke-width: 1; }
.p15-svg-badge-blue { fill: var(--p15-blue); stroke: var(--p15-blue); }
.p15-svg-badge-teal { fill: var(--p15-teal); stroke: var(--p15-teal); }
.p15-svg-badge-safe { fill: #3d8c68; stroke: #3d8c68; }

.p15-svg-battery { fill: #d6ebe8; stroke: #34877b; stroke-width: 2; }
.p15-svg-battery-band { fill: #34877b; }
.p15-svg-cable { stroke: #7e9aa1; stroke-width: 3; stroke-dasharray: 6 5; }
.p15-svg-connector { fill: #ffffff; stroke: #34877b; stroke-width: 2; }
.p15-svg-separation { fill: none; stroke: #b07000; stroke-width: 2; stroke-dasharray: 4 4; }
.p15-svg-tool { fill: #e6f1f4; stroke: #557c85; stroke-width: 2; }
.p15-svg-tool-screen { fill: #ffffff; stroke: #88aab1; stroke-width: 1; }
.p15-svg-tool-text { fill: #355c65; font-size: 11px; font-weight: 700; }
.p15-svg-probe { fill: none; stroke-width: 3; }
.p15-svg-probe-red { stroke: #c14d4d; }
.p15-svg-probe-black { stroke: #35454a; }
.p15-svg-probe-tip { fill: #c14d4d; }
.p15-svg-probe-tip-black { fill: #35454a; }
.p15-svg-record { fill: #ffffff; stroke: #89abb0; stroke-width: 2; }
.p15-svg-record-line, .p15-svg-form-line { stroke: #c5dadd; stroke-width: 1; }
.p15-svg-checkbox { fill: #e8f7f2; stroke: #3c927c; stroke-width: 1.5; }
.p15-svg-gate { fill: #ffffff; stroke: #8bb8b5; stroke-width: 2; }
.p15-svg-round-check { fill: #d8f1e9; stroke: #32856e; stroke-width: 2; }
.p15-svg-check-mark { fill: #26745f; font-size: 21px; font-weight: 700; }
.p15-svg-gate-arrow { fill: none; stroke: var(--p15-teal); stroke-width: 2; }
.p15-svg-gate-arrow-head { fill: var(--p15-teal); }

.p15-svg-component-chip { fill: #dcecf8; stroke: #5d9dc6; stroke-width: 1; }
.p15-svg-component-chip-teal { fill: #d6f0eb; stroke: #54a191; stroke-width: 1; }
.p15-svg-chip-text { fill: #244e5c; font-size: 11px; font-weight: 700; }
.p15-svg-esc-chip { fill: #bde9dd; stroke: var(--p15-teal); stroke-width: 2; }
.p15-svg-end-bracket { fill: none; stroke: var(--p15-blue); stroke-width: 2; }

.p15-svg-card { fill: #ffffff; stroke: #84a7b0; stroke-width: 2; }
.p15-svg-card-header { fill: #e8f3f7; }
.p15-svg-info-dot { fill: var(--p15-blue); }
.p15-svg-info-text { fill: #ffffff; font-size: 12px; font-weight: 700; }
.p15-svg-horizon { stroke: var(--p15-teal); stroke-width: 3; stroke-dasharray: 9 6; }
.p15-svg-horizon-tick { fill: none; stroke: var(--p15-teal); stroke-width: 2; }
.p15-svg-aircraft-level path, .p15-svg-aircraft-tilted path { fill: #badde8; stroke: #3c7587; stroke-width: 2; }
.p15-svg-aircraft-level circle, .p15-svg-aircraft-tilted circle { fill: #ffffff; stroke: #3c7587; stroke-width: 2; }
.p15-svg-deviation { stroke: #c28300; stroke-width: 2; stroke-dasharray: 5 4; }
.p15-svg-deviation-brace { fill: none; stroke: #c28300; stroke-width: 2; }
.p15-svg-magnifier { fill: #fff9e5; stroke: #b07000; stroke-width: 2; }
.p15-svg-magnifier-handle { stroke: #b07000; stroke-width: 3; }
.p15-svg-check-card { fill: #ffffff; stroke: #8ba8ae; stroke-width: 2; }
.p15-svg-check-card-teal { fill: #dcf3ee; stroke: var(--p15-teal); }
.p15-svg-small-check { fill: #fff9e5; stroke: #b07000; stroke-width: 1.5; }
.p15-svg-question-mark { fill: #8a5a00; font-size: 11px; font-weight: 700; }
.p15-svg-process-arrow { fill: none; stroke: var(--p15-blue); stroke-width: 3; }
.p15-svg-process-arrow-head { fill: var(--p15-blue); }

.p15-svg-window { fill: #ffffff; stroke: #7d9da5; stroke-width: 2; }
.p15-svg-window-bar { fill: #e4f1f4; }
.p15-svg-window-dot { fill: #6a9ba4; }
.p15-svg-window-dot-teal { fill: var(--p15-teal); }
.p15-svg-window-rail { fill: #f1f8f9; stroke: #d0e4e7; stroke-width: 1; }
.p15-svg-window-content { fill: #fbfeff; stroke: #d0e4e7; stroke-width: 1; }
.p15-svg-row-dot { fill: #b6cdd2; }
.p15-svg-row-dot-active { fill: var(--p15-teal); }
.p15-svg-row-number { fill: #ffffff; font-size: 10px; font-weight: 700; }
.p15-svg-row-label { fill: var(--p15-muted); font-size: 12px; }
.p15-svg-row-label-active { fill: var(--p15-teal); font-weight: 700; }
.p15-svg-content-rule, .p15-svg-content-line { stroke: #c9dfe1; stroke-width: 1; }
.p15-svg-content-line-active { stroke: var(--p15-teal); stroke-width: 3; }
.p15-svg-content-chip { fill: #e8f2fa; stroke: #a3c8e4; stroke-width: 1; }
.p15-svg-content-chip-teal { fill: #e0f4ef; stroke: #9bcfc3; }

.p15-svg-rotation-arrow { fill: none; stroke: #3f8a82; stroke-width: 2; }
.p15-svg-rotation-cw { stroke: var(--p15-blue); }
.p15-svg-rotation-ccw { stroke: var(--p15-teal); }
.p15-svg-rotation-label { fill: var(--p15-muted); font-size: 11px; font-weight: 700; }
.p15-svg-output-card, .p15-svg-test-card { fill: #ffffff; stroke: #84a7b0; stroke-width: 2; }
.p15-svg-output-id { fill: #e5f0f5; stroke: #86adb6; stroke-width: 1; }
.p15-svg-dash-line { stroke: #a2bdc3; stroke-width: 2; stroke-dasharray: 6 5; }
.p15-svg-pending-chip { fill: #fff3cf; stroke: #e0b44a; stroke-width: 1; }
.p15-svg-pending-text { fill: #835b00; font-size: 11px; font-weight: 700; }
.p15-svg-test-header { fill: #e6f2f5; }
.p15-svg-table-head { fill: #315b67; font-size: 12px; font-weight: 700; }

@media (max-width: 680px) {
  .p15-step-panel { grid-template-columns: 1fr; }
  .p15-step-figure { order: 1; }
  .p15-step-copy { order: 2; }
  .p15-reading-summary-subtitle { display: none; }
}

@media (max-width: 520px) {
  .p15-reading-layer { margin-top: 16px; }
  .p15-reading-summary,
  .p15-glossary-summary { padding-right: 11px; padding-left: 11px; }
  .p15-reading-body,
  .p15-glossary-content { padding-right: 10px; padding-left: 10px; }
  .p15-reading-controls { flex-wrap: wrap; }
  .p15-reading-button { flex: 1 1 108px; }
  .p15-reading-position { order: -1; flex: 1 0 100%; }
  .p15-glossary-toolbar { flex-wrap: wrap; }
  .p15-term-search { flex-basis: 170px; }
  .p15-term-list { grid-template-columns: 1fr; }
  .p15-step-figure figcaption { font-size: 14px; }
}

@media print {
  .p15-reading-layer { margin-top: 12px; color: #111111; box-shadow: none; break-inside: avoid; }
  .p15-reading-details,
  .p15-glossary { display: block; overflow: visible; box-shadow: none; }
  .p15-reading-details > .p15-reading-summary,
  .p15-glossary > .p15-glossary-summary { border-bottom: 1px solid #9aa; cursor: default; }
  .p15-reading-details > .p15-reading-summary::after,
  .p15-glossary > .p15-glossary-summary::after { content: ""; }
  .p15-reading-body,
  .p15-glossary-content { display: block; }
  .p15-reading-controls,
  .p15-keyboard-hint { display: none; }
  .p15-glossary-toolbar,
  .p15-glossary-no-results { display: none; }
  .p15-term.is-hidden { display: grid; }
  .p15-reading-summary-subtitle { display: inline; white-space: normal; }
  .p15-step-panel { grid-template-columns: minmax(0, 1fr) minmax(240px, .9fr); }
  .p15-step-figure,
  .p15-term { break-inside: avoid; }
  .p15-term-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .p15-reading-layer *,
  .p15-reading-layer *::before,
  .p15-reading-layer *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
