/* Matemática básica. A base — cores, tema claro/escuro, calculadora, índice e
   paginação — vem de /formulas/style.css, carregada antes desta. Aqui ficam
   só as peças próprias das lições: texto corrido, tabela de divisões,
   listas de divisores e múltiplos e exercícios. */

.page-lede {
  max-width: 640px;
  margin: -.5rem 0 0;
  line-height: 1.6;
  text-align: center;
}

/* ---------------------------------------------------------------- exemplos */

.calc-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-top: .7rem;
  font-size: .85rem;
  color: var(--text-muted);
}

.calc-examples button {
  padding: .25rem .6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-strong);
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.calc-examples button:hover {
  border-color: var(--tone-1);
}

.calc-extra[hidden] {
  display: none;
}

/* ---------------------------------------------------------------- tabela de divisões */

.ladder-box {
  overflow-x: auto;
}

.ladder {
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.ladder td {
  min-width: 3.2rem;
  padding: .45rem .9rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

.ladder tr:last-child td {
  border-bottom: none;
}

/* O número que foi dividido nesta linha. */
.ladder td.is-hit {
  color: var(--text-strong);
  font-weight: 600;
}

.ladder td.ladder-prime {
  border-left: 2px solid var(--text-muted);
  color: var(--tone-2);
  font-weight: 700;
  text-align: left;
}

/* ---------------------------------------------------------------- divisores e múltiplos */

.chips + .chips {
  margin-top: .9rem;
}

.chips-label {
  display: block;
  margin-bottom: .4rem;
  font-size: .85rem;
  color: var(--text-muted);
}

.chips ul {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  min-width: 2.2rem;
  padding: .2rem .5rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.chips li.is-common {
  border-color: var(--tone-1);
  color: var(--text-strong);
}

.chips li.is-best {
  background: var(--tone-1);
  border-color: var(--tone-1);
  color: var(--surface);
  font-weight: 700;
}

.chips-legend {
  margin: .9rem 0 0;
  font-size: .9rem;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- lição */

.lesson {
  width: 100%;
  max-width: 720px;
  line-height: 1.65;
}

.lesson h2 {
  margin: 0 0 .9rem;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.lesson h3 {
  margin: 1.6rem 0 .5rem;
  font-size: 1.1rem;
  color: var(--text-strong);
}

.lesson p,
.lesson ol,
.lesson ul {
  margin: 0 0 .9rem;
}

.lesson strong {
  color: var(--text-strong);
}

.lesson .tex-block {
  display: block;
  margin: .4rem 0 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  color: var(--text-strong);
}

.tip {
  margin: 1rem 0;
  padding: .8rem 1rem;
  border-left: 3px solid var(--tone-3);
  border-radius: 0 8px 8px 0;
  background: var(--surface);
}

/* ---------------------------------------------------------------- exercícios */

.exercise {
  margin-bottom: .9rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.exercise p {
  margin: 0;
}

.exercise details {
  margin-top: .8rem;
}

.exercise summary {
  width: fit-content;
  color: var(--tone-1);
  font-weight: 600;
  cursor: pointer;
}

.exercise details > div {
  margin-top: .6rem;
  padding-top: .6rem;
  border-top: 1px dashed var(--border);
}

.exercise details p + p {
  margin-top: .5rem;
}

/* ================================================================ raízes */

/* ---------------------------------------------------------------- índice da página */

.toc {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
  max-width: 720px;
}

.toc a {
  padding: .3rem .75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: .85rem;
  text-decoration: none;
}

.toc a:hover {
  border-color: var(--tone-1);
  color: var(--text-strong);
}

/* ---------------------------------------------------------------- controles deslizantes */

.vars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .5rem 1.2rem;
  margin-bottom: .9rem;
}

/* Rótulo e valor crescem com o texto ("lados", "31.536.000"). */
.var {
  display: grid;
  grid-template-columns: minmax(1.2rem, auto) 1fr minmax(2.4rem, auto);
  align-items: center;
  gap: .6rem;
}

.var i {
  font-family: KaTeX_Math, serif;
  font-size: 1.2rem;
  color: var(--tone-2);
}

.var input {
  width: 100%;
  accent-color: var(--tone-2);
}

.var output {
  color: var(--text-strong);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.var-wide {
  max-width: 420px;
  margin: 1rem auto 0;
}

/* ---------------------------------------------------------------- figura do início */

.seg {
  display: flex;
  justify-content: center;
  gap: .4rem;
}

.seg button {
  padding: .4rem .9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
}

.seg button[aria-pressed="true"] {
  border-color: var(--tone-1);
  background: var(--tone-1);
  color: var(--surface);
  font-weight: 600;
}

.intro-figure {
  display: flex;
  justify-content: center;
  margin-top: .5rem;
}

.intro-svg,
.tri {
  width: 100%;
  max-width: 300px;
  height: auto;
  overflow: visible;
}

.intro-svg {
  max-width: 330px;
}

.sq-fill {
  fill: color-mix(in srgb, var(--tone-1) 18%, transparent);
}

.sq-grid {
  stroke: color-mix(in srgb, var(--tone-1) 35%, transparent);
  stroke-width: 1;
}

.sq-edge {
  fill: none;
  stroke: var(--tone-1);
  stroke-width: 2;
}

.sq-fill.sq-edge {
  fill: color-mix(in srgb, var(--tone-1) 18%, transparent);
}

.cube-top,
.cube-side {
  stroke: var(--tone-1);
  stroke-width: 2;
  stroke-linejoin: round;
}

.cube-top {
  fill: color-mix(in srgb, var(--tone-1) 30%, transparent);
}

.cube-side {
  fill: color-mix(in srgb, var(--tone-1) 10%, transparent);
}

.intro-text p {
  margin: .6rem 0 0;
  line-height: 1.6;
  text-align: center;
}

.intro-text strong {
  color: var(--text-strong);
}

/* ---------------------------------------------------------------- regras */

.rule {
  margin-bottom: 1.1rem;
  padding: 1.1rem 1.25rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.rule header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}

.rule h3 {
  margin: 0;
  font-size: 1.05rem;
}

.badge {
  flex: none;
  padding: .15rem .55rem;
  border: 1px solid;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.badge.is-ok { color: var(--tone-3); }
.badge.is-bad { color: var(--tone-4); }
.badge.is-warn { color: var(--tone-2); }

.rule-tex {
  display: block;
  margin: .9rem 0 .7rem;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 1.15rem;
  color: var(--text-strong);
  text-align: center;
}

.rule > p {
  margin: 0 0 1rem;
}

.rule-try {
  padding: .9rem 1rem;
  border-radius: 10px;
  background: var(--bg);
}

.rule-try + .rule-try {
  margin-top: .7rem;
}

.rule-figure {
  display: flex;
  justify-content: center;
  margin-bottom: .6rem;
}

.rule-figure[hidden] {
  display: none;
}

.rule-line {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  align-items: center;
  gap: .6rem;
  padding: .35rem 0;
}

.rule-side {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}

.rule-math {
  overflow-x: auto;
  overflow-y: hidden;
  color: var(--text-strong);
}

.rule-math [data-tone] .katex,
.rule-math .katex [data-tone] {
  color: var(--tone);
}

.rule-verdict {
  margin: .6rem 0 0;
  font-weight: 600;
}

.rule-verdict.is-ok { color: var(--tone-3); }
.rule-verdict.is-diff { color: var(--tone-4); }

.rule-note {
  margin: .4rem 0 0;
  font-size: .92rem;
  line-height: 1.55;
}

.rule-note:empty {
  display: none;
}

@media (max-width: 520px) {
  .rule-line {
    grid-template-columns: 1fr;
    gap: .15rem;
  }
}

/* ---------------------------------------------------------------- triângulo */

.tri-fill {
  fill: color-mix(in srgb, var(--tone-1) 12%, transparent);
}

.tri-leg {
  fill: none;
  stroke: var(--tone-2);
  stroke-width: 3;
  stroke-linecap: round;
}

.tri-hyp {
  stroke: var(--tone-1);
  stroke-width: 3;
  stroke-linecap: round;
}

.tri-right {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.2;
}

.tri-label {
  fill: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.tri-label.is-hi {
  fill: var(--tone-1);
  font-weight: 600;
}

.sq-ref {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
}

/* ================================================================ potências */

/* ---------------------------------------------------------------- escada */

/* Uma faixa que rola na horizontal: degrau, "÷ a", degrau… O script
   centraliza o degrau do expoente escolhido. */
.ladder-steps {
  position: relative;
  display: flex;
  align-items: center;
  gap: .3rem;
  margin: 0;
  padding: .3rem .2rem .6rem;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.ladder-step {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  min-width: 4.2rem;
  padding: .55rem .5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  transition: border-color .2s ease, background-color .2s ease;
}

.ladder-step.is-on {
  border-color: var(--tone-1);
  background: color-mix(in srgb, var(--tone-1) 14%, var(--bg));
  color: var(--text-strong);
}

.ladder-pow {
  font-size: .95rem;
  color: var(--tone-2);
}

.ladder-val {
  font-size: 1.05rem;
  color: var(--text-strong);
}

.ladder-op {
  flex: none;
  font-size: .8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- (a + b)² */

.sq-a,
.sq-b,
.sq-ab {
  stroke: var(--surface);
  stroke-width: 2;
}

.sq-a { fill: color-mix(in srgb, var(--tone-1) 35%, transparent); }
.sq-b { fill: color-mix(in srgb, var(--tone-3) 35%, transparent); }
.sq-ab { fill: color-mix(in srgb, var(--tone-4) 30%, transparent); }

/* ---------------------------------------------------------------- casos especiais */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: .8rem;
}

.fact {
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.fact .rule-tex {
  margin: 0 0 .5rem;
}

.fact p {
  margin: 0;
  font-size: .92rem;
  line-height: 1.5;
}

.lesson a {
  color: var(--text-strong);
  text-underline-offset: 3px;
}

/* ================================================================ frações */

/* ---------------------------------------------------------------- barras */

.bars {
  display: grid;
  justify-content: stretch; /* .intro-figure (raízes) centraliza */
  gap: .7rem;
  margin-top: .9rem;
}

.bars:empty {
  display: none;
}

.bar-row {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  align-items: center;
  gap: .8rem;
}

.bar-label {
  color: var(--text-strong);
  text-align: right;
}

.bar-svg {
  width: 100%;
  height: auto;
}

.bar-cell {
  fill: transparent;
  stroke: var(--border);
  stroke-width: 1;
}

.bar-edge {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.5;
}

.bar-cell.fill-1 { fill: color-mix(in srgb, var(--tone-1) 70%, transparent); }
.bar-cell.fill-2 { fill: color-mix(in srgb, var(--tone-2) 65%, transparent); }
.bar-cell.fill-3 { fill: color-mix(in srgb, var(--tone-3) 65%, transparent); }
.bar-cell.fill-ghost {
  fill: none;
  stroke: var(--tone-3);
  stroke-dasharray: 3 3;
}

/* ---------------------------------------------------------------- campos em forma de fração */

.frac-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.frac-input {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  width: 5.5rem;
}

/* A barra da fração é a borda entre os dois campos. */
.frac-input input:first-child {
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--text-strong);
}

.frac-input input,
.frac-inputs select {
  width: 100%;
  padding: .45rem .5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-strong);
  font: inherit;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.frac-inputs select {
  width: auto;
  font-size: 1.4rem;
  cursor: pointer;
}

.calc-lede a {
  color: var(--text-strong);
  text-underline-offset: 3px;
}

/* ================================================================ equação do 2º grau */

.eq-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .4rem 1rem;
}

.eq-head .calc-result {
  margin-top: .4rem;
}

/* ---------------------------------------------------------------- gráfico */

/* Grade e eixos recuados; a curva e as marcas são a única cor. */
.plot-box {
  position: relative;
  margin-top: .8rem;
}

.plot {
  display: block;
  width: 100%;
  height: auto;
  touch-action: pan-y;
}

.plot-grid {
  stroke: var(--chart-grid);
  stroke-width: 1;
}

.plot-axis {
  stroke: var(--chart-axis);
  stroke-width: 1;
}

.plot-axis.is-x {
  stroke: var(--text-muted);
  stroke-width: 1.5;
}

.plot-tick {
  fill: var(--text-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.plot-sym {
  stroke: var(--tone-2);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: .7;
}

.plot-curve {
  fill: none;
  stroke: var(--tone-1);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Anel da cor da superfície separa a marca da curva por baixo. */
.plot-dot {
  stroke: var(--surface);
  stroke-width: 2;
}

.plot-dot.is-root { fill: var(--tone-3); }
.plot-dot.is-vertex { fill: var(--tone-2); }
.plot-dot.is-hover { fill: var(--tone-1); }

.plot-label {
  fill: var(--text-strong);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.plot-cross {
  stroke: var(--text-muted);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.plot-hit {
  fill: transparent;
  cursor: crosshair;
}

/* ================================================================ conjuntos */

/* ---------------------------------------------------------------- diagrama */

.venn-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1rem;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .9rem;
  cursor: pointer;
}

.toggle input {
  accent-color: var(--tone-1);
}

.venn-stage {
  display: flex;
  justify-content: center;
  margin-top: .8rem;
}

.venn {
  width: 100%;
  max-width: 460px;
  height: auto;
  user-select: none;
}

.venn-explorer .venn {
  cursor: pointer;
}

.venn-universe {
  fill: var(--bg);
  stroke: var(--text-muted);
  stroke-width: 1.5;
}

.venn-region {
  fill: transparent;
  transition: fill .15s ease;
}

.venn-region.is-hover {
  fill: color-mix(in srgb, var(--tone-1) 14%, transparent);
}

.venn-region.is-on {
  fill: color-mix(in srgb, var(--tone-1) 55%, transparent);
}

/* Nos diagramas de contagem a região pintada é só um fundo. */
.venn.is-soft .venn-region.is-on {
  fill: color-mix(in srgb, var(--tone-1) 20%, transparent);
}

.venn-circle {
  fill: none;
  stroke: var(--text-strong);
  stroke-width: 2;
}

.venn-name {
  fill: var(--text-strong);
  font-family: KaTeX_Math, serif;
  font-size: 20px;
  font-style: italic;
  pointer-events: none;
}

.venn-name.is-u {
  fill: var(--text-muted);
  font-size: 16px;
}

.venn-el {
  fill: var(--text-strong);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 3px;
}

.venn-el.is-big {
  font-size: 20px;
}

.venn-legend {
  margin: .4rem 0 0;
  font-size: .85rem;
  color: var(--text-muted);
  text-align: center;
}

.venn-out {
  display: grid;
  justify-items: center;
  gap: .3rem;
  margin-top: 1rem;
  padding: .9rem 1rem;
  border-radius: 10px;
  background: var(--bg);
  text-align: center;
}

.venn-name-out {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--tone-1);
}

.venn-expr {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 1.3rem;
  color: var(--text-strong);
}

.venn-elements {
  color: var(--text-strong);
}

.venn-read {
  margin: .2rem 0 0;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- botões de região */

.region-chips,
.venn-shortcuts,
.law-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.chip {
  padding: .3rem .7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--tone-1);
  color: var(--text-strong);
}

.chip[aria-pressed="true"] {
  border-color: var(--tone-1);
  background: color-mix(in srgb, var(--tone-1) 22%, var(--bg));
  color: var(--text-strong);
}

.chip.is-ghost {
  border-style: dashed;
}

/* ---------------------------------------------------------------- leis */

.law-panes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.law-pane {
  margin: 0;
  text-align: center;
}

.law-pane figcaption {
  margin-top: .3rem;
  color: var(--text-strong);
  font-size: 1.1rem;
}

/* ---------------------------------------------------------------- tabela */

.table-scroll {
  margin: 0 0 1rem;
  overflow-x: auto;
}

.plain-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

.plain-table th,
.plain-table td {
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.plain-table th {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}

.chip .katex {
  font-size: 1.12em;
}

/* Quatro itens: duas colunas em vez de 3 + 1. */
.facts.is-pairs {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

/* ================================================================ constantes */

.intro-text {
  line-height: 1.6;
  text-align: center;
}

/* Algarismos: os que já batem com a constante em verde. */
.dig-ok {
  color: var(--tone-3);
  font-weight: 700;
}

.dig-bad {
  color: var(--text-muted);
}

.digits {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.15rem;
  letter-spacing: .02em;
  overflow-wrap: anywhere;
}

.approx-list {
  display: grid;
  gap: .8rem;
}

.approx {
  display: grid;
  gap: .45rem;
  margin-top: .8rem;
  padding: .8rem 1rem;
  border-radius: 10px;
  background: var(--bg);
}

.approx-list .approx {
  margin-top: 0;
}

.approx-head {
  color: var(--text-strong);
  font-size: .95rem;
}

.approx-tex {
  overflow-x: auto;
  overflow-y: hidden;
  color: var(--text-strong);
}

/* Quantas casas certas, de 0 a 12. */
.meter {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .7rem;
}

.meter-track {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}

.meter-bar {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--tone-3);
  transition: width .25s ease;
}

.meter-txt {
  font-size: .8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- Arquimedes */

.poly-figure,
.fib-figure {
  display: flex;
  justify-content: center;
  margin-top: .6rem;
}

.poly {
  width: 100%;
  max-width: 280px;
  height: auto;
}

.poly-circle {
  fill: color-mix(in srgb, var(--text-muted) 8%, transparent);
  stroke: var(--text-strong);
  stroke-width: 2;
}

.poly-in,
.poly-out {
  fill: none;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.poly-in { stroke: var(--tone-1); }
.poly-out { stroke: var(--tone-2); }

.bounds {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-strong);
}

.bounds .is-in { color: var(--tone-1); font-weight: 600; }
.bounds .is-out { color: var(--tone-2); font-weight: 600; }

/* ---------------------------------------------------------------- juros */

.grow {
  margin: 1rem 0 .4rem;
}

/* De R$ 1 (esquerda) a R$ 3 (direita); as marcas ficam em 2 e em e. */
.grow-track {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: var(--border);
}

.grow-fill {
  height: 100%;
  border-radius: 7px;
  background: var(--tone-1);
  transition: width .3s ease;
}

/* O rótulo de cada marca vem no ::after; o span só desenha a linha. */
.grow-mark {
  position: absolute;
  top: -4px;
  bottom: -4px;
  border-left: 2px dashed var(--text-strong);
}

.grow-mark::after {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  transform: translateX(-50%);
  font-size: .78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.grow-mark.is-two { left: 50%; }
.grow-mark.is-two::after { content: "R$ 2"; }
.grow-mark.is-e { left: calc((2.718281828 - 1) / 2 * 100%); }
.grow-mark.is-e::after { content: "e ≈ 2,718"; }

.grow {
  padding-bottom: 1.2rem; /* espaço para os rótulos */
}

/* ---------------------------------------------------------------- Fibonacci */

.fib {
  width: 100%;
  max-width: 420px;
  height: auto;
  max-height: 340px;
}

.fib-sq {
  fill: color-mix(in srgb, var(--tone-2) 10%, transparent);
  stroke: var(--text-muted);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.fib-num {
  fill: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.fib-spiral {
  fill: none;
  stroke: var(--tone-2);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

/* ================================================================ logaritmos */

.ruler-figure {
  margin-top: .8rem;
}

.ruler {
  display: block;
  width: 100%;
  height: auto;
}

.ruler-title {
  fill: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.ruler-axis {
  stroke: var(--text-muted);
  stroke-width: 1.5;
}

.ruler-tick {
  stroke: var(--text-strong);
  stroke-width: 1.5;
}

.ruler-minor {
  stroke: var(--chart-axis);
  stroke-width: 1;
}

.ruler-num {
  fill: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.ruler-dot {
  fill: var(--tone-1);
  stroke: var(--surface);
  stroke-width: 2;
}
