/* 培玉 · 高考解析，继承 site.css 的主题变量。 */
.gs-solution, .gs-problem { min-width: 0; }
.gs-solution { font-size: 16px; line-height: 1.85; }
.gs-solution .gs-block { margin: 0; padding: 18px 0; }
.gs-solution .gs-block + .gs-block { border-top: 1px solid var(--line); }
.gs-solution .gs-heading { margin: 0 0 9px; font-size: 16px; line-height: 1.5; color: var(--a); }
.gs-solution .gs-answer { display: flex; gap: 18px; align-items: baseline; }
.gs-solution .gs-answer .gs-heading { flex: 0 0 auto; margin: 0; }
.gs-solution .gs-answer .gs-prose { min-width: 0; max-width: 100%; font-weight: 650; }
.gs-solution .gs-answer-display .gs-prose { flex: 1; }
.gs-prose { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.gs-prose + .gs-prose { margin-top: 10px; }
.gs-solution .gs-idea { padding: 15px 18px; border-left: 3px solid var(--a); background: var(--ok-soft); }
.gs-solution .gs-answer + .gs-idea { border-top: 0; }
.gs-solution .gs-steps { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: gs-step; }
.gs-solution .gs-step { position: relative; display: flex; align-items: flex-start; gap: 13px; counter-increment: gs-step; padding: 0 0 22px; }
.gs-solution .gs-step:last-child { padding-bottom: 0; }
.gs-solution .gs-step::before { content: counter(gs-step); flex: 0 0 27px; width: 27px; line-height: 27px; border: 1px solid var(--a); border-radius: 50%; text-align: center; color: var(--a); font-size: 14px; font-weight: 650; background: var(--card); position: relative; z-index: 1; }
.gs-solution .gs-step:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; border-left: 1px solid var(--line); }
.gs-solution .gs-step-content { flex: 1; min-width: 0; }
.gs-solution .gs-step-title { margin: 0 0 6px; font-size: 16px; line-height: 1.7; }
.gs-solution .gs-check .gs-heading { color: var(--c); }
.gs-solution .gs-pitfalls .gs-heading { color: var(--b); }
.gs-solution .gs-traps { padding-left: 20px; margin: 0; }
.gs-solution .gs-traps li + li { margin-top: 7px; }
.gs-solution .gs-takeaway { border-left: 3px solid var(--b); padding: 12px 16px; background: var(--hl-soft); }
.gs-solution .gs-takeaway .gs-heading { color: var(--b); }
.gs-hints { margin: 16px 0; }
.gs-hint { border-top: 1px solid var(--line); }
.gs-hint:last-child { border-bottom: 1px solid var(--line); }
.gs-hint > summary { cursor: pointer; padding: 11px 2px; color: var(--b); font-weight: 600; font-size: 15px; min-height: 44px; }
.gs-hint-content { padding: 0 2px 14px 18px; font-size: 15px; line-height: 1.8; }
.gs-hint > summary:focus-visible, .gs-preview select:focus-visible { outline: 3px solid var(--hl); outline-offset: 3px; border-radius: 3px; }
.gs-problem .katex { max-width: none; overflow: visible; padding: 0; vertical-align: baseline; }
.gs-problem .gs-math-inline { position: relative; display: inline-block; max-width: 100%; line-height: normal; vertical-align: baseline; white-space: nowrap; }
.gs-problem .gs-math-inline.gs-math-scroll { display: block; overflow-x: auto; overflow-y: hidden; margin: 6px 0; padding-bottom: 5px; }
.gs-problem .gs-math-scroll > .katex { padding-right: 3px; }
.gs-problem .gs-math-scroll:focus-visible { outline: 2px solid var(--hl); outline-offset: 2px; }
.gs-problem .katex-display { max-width: 100%; overflow-x: auto; overflow-y: hidden; margin: 12px 0; padding: 2px 0 6px; }
.gs-problem .katex-display > .katex { display: block; min-width: 100%; width: max-content; overflow: visible; }
.gs-problem [hidden], .gs-preview [hidden] { display: none !important; }
.gs-preview .wrap { max-width: 940px; padding-bottom: 72px; }
.gs-preview .top { flex-wrap: wrap; margin-bottom: 30px; }
.gs-preview h1 { font-size: clamp(25px, 4.5vw, 34px); line-height: 1.4; margin-bottom: 10px; }
.gs-preview .lead { max-width: 48em; margin-bottom: 16px; }
.gs-preview-scope { font-size: 14px; color: var(--muted); margin: 0 0 24px; }
.gs-preview-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px 0; margin-top: 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gs-preview-controls label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; min-width: 0; }
.gs-preview select { font: inherit; font-size: 15px; width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--fg); padding: 8px 10px; }
.gs-preview-status { font-size: 14px; color: var(--muted); margin: 14px 0 24px; min-height: 1.75em; }
.gs-preview-problem { margin: 22px 0; padding: 24px 28px; }
.gs-preview-problem .gs-question-title { font-size: 18px; margin: 14px 0 12px; }
.gs-preview-problem .gs-question-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.gs-preview-problem .gs-question-meta .tag { margin: 0; }
.gs-preview-problem .gs-stem { font-size: 17px; line-height: 1.9; overflow-wrap: anywhere; }
.gs-table-wrap { position: relative; max-width: 100%; margin: 14px 0; overflow-x: auto; white-space: normal; }
.gs-table-wrap:focus-visible { outline: 2px solid var(--hl); outline-offset: 3px; }
.gs-table-wrap.gs-table-scroll::after { content: "左右滑动查看全部列"; position: sticky; left: 0; display: block; padding-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.gs-data-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.gs-data-table th, .gs-data-table td { border: 1px solid var(--line); padding: 8px 11px; text-align: center; white-space: nowrap; }
.gs-data-table thead th { background: var(--ok-soft); font-weight: 600; }
.gs-data-table tbody th { text-align: left; font-weight: 500; }
.gs-related { display: flex; flex-wrap: wrap; column-gap: 4px; margin: 14px 0 0; line-height: 1.8; }
.gs-alignment { margin: 6px 0 14px; }
.gs-placement { margin: 12px 0; padding: 9px 12px; border-left: 3px solid var(--b); background: var(--hl-soft); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.gs-placement strong { color: var(--b); }
.gs-figure { min-width: 0; width: 100%; max-width: 500px; margin: 18px auto; text-align: center; }
.gs-figure img { width: auto; max-width: 100%; height: auto; display: block; margin: 0 auto; }
.gs-figure figcaption { margin-top: 8px; white-space: pre-line; overflow-wrap: anywhere; }
.gs-options { margin: 18px 0; }
.gs-option { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.gs-option > span { min-width: 0; overflow-wrap: anywhere; }
.gs-option-letter { color: var(--muted); flex: 0 0 auto; }
.gs-option:disabled { cursor: default; opacity: 1; }
.gs-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 10px; }
.gs-controls .btn { min-height: 44px; }
.gs-feedback { min-height: 1em; margin: 8px 0; font-size: 15px; }
.gs-feedback.ok { color: var(--a); }
.gs-feedback.no { color: var(--no); }
.gs-work-note { margin: 16px 0; }
.gs-preview-footer { color: var(--muted); font-size: 14px; margin-top: 32px; }
@media (max-width: 560px) {
  .gs-preview-controls { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .gs-preview .top { margin-bottom: 24px; }
  .gs-preview-problem { padding: 18px 16px; }
  .gs-preview-problem .gs-stem { font-size: 16px; }
  .gs-solution .gs-answer { gap: 12px; flex-wrap: wrap; }
  .gs-solution .gs-answer-display { display: block; }
  .gs-solution .gs-answer-display .gs-heading { margin-bottom: 9px; }
  .gs-solution .gs-answer-display .gs-prose { width: 100%; }
  .gs-solution .gs-idea { padding: 12px 13px; }
  .gs-solution .gs-step { gap: 10px; }
  .gs-solution .gs-step::before { flex-basis: 25px; width: 25px; line-height: 25px; }
  .gs-solution .gs-step:not(:last-child)::after { left: 12px; top: 26px; }
  .gs-solution .gs-block { padding-top: 16px; padding-bottom: 16px; }
}
@media print {
  .gs-preview-controls, .gs-hints, .gs-controls, .gs-feedback { display: none; }
  .gs-preview .sol[hidden] { display: block !important; }
  .gs-preview-problem { break-inside: avoid; }
}
