/* Shared body typography across framing, evidence, reading and writing.
   Keep document facsimiles, headings, navigation and icon controls intact. */
:root {
  --smoke-body-font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --smoke-body-size: 15px;
  --smoke-body-colour: #161c25;
}
body {
  font-family: var(--smoke-body-font);
  font-size: var(--smoke-body-size);
  color: var(--smoke-body-colour);
}
body :is(p, div, span, li, blockquote, small, label, pre, code, td, th, dt, dd,
         input, textarea, select, a, b, strong, em, mark):not(:where(h1 *, h2 *, h3 *, h4 *, h5 *, h6 *, button *, nav *, svg *,
            .pdfPaper, .pdfPaper *, .pdfWords, .pdfWords *, .katex, .katex *,
            .k, .k *, .badge, .badge *, .btn, .btn *,
            .tab, .tab *, .tabs *, .brand, .brand *)) {
  font-family: var(--smoke-body-font) !important;
  font-size: var(--smoke-body-size) !important;
  color: var(--smoke-body-colour) !important;
  line-height: 1.62;
}
/* A link remains recognisable without relying on a different text colour. */
body :is(p, li, blockquote, .sourceTextReader, .writingText) a:not(.btn) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* One button treatment throughout SMOKE; labels determine width. */
body :is(button, .btn, input[type=button], input[type=submit]):not(:where(.teachTextLink,.smokeVoiceLink)) {
  box-sizing: border-box;
  min-height: 40px !important;
  height: auto !important;
  padding: 9px 14px !important;
  border: 1px solid #b8431c !important;
  border-radius: 7px !important;
  background: #b8431c !important;
  color: #fff !important;
  font-family: var(--smoke-body-font) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 20px !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-decoration: none !important;
  box-shadow: none !important;
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}
body :is(button, .btn) :is(span, small, b, strong, em) {
  font: inherit !important;
  color: inherit !important;
}
body :is(button, .btn):not(:where(.teachTextLink,.smokeVoiceLink)):hover:not(:disabled):not([aria-disabled=true]) {
  background: #9e3716 !important;
  border-color: #9e3716 !important;
}
body :is(button, .btn):is([aria-pressed=true], [aria-selected=true]) {
  box-shadow: inset 0 0 0 2px #fff !important;
}
body :is(button, .btn):focus-visible {
  outline: 3px solid #d99a1f;
  outline-offset: 3px;
}
body :is(button, .btn):is(:disabled, [aria-disabled=true]) {
  opacity: .5;
  cursor: default;
}
/* Preserve the space-saving Send circle inside the conversation composer. */
body button.doliSendArrow {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px;
  padding: 0 !important;
  border-radius: 50% !important;
}

/* Context stays available without occupying the full question screen. */
.contextBox > summary {cursor:pointer;font-family:var(--smoke-body-font);font-size:15px;font-weight:600;color:var(--smoke-body-colour);padding:4px 0;}
.contextBox[open] > summary {margin-bottom:12px;}
.contextBox > summary:focus-visible {outline:3px solid #d99a1f;outline-offset:4px;}


/* Supporting guidance is quieter and more compact than the student's work,
   source passages and Doli's teaching. Keep controls and alert states distinct. */
:root {
  --smoke-guidance-size: 13px;
  --smoke-guidance-colour: #586571;
}
body :is(.helper, .smokeGuidance, .historyNote, .historyEmpty, .researchEmpty,
  .loadingNote, .definitionNote, .questionFootnote, .heroIntro .lead,
  .smokeGuide p, .smokeGuide .guide,
  .teachWelcome > p, .teachCurriculum p, .teachCurriculum li,
  .teachSavedExplanationPreview > small,
  [id="mathsSelectionHint"], [id="lessonDeleteHelp"],
  [id="readyDetails"], [id="readyInstructions"], [id="testCurriculumSources"]):not(:where(button, button *, .btn, .btn *, input, textarea, select,
    svg, svg *, .katex, .katex *, .err, .err *, .error, .error *, [role="alert"], [role="alert"] *)),
body :is(.helper, .smokeGuidance, .historyNote, .historyEmpty, .researchEmpty,
  .loadingNote, .definitionNote, .questionFootnote, .heroIntro .lead,
  .smokeGuide p, .smokeGuide .guide,
  .teachWelcome > p, .teachCurriculum p, .teachCurriculum li,
  .teachSavedExplanationPreview > small,
  [id="mathsSelectionHint"], [id="lessonDeleteHelp"],
  [id="readyDetails"], [id="readyInstructions"], [id="testCurriculumSources"]) :is(p, div, span, li, small, a, b, strong, em, code):not(:where(button, button *, .btn, .btn *, input, textarea, select,
    svg, svg *, .katex, .katex *, .err, .err *, .error, .error *, [role="alert"], [role="alert"] *)) {
  font-size: var(--smoke-guidance-size) !important;
  color: var(--smoke-guidance-colour) !important;
  line-height: 1.5 !important;
}
body p:is(.helper, .smokeGuidance, .historyNote, .historyEmpty) {
  margin-block: 6px;
}
