/* 理光手册助手：在既有工单纸体系内组织检索、证据与转报修。 */

[hidden] { display: none !important; }

.manual-main { padding-top: 32px; }
.manual-sheet { scroll-margin-top: 96px; }
.manual-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(250px, 0.9fr);
  gap: 48px;
  align-items: start;
}
.manual-intro {
  max-width: 38em;
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: 1.04rem;
  line-height: 1.8;
}
.manual-intro .mark { color: var(--carbon-blue); }

.model-options {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.model-options legend { margin-bottom: 8px; }
.model-option { position: relative; min-width: 0; cursor: pointer; }
.model-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.model-option-body {
  display: block;
  min-height: 82px;
  padding: 14px 12px 12px 40px;
  border: 1px solid #b9c0c9;
  border-radius: 3px;
  background: var(--paper);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.model-option-body::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 20px;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--ink-soft);
  border-radius: 50%;
  background: var(--paper-raised);
}
.model-option-body strong { display: block; font-size: 0.98rem; line-height: 1.4; }
.model-option-body small { display: block; margin-top: 5px; color: var(--ink-soft); font-size: 0.74rem; line-height: 1.5; }
.model-option input:checked + .model-option-body {
  border-color: var(--carbon-blue);
  background: #f0f4fb;
  box-shadow: inset 0 0 0 1px var(--carbon-blue);
}
.model-option input:checked + .model-option-body::before {
  border-color: var(--carbon-blue);
  background: var(--carbon-blue);
  box-shadow: inset 0 0 0 3px #f0f4fb;
}
.model-option input:focus-visible + .model-option-body {
  outline: 2.5px solid var(--carbon-blue);
  outline-offset: 2px;
}
.model-options:disabled .model-option { cursor: wait; }
.model-options:disabled .model-option-body { opacity: 0.7; }

.manual-query-field { margin-bottom: 12px; }
.manual-query-field textarea {
  display: block;
  width: 100%;
  min-height: 126px;
  max-height: 340px;
  resize: vertical;
  padding: 13px 14px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #b9c0c9;
  border-radius: 3px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.manual-query-field textarea::placeholder { color: #646b75; opacity: 1; }
.manual-query-field textarea:focus { border-color: var(--carbon-blue); background: #fff; outline: none; }
.manual-query-field textarea[readonly] { color: var(--ink-soft); }
.ask-actions { display: flex; align-items: center; gap: 18px; }
.ask-actions .btn-stamp { width: auto; min-width: 164px; }
.ask-hint { color: var(--ink-soft); font-size: 0.76rem; }

.example-block {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1.5px dashed #b9c0c9;
}
.example-block h2,
.manual-scope h2,
.repair-slip h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
}
.example-list { display: flex; flex-direction: column; }
.example-question {
  width: 100%;
  padding: 11px 3px;
  border: 0;
  border-bottom: 1px solid var(--grid-line);
  border-radius: 0;
  background: transparent;
  color: var(--carbon-blue);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: background-color 0.15s ease, text-decoration-color 0.15s ease;
}
.example-question:hover { background: #f4f6fa; text-decoration-color: var(--carbon-blue); }
.example-question:disabled { color: var(--pencil-gray); cursor: wait; }
.example-block .src-note { display: block; margin-top: 10px; }

.manual-scope { border-top: 3px solid var(--ink); padding-top: 18px; }
.manual-scope > h2 { font-size: 1.15rem; margin-bottom: 18px; }
.scope-fields { margin: 0; display: flex; flex-direction: column; gap: 13px; }
.scope-fields > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  font-size: 0.86rem;
}
.scope-fields dt { color: var(--carbon-blue); font-weight: 700; white-space: nowrap; }
.scope-fields dd { margin: 0; color: var(--ink-soft); }
.manual-scope > .src-note { display: block; margin-top: 18px; line-height: 1.7; }
.repair-slip { margin-top: 26px; padding: 20px 12px 0; border-top: 1.5px dashed #b9c0c9; }
.repair-slip p { margin: 0 0 14px; color: var(--ink-soft); font-size: 0.88rem; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--carbon-blue);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(30,79,163,0.45);
  text-underline-offset: 4px;
}
.text-link:hover { text-decoration-color: var(--carbon-blue); }
.text-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.answer-region {
  margin-top: 38px;
  padding-top: 26px;
  border-top: 2px solid var(--ink);
  scroll-margin-top: 110px;
}
.answer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.answer-head h2 { margin: 0; font-size: 1.35rem; line-height: 1.4; text-wrap: balance; }
.answer-meta { margin: 5px 0 0; color: var(--ink-soft); font-size: 0.8rem; }
.answer-stamp { position: relative; flex: none; width: 84px; height: 84px; padding: 8px; }
.answer-stamp .stamp-line1 { font-size: 0.94rem; letter-spacing: 0.12em; }
.loading-state { display: flex; align-items: center; gap: 14px; margin-top: 24px; color: var(--carbon-blue); font-size: 0.9rem; }
.loading-rule { flex: none; width: 70px; height: 2px; background: var(--carbon-blue); }
.answer-content { max-width: 72ch; margin-top: 22px; overflow-wrap: anywhere; }
.answer-content p { margin: 0 0 14px; line-height: 1.85; }
.answer-content p:last-child { margin-bottom: 0; }
.answer-content .answer-lead { color: var(--carbon-blue); font-size: 0.9rem; }
.answer-group-title { margin: 26px 0 12px; font-size: 1rem; line-height: 1.45; letter-spacing: 0.04em; }
.answer-subheading { margin: 26px 0 10px; font-size: 1rem; line-height: 1.5; }
.manual-steps { margin: 0 0 22px; padding-left: 2.2rem; }
.manual-steps > li { padding: 0 0 20px 6px; margin-bottom: 18px; border-bottom: 1px solid var(--grid-line); font-weight: 600; line-height: 1.75; }
.manual-steps > li:last-child { margin-bottom: 0; border-bottom: 0; }
.manual-steps > li::marker { color: var(--carbon-blue); font-family: var(--font-mono); font-weight: 700; }
.answer-content .step-detail { margin: 9px 0 0; color: var(--ink-soft); font-size: 0.91rem; font-weight: 400; line-height: 1.8; }
.manual-bullets { margin: 0 0 20px; padding-left: 1.35rem; color: var(--ink-soft); }
.manual-bullets li { margin-bottom: 8px; padding-left: 4px; line-height: 1.75; }
.manual-bullets li::marker { color: var(--carbon-blue); }
.manual-notice { margin: 20px 0 24px; padding: 15px 18px 16px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--grid-line); background: #f4f6fa; }
.manual-notice h3 { margin: 0; font-size: 0.94rem; letter-spacing: 0.05em; }
.answer-content .manual-notice p { margin: 8px 0 0; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.75; }
.manual-figure { max-width: 560px; margin: 16px 0 18px; font-weight: 400; }
.manual-steps .manual-figure { max-width: 420px; }
.manual-figure-link { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; padding: 10px; border: 1px solid var(--field-border); border-radius: 3px; background: #fff; cursor: zoom-in; }
.panel-figure .manual-figure-link, .manual-page-figure .manual-figure-link { display: flex; }
.manual-figure-link:hover { border-color: var(--carbon-blue); }
.manual-figure img { display: block; width: auto; max-width: 100%; height: auto; max-height: 380px; margin: 0 auto; object-fit: contain; }
.panel-figure img { width: 100%; }
.manual-figure figcaption { margin-top: 7px; color: var(--pencil-gray); font-size: 0.75rem; line-height: 1.55; }
.manual-figure-link.is-unavailable { min-height: 70px; color: var(--ink-soft); font-size: 0.84rem; cursor: default; }
.manual-inline-figures { margin: 16px 0 22px; }
.manual-original-figures { margin-top: 28px; }
.manual-page-figure { max-width: 100%; }
.manual-page-figure img { width: 100%; max-height: none; }
.answer-more { margin: 26px 0; border-top: 1.5px dashed #b9c0c9; border-bottom: 1px solid var(--grid-line); }
.answer-more summary { padding: 14px 0; color: var(--carbon-blue); font-weight: 700; cursor: pointer; text-underline-offset: 4px; }
.answer-more-body { padding: 2px 0 18px; }
.answer-content .answer-source-line { margin-top: 24px; color: var(--pencil-gray); font-size: 0.8rem; }
.evidence-ref { color: var(--carbon-blue); font-family: var(--font-mono); font-size: 0.82em; font-weight: 700; text-underline-offset: 3px; }
.evidence-heading { margin: 28px 0 4px; font-size: 0.92rem; letter-spacing: 0.08em; }
.citation-list { margin: 0; padding: 0; list-style: none; }
.citation-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--grid-line);
}
.citation-id { color: var(--carbon-blue); font-family: var(--font-mono); font-weight: 700; }
.citation-title { margin: 0; font-size: 0.94rem; line-height: 1.55; }
.citation-section { margin: 3px 0 0; color: var(--ink-soft); font-size: 0.86rem; }
.citation-meta { display: block; margin-top: 6px; overflow-wrap: anywhere; }
.citation-official { white-space: nowrap; font-size: 0.84rem; }
.answer-followup { margin: 22px 0 0; padding-top: 18px; border-top: 1.5px dashed #b9c0c9; color: var(--ink-soft); font-size: 0.9rem; }
.answer-followup .text-link { margin-left: 6px; }

.manual-notes { padding-bottom: 30px; }
.method-rows { display: flex; flex-direction: column; }
.method-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  padding: 17px 0;
  border-bottom: 1px solid var(--grid-line);
  align-items: baseline;
}
.method-row:last-child { border-bottom: 0; }
.method-row strong { color: var(--carbon-blue); font-size: 0.94rem; }
.method-row p { margin: 0; max-width: 65ch; color: var(--ink-soft); }
.manual-page .footer a { color: var(--metal-ink); text-underline-offset: 3px; }
.manual-page .footer a.mono { color: var(--carbon-blue); font-weight: 700; }

@media (max-width: 900px) {
  .manual-layout { grid-template-columns: 1fr; gap: 36px; }
  .manual-scope { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
  .manual-scope > h2, .manual-scope > .scope-fields { grid-column: 1; }
  .manual-scope > .src-note { grid-column: 1; }
  .repair-slip { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; padding: 0 0 0 24px; border-top: 0; border-left: 1px dashed #b9c0c9; }
}

@media (max-width: 640px) {
  .manual-main { padding-top: 20px; }
  .model-options { grid-template-columns: 1fr; }
  .model-option-body { min-height: 0; }
  .ask-actions { align-items: stretch; flex-direction: column; gap: 10px; }
  .ask-actions .btn-stamp { width: 100%; }
  .ask-hint { text-align: center; }
  .manual-scope { display: block; }
  .repair-slip { margin-top: 24px; padding: 20px 12px 0; border-top: 1.5px dashed #b9c0c9; border-left: 0; }
  .answer-head { gap: 12px; }
  .answer-head h2 { font-size: 1.18rem; }
  .answer-stamp { width: 70px; height: 70px; border-width: 2px; }
  .answer-stamp .stamp-line1 { font-size: 0.8rem; }
  .manual-steps { padding-left: 1.8rem; }
  .manual-steps > li { padding-left: 3px; }
  .manual-notice { padding: 14px 13px; }
  .manual-figure, .manual-steps .manual-figure { max-width: 100%; }
  .manual-figure-link { padding: 6px; }
  .citation-item { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .citation-official { grid-column: 2; white-space: normal; }
  .method-row { grid-template-columns: 1fr; gap: 5px; }
  .answer-followup .text-link { display: flex; margin: 6px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .model-option-body, .example-question { transition: none; }
}
