@import url("https://fonts.googleapis.com/css2?family=Merriweather:wght@700;900&display=swap");
/* Tipografia global: leitura mais leve, sem aparência de Arial Black. */
:root {
  --site-sans: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--site-sans) !important;
  font-synthesis: none;
}

body {
  font-weight: 400;
}

h1,
.studio-hero h1,
.studio-intro h1,
.lesson-studio-page .studio-intro h1 {
  font-family: var(--site-sans) !important;
  font-weight: 700 !important;
  letter-spacing: -0.028em !important;
}

h2,
.study-card h2,
.studio-side-card h2,
.lesson-studio-page .study-card h2,
.lesson-studio-page .studio-side-card h2 {
  font-family: var(--site-sans) !important;
  font-weight: 650 !important;
  letter-spacing: -0.018em !important;
}

h3,
h4,
h5,
h6,
.study-card h3,
.studio-main h3 {
  font-family: var(--site-sans) !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
}

strong,
b,
.brand,
.main-nav a,
.lesson-anchor-link,
.chapter-title,
.button,
button {
  font-weight: 600 !important;
}

.breadcrumb,
.studio-kicker,
.study-card p,
.study-card li,
.studio-side-card p,
.studio-side-card li,
.lesson-table,
.exercise-item,
.exercise-options {
  font-family: var(--site-sans) !important;
}

svg text,
svg tspan {
  font-family: var(--site-sans) !important;
  font-weight: 600 !important;
}

/* A escrita matemática continua visualmente distinta do texto comum. */
.math-block,
.math-text,
.math-line,
.formula-line,
.formula-step-expression,
.q-inline-math,
.log-formula .math-line,
.geometry-formula-strip span {
  font-family: var(--lesson-math-font) !important;
}
/* Estes heros usam uma ilustração de fundo clara mesmo no modo noturno. */
html[data-theme="dark"] body.content-page.fundamentos-pattern-page .fundamentos-hero-copy h1,
html[data-theme="dark"] body.content-page.fundamentos-pattern-page .fundamentos-hero-copy p,
html[data-theme="dark"] body.content-page.fundamentos-pattern-page .fundamentos-hero-proof {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  opacity: 1 !important;
}
/* Roteiro de Fundamentos: preservar os destaques do modo claro à noite. */
:is(html[data-theme="dark"] body, body.dark-mode).fundamentos-pattern-page .foundation-roadmap .road-num {
  color: #0878ff !important;
  -webkit-text-fill-color: #0878ff !important;
}

:is(html[data-theme="dark"] body, body.dark-mode).fundamentos-pattern-page .foundation-note,
:is(html[data-theme="dark"] body, body.dark-mode).fundamentos-pattern-page .foundation-note strong {
  color: #071943 !important;
  -webkit-text-fill-color: #071943 !important;
}

:is(html[data-theme="dark"] body, body.dark-mode).fundamentos-pattern-page .foundation-note span {
  color: #0878ff !important;
  -webkit-text-fill-color: #0878ff !important;
}
/* Tipografia exclusiva dos títulos das aulas: estilo editorial sóbrio, sem afetar fórmulas ou texto corrido. */
:root{--lesson-title-font:"Merriweather",Georgia,"Times New Roman",serif}
.lesson-studio-page .studio-intro h1{font-family:var(--lesson-title-font)!important;font-weight:900!important;letter-spacing:-.028em!important;line-height:1.08}
.lesson-studio-page .studio-main :is(h2,h3,h4,h5,h6),
.lesson-studio-page .lesson-chapter-heading strong,
.lesson-studio-page .lesson-anchor-title,
.lesson-studio-page .study-card h2,
.lesson-studio-page .studio-side-card h2{font-family:var(--lesson-title-font)!important;font-weight:700!important;letter-spacing:-.018em!important}
.lesson-studio-page .studio-main h2{font-weight:900!important;letter-spacing:-.024em!important}
/* Respiro consistente entre a abertura da aula e o primeiro tópico. */
.lesson-studio-page .studio-main > h2:first-child,
.lesson-studio-page .studio-main > :first-child > h2:first-child {
  margin-top: 24px !important;
}

/* Notação matemática consistente nas aulas, sem alterar o texto ou as fórmulas. */
:root {
  --lesson-math-font: "Cambria Math", Cambria, "STIX Two Math", "Times New Roman", serif;
  --lesson-math-inline-size: 1em;
  --lesson-math-display-size: clamp(1.08rem, 2vw, 1.27rem);
  --lesson-math-compact-size: 1.08rem;
  --lesson-math-sup-size: .64em;
  --lesson-math-sub-size: .66em;
}

.lesson-studio-page .studio-main :is(
  .math-block,
  .math-text,
  .math-line,
  .math-fraction,
  .math-frac,
  .fraction,
  .math-inline,
  .big-formula,
  .formula-line,
  .formula-step-expression,
  .formula-main,
  .step-formula,
  .tales-formula,
  .sequence-formula,
  .comparison-expression,
  .property-equation,
  .concept-formula-line,
  .chapter-formula,
  .proof-equation,
  .definition-formula,
  .q-inline-math,
  .pa-formula,
  .pa-recurrence-list,
  .pa-equation-scroll,
  .pa-equation-result,
  .pa-equation-chain,
  .pa-equation-stack,
  .pa-derivation,
  .pg-recurrence,
  .pg-equation-scroll,
  .pg-equation-result,
  .pg-equation-chain,
  .pg-equation-stack,
  .pg-limit-examples,
  .pg-formula,
  .analytic-formula,
  .analytic-step-expression,
  .analytic-math-line,
  .plano-formula,
  .plano-formula-strip,
  .affine-mixed-formula,
  .area-formula-line,
  .transpose-equation,
  .product-method-equation,
  .product-main-formula,
  .inverse-formula,
  .inverse-fraction-matrix,
  .rank-formula,
  .cramer-fraction,
  .sl-matrix-equation,
  .sl-system,
  .sl-main-rule,
  .sl-matrix,
  .det-equation-row,
  .property-proof-equation,
  .chio-formula,
  .matrix-display,
  .matrix-equation,
  .matrix-array,
  .matrix-values,
  .matrix-values b,
  .diagonal-matrix b,
  .special-matrix-line > div strong,
  .log-example-strip span
) {
  font-family: var(--lesson-math-font) !important;
  font-variant-numeric: lining-nums tabular-nums;
  font-style: normal;
}

/* Papéis tipográficos. Componentes existentes mantêm sua geometria e seus pesos.
   Os aliases de PA/PG e alternativas usam os mesmos valores anteriores. */
.lesson-studio-page .studio-main :is(.math-inline, .q-inline-math) {
  font-size: var(--lesson-math-inline-size);
  font-style: normal;
  letter-spacing: normal;
}

.lesson-studio-page .studio-main :is(.math-display, .math-compact, .math-var) {
  font-family: var(--lesson-math-font);
  font-variant-numeric: lining-nums tabular-nums;
}

.lesson-studio-page .studio-main .math-display {
  font-size: var(--lesson-math-display-size);
  font-style: normal;
}

.lesson-studio-page .studio-main .math-compact {
  font-size: var(--lesson-math-compact-size);
  font-style: normal;
}

/* Só variáveis explicitamente marcadas recebem itálico; não toda a expressão. */
.lesson-studio-page .studio-main .math-var {
  font-style: italic;
}

.lesson-studio-page .studio-main .math-inline-nowrap {
  white-space: nowrap;
}

.lesson-studio-page .studio-main math.pg-radical {
  font-family: var(--lesson-math-font) !important;
  font-size: 1em;
  vertical-align: middle;
}

.lesson-studio-page .studio-main .pg-number-line-figure svg :is(text, tspan) {
  font-family: var(--lesson-math-font) !important;
  font-variant-numeric: lining-nums tabular-nums;
}

/* Índices e expoentes: um único contrato para marcação manual e automática.
   Não alcança msub/msup do MathML, nem altera a estrutura das frações. */
.math-auto-sup,
:is(
  .math-inline,
  .math-display,
  .math-compact,
  .math-block,
  .math-text,
  .math-line,
  .big-formula,
  .formula-box,
  .formula-study-card,
  .exercise-item,
  .answer-highlight,
  .lesson-table,
  .formula-line,
  .formula-step-expression,
  .q-inline-math,
  .pa-formula,
  .pa-recurrence-list,
  .pa-equation-scroll,
  .pa-equation-result,
  .pa-equation-chain,
  .pa-equation-stack,
  .pa-derivation,
  .pg-formula,
  .pg-recurrence,
  .pg-equation-scroll,
  .pg-equation-result,
  .pg-equation-chain,
  .pg-equation-stack,
  .pg-derivation,
  .sequence-formula,
  .sum-derivation,
  .partial-sums,
  .analytic-formula,
  .analytic-math-line,
  .analytic-equation-stack,
  .plano-formula,
  .plano-formula-strip,
  .tales-formula,
  .geometry-formula-strip,
  .matrix-display,
  .matrix-array,
  .matrix-values,
  .matrix-operation,
  .option-matrix,
  .product-main-formula,
  .transpose-equation,
  .inverse-formula,
  .inverse-determinant-formula,
  .det-array,
  .det-matrix,
  .rank-matrix,
  .echelon-matrix,
  .cramer-matrix,
  .cramer-main-rule,
  .sl-matrix,
  .sl-system,
  .proportion-formula-row,
  .proportion-equation-pair,
  .percentage-comparison,
  .percentage-equivalence-grid,
  .percentage-calculation-grid,
  .percentage-piecewise,
  .math-fraction,
  .math-frac,
  .fraction,
  .cramer-fraction,
  .pg-limit-examples,
  .matrix-notation,
  .matrix-equation,
  .augmented-matrix,
  .rank-system,
  .echelon-system,
  .inverse-main-rule,
  .inverse-proof-line,
  .inverse-matrix-line,
  .inverse-result-line,
  .product-symbolic-matrix,
  .product-method-equation,
  .product-given-matrices,
  .product-final-matrix,
  .property-equation,
  .property-proof-equation,
  .chio-formula,
  .vandermonde-definition,
  .sl-main-rule,
  .sl-ordered-tuple,
  .cramer-system
) sup {
  position: relative;
  top: -.18em;
  margin-left: .025em;
  font-family: var(--lesson-math-font);
  font-size: var(--lesson-math-sup-size);
  font-style: normal;
  line-height: 0;
  vertical-align: .72em;
}

.math-auto-sub,
:is(
  .math-inline,
  .math-display,
  .math-compact,
  .math-block,
  .math-text,
  .math-line,
  .big-formula,
  .formula-box,
  .formula-study-card,
  .exercise-item,
  .answer-highlight,
  .lesson-table,
  .formula-line,
  .formula-step-expression,
  .q-inline-math,
  .pa-formula,
  .pa-recurrence-list,
  .pa-equation-scroll,
  .pa-equation-result,
  .pa-equation-chain,
  .pa-equation-stack,
  .pa-derivation,
  .pg-formula,
  .pg-recurrence,
  .pg-equation-scroll,
  .pg-equation-result,
  .pg-equation-chain,
  .pg-equation-stack,
  .pg-derivation,
  .sequence-formula,
  .sum-derivation,
  .partial-sums,
  .analytic-formula,
  .analytic-math-line,
  .analytic-equation-stack,
  .plano-formula,
  .plano-formula-strip,
  .tales-formula,
  .geometry-formula-strip,
  .matrix-display,
  .matrix-array,
  .matrix-values,
  .matrix-operation,
  .option-matrix,
  .product-main-formula,
  .transpose-equation,
  .inverse-formula,
  .inverse-determinant-formula,
  .det-array,
  .det-matrix,
  .rank-matrix,
  .echelon-matrix,
  .cramer-matrix,
  .cramer-main-rule,
  .sl-matrix,
  .sl-system,
  .proportion-formula-row,
  .proportion-equation-pair,
  .percentage-comparison,
  .percentage-equivalence-grid,
  .percentage-calculation-grid,
  .percentage-piecewise,
  .math-fraction,
  .math-frac,
  .fraction,
  .cramer-fraction,
  .pg-limit-examples,
  .matrix-notation,
  .matrix-equation,
  .augmented-matrix,
  .rank-system,
  .echelon-system,
  .inverse-main-rule,
  .inverse-proof-line,
  .inverse-matrix-line,
  .inverse-result-line,
  .product-symbolic-matrix,
  .product-method-equation,
  .product-given-matrices,
  .product-final-matrix,
  .property-equation,
  .property-proof-equation,
  .chio-formula,
  .vandermonde-definition,
  .sl-main-rule,
  .sl-ordered-tuple,
  .cramer-system
) sub {
  position: relative;
  bottom: -.08em;
  margin-left: .02em;
  font-family: var(--lesson-math-font);
  font-size: var(--lesson-math-sub-size);
  font-style: normal;
  line-height: 0;
  vertical-align: -.28em;
}

@media (max-width: 620px) {
  .lesson-studio-page .studio-main .math-inline-nowrap {
    white-space: normal;
  }
}
