/* The "Ensembles et intervalles" screen: animated corrections (ported from new/*.html) and the
   answer keypad. Plain CSS rather than Tailwind so that adding it doesn't require rebuilding
   vendor/tailwind.css. Light theme only, like the rest of the app. */
.sx, .sx-keypad {
  --sx-paper: #ffffff; --sx-soft: #eef1f5; --sx-ink: #1a2230; --sx-muted: #5b6678; --sx-line: #cdd4df;
  --sx-i: #d3302c; --sx-j: #2a4fb8; --sx-res: #178048;
  --sx-c1: #2a63c9; --sx-c2: #d97a1e; --sx-set: #b3245f; --sx-ok: #1e8a55; --sx-no: #b33a3a;
  --sx-math: KaTeX_Main, "Cambria Math", Georgia, serif;
}
.sx { display: flex; flex-direction: column; gap: 16px; color: var(--sx-ink); line-height: 1.5; }
.sx p { margin: 0 0 6px; }
.sx-m { font-family: var(--sx-math); }
.sx svg text { font-family: var(--sx-math); }
.sx-note { color: var(--sx-muted); }

.sx-btn { font: inherit; font-weight: 700; cursor: pointer; border-radius: 8px; padding: 8px 14px; border: 1.5px solid var(--sx-line); background: var(--sx-paper); color: var(--sx-ink); }
.sx-primary { background: var(--sx-ink); color: var(--sx-paper); border-color: var(--sx-ink); }
.sx-btn:disabled { opacity: .4; cursor: default; }
.sx-btn:focus-visible { outline: 3px solid var(--sx-j); outline-offset: 2px; }
.sx-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sx-ctrl { display: flex; flex-direction: column; gap: 10px; }

/* Intervals */
.sx-expr { font-family: var(--sx-math); font-size: 1.35rem; line-height: 1.3; display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; }
.sx-ci { color: var(--sx-i); }
.sx-cj { color: var(--sx-j); }
.sx-cr { color: var(--sx-res); font-weight: 600; }
.sx-q { color: var(--sx-muted); }
.sx-stage { overflow-x: auto; }
.sx-stage svg { display: block; width: 100%; height: auto; }
svg[viewBox="0 0 900 250"] { min-width: 560px; }
.sx-lower { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.sx-step { min-width: 0; }
.sx-step h4 { font-size: 1.05rem; font-weight: 700; margin: 0 0 4px; }
.sx-step ul { margin: 6px 0 0; padding-left: 1.1em; list-style: disc; display: flex; flex-direction: column; gap: 4px; }
.sx-dots { display: flex; gap: 5px; margin-bottom: 10px; }
.sx-dot { width: 24px; height: 5px; border-radius: 3px; background: var(--sx-line); }
.sx-dot.sx-on { background: var(--sx-ink); }
.sx-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sx-draw .8s ease-out forwards; animation-delay: var(--d, 0s); }
.sx-fade { opacity: 0; animation: sx-fade .45s ease-out forwards; animation-delay: var(--d, 0s); }
@keyframes sx-draw { to { stroke-dashoffset: 0; } }
@keyframes sx-fade { to { opacity: 1; } }

/* Finite sets */
.sx-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.sx-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sx-formula { font-family: var(--sx-math); font-style: italic; font-size: 1.7rem; line-height: 1.2; }
.sx-ring { stroke: var(--sx-ink); stroke-width: 2; }
.sx-ring-x { fill: var(--sx-c1); fill-opacity: .1; }
.sx-ring-y { fill: var(--sx-c2); fill-opacity: .1; }
.sx-lab { font: italic 600 28px var(--sx-math); fill: var(--sx-ink); }
.sx-tok { transition: opacity .35s, transform .35s; transform-box: fill-box; transform-origin: center; }
.sx-tok circle { fill: var(--sx-paper); stroke: var(--sx-line); stroke-width: 2; transition: all .35s; }
.sx-tok text { font: 700 17px system-ui, sans-serif; fill: var(--sx-ink); text-anchor: middle; dominant-baseline: central; transition: fill .35s; }
.sx-tok.sx-inx circle { stroke: var(--sx-c1); }
.sx-tok.sx-iny circle { stroke: var(--sx-c2); }
.sx-tok.sx-inx.sx-iny circle { stroke: var(--sx-ink); }
.sx-tok.sx-cur { transform: scale(1.35); }
.sx-tok.sx-cur circle { stroke-width: 4; }
.sx-tok.sx-res circle { fill: var(--sx-set); stroke: var(--sx-set); }
.sx-tok.sx-res text { fill: var(--sx-paper); }
.sx-tok.sx-out { opacity: .35; }
.sx-tok.sx-out circle { stroke-dasharray: 4 4; }
.sx-set { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-family: var(--sx-math); font-size: 1.1rem; }
.sx-nm { font-style: italic; margin-right: 4px; }
.sx-br { font-size: 1.35rem; color: var(--sx-muted); }
.sx-chip { display: inline-grid; place-items: center; min-width: 2em; height: 2em; padding: 0 5px; border-radius: 999px; border: 2px solid var(--sx-line); font: 700 .9rem system-ui, sans-serif; background: var(--sx-paper); transition: all .3s; }
.sx-set-x .sx-chip { border-color: var(--sx-c1); }
.sx-set-y .sx-chip { border-color: var(--sx-c2); }
.sx-chip.sx-cur { background: var(--sx-ink); color: var(--sx-paper); border-color: var(--sx-ink); transform: scale(1.12); }
.sx-chip.sx-done { opacity: .45; }
.sx-set-r .sx-chip { background: var(--sx-set); border-color: var(--sx-set); color: var(--sx-paper); }
.sx-set-r .sx-chip.sx-new { animation: sx-pop .45s ease-out; }
@keyframes sx-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sx-empty { font: 1.4rem system-ui, sans-serif; color: var(--sx-set); }
.sx-msg { border-left: 4px solid var(--sx-line); padding: 8px 12px; background: var(--sx-soft); border-radius: 0 8px 8px 0; min-height: 3.2em; }
.sx-msg.sx-ok { border-color: var(--sx-ok); }
.sx-msg.sx-no { border-color: var(--sx-no); }
.sx-v { font-weight: 700; }
.sx-msg.sx-ok .sx-v { color: var(--sx-ok); }
.sx-msg.sx-no .sx-v { color: var(--sx-no); }
.sx-prog { color: var(--sx-muted); font-size: .9rem; }

@media (max-width: 820px) {
  .sx-lower, .sx-main { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-draw { animation: none; stroke-dashoffset: 0; }
  .sx-fade { animation: none; opacity: 1; }
  .sx-tok, .sx-tok circle, .sx-tok text, .sx-chip { transition: none; }
  .sx-set-r .sx-chip.sx-new { animation: none; }
}

/* Answer input and keypad */
.sx-answer { flex: 1; min-width: 0; font-family: var(--sx-math, Georgia, serif); font-size: 1.15rem; padding: .6rem .75rem; border: 1px solid #cbd5e1; border-radius: 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.sx-keypad { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sx-key { font: 600 1.05rem var(--sx-math); min-width: 2.5em; height: 2.3em; cursor: pointer; border: 1px solid var(--sx-line); border-radius: 8px; background: var(--sx-soft); color: var(--sx-ink); }
.sx-key:hover { background: var(--sx-line); }
.sx-key:focus-visible { outline: 3px solid var(--sx-j); outline-offset: 1px; }
.sx-reveal { background: none; border: 0; padding: 0; margin-top: 10px; cursor: pointer; font-size: .875rem; color: #64748b; text-decoration: underline; }
.sx-reveal:hover { color: #334155; }

/* Venn diagrams */
.sx-venn { display: block; width: 100%; aspect-ratio: 600 / 440; }
.sx-venn-small { max-width: 420px; margin: 0 auto; }
.sx-venn-input { max-width: 480px; margin: 0 auto; cursor: pointer; touch-action: manipulation; }
.sx-ov { text-decoration: overline; text-decoration-thickness: 1.5px; }
.sx-legend { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sx-legend li { display: flex; align-items: center; gap: 10px; }
.sx-sw { width: 30px; height: 18px; border-radius: 3px; flex: none; border: 1.5px solid currentColor; }
.sx-wrap { flex-wrap: wrap; }

/* Inequations */
.sx-iq { --sx-ox: #d0473a; --sx-oc: #2f8f3e; --sx-od: #1f7fb8; --sx-flip: #c2185b; }
.sx-iq-deriv { display: grid; grid-template-columns: auto auto auto auto auto; justify-content: safe center; column-gap: 12px; row-gap: 2px; align-items: center; font-family: var(--sx-math); font-size: 1.45rem; min-height: 4em; }
.sx-iq-l { justify-self: end; white-space: nowrap; }
.sx-iq-r { justify-self: start; white-space: nowrap; }
.sx-iq-s { display: inline-block; min-width: 1em; text-align: center; }
.sx-iq-pl { justify-self: end; white-space: nowrap; }
.sx-iq-pr { justify-self: start; white-space: nowrap; }
.sx-iq-pill { display: inline-flex; align-items: center; font-size: 1.05rem; padding: 2px 12px; border-radius: 999px; border: 1.5px solid currentColor; white-space: nowrap; }
.sx-iq-ox, .sx-iq-ox-t, .sx-iq-hl-ox { color: var(--sx-ox); }
.sx-iq-oc, .sx-iq-oc-t, .sx-iq-hl-oc { color: var(--sx-oc); }
.sx-iq-od, .sx-iq-od-t { color: var(--sx-od); }
.sx-iq-ox { background: #d0473a24; }
.sx-iq-oc { background: #2f8f3e24; }
.sx-iq-od { background: #1f7fb824; }
.sx-iq-hl-ox, .sx-iq-hl-oc { font-weight: 600; }
.sx-iq-flipped, .sx-iq-flip { color: var(--sx-flip); font-weight: 700; }
.sx-iq-true { color: var(--sx-res); }
.sx-iq-flipnow { animation: sx-iq-flip .9s ease-in-out; }
.sx-iq-last { background: #17804820; border-radius: 4px; }
.sx-iq-new { animation: sx-iq-rise .55s ease-out both; }
.sx-iq-new2 { animation: sx-iq-rise .55s ease-out .35s both; }
@keyframes sx-iq-rise { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes sx-iq-flip { 0% { transform: rotateY(0); } 50% { transform: rotateY(90deg) scale(1.4); } 100% { transform: rotateY(0) scale(1); } }
.sx-iq-fr { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.05; font-size: .82em; margin: 0 .08em; }
.sx-iq-fr > span:first-child { border-bottom: 1.5px solid currentColor; padding: 0 .15em; }
.sx-iq-fr > span:last-child { padding: 0 .15em; }
.sx-iq-sol { font-family: var(--sx-math); font-size: 1.4rem; text-align: center; }
.sx-iq-sol b { color: var(--sx-res); }
.sx-iq-line { display: block; width: 100%; max-width: 600px; margin: 0 auto; }
.sx-iq-rules { border: 1.5px solid var(--sx-line); border-radius: 10px; padding: 12px 14px; font-size: .95rem; }
.sx-iq-rules h4 { margin: 0 0 8px; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--sx-muted); }
.sx-iq-rules ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sx-iq-rules li { display: flex; gap: 10px; align-items: flex-start; color: var(--sx-muted); transition: color .3s; }
.sx-iq-n { flex: none; display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--sx-line); color: var(--sx-ink); font-weight: 700; font-size: .85rem; }
.sx-iq-rules li.sx-on { color: var(--sx-ink); }
.sx-iq-rules li.sx-on .sx-iq-n { background: var(--sx-flip); color: #fff; }
@media (max-width: 640px) {
  .sx-iq-deriv { font-size: 1.1rem; column-gap: 4px; }
  .sx-iq-pill { font-size: .8rem; padding: 1px 6px; }
  .sx-iq-ox-t, .sx-iq-oc-t, .sx-iq-od-t { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-iq-new, .sx-iq-new2, .sx-iq-flipnow { animation: none; }
  .sx-iq-rules li { transition: none; }
}

/* Asymptotes: the boxes of a step, and the correction's calculation and graph */
.sx-as-parts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; --sx-math: KaTeX_Main, "Cambria Math", Georgia, serif; }
.sx-as-part { min-width: 0; max-width: 100%; overflow-x: auto; }
.sx-as-part .katex-display { margin: 0; }
.sx-as-field { flex: none; width: 11em; }
.sx-as-field::placeholder { font-size: .8em; }
.sx-as-small { width: 5.5em; text-align: center; }
.sx-as-wide { width: 15em; max-width: 100%; }
.sx-as-fraction { display: inline-flex; flex-direction: column; align-items: stretch; gap: 3px; overflow: visible; }
.sx-as-bar { height: 2px; background: #1a2230; }
input.sx-as-wrong { border-color: #dc2626; background: #fef2f2; }
.sx-as-errors { color: #dc2626; font-size: .875rem; margin-top: 8px; }
.sx-as-errors p { margin: 0 0 4px; }
.sx-as-calc { overflow-x: auto; }
.sx-as-line .katex-display { margin: .4em 0; }
.sx-as-graph { background: var(--sx-paper); border: 1px solid var(--sx-line); border-radius: 8px; }
.sx-as-label { paint-order: stroke; stroke: var(--sx-paper); stroke-width: 4px; }
.sx-as-solved { min-width: 0; padding: .35em 0; }
.sx-as-solved .katex-display { margin: 0; }
@media (max-width: 640px) {
  .sx-as-field { width: 8.5em; font-size: 1rem; }
  .sx-as-small { width: 4.6em; }
  .sx-as-wide { width: 100%; }
  .sx-as-solved .katex-display, .sx-as-line .katex-display { font-size: .82em; }
}

/* Oblique asymptotes: the long division, and the teacher's animation without its own input boxes */
.sx-ao-potence { display: inline-flex; align-items: stretch; --ink: #1a2230; }
.sx-ao-potence table { border-collapse: collapse; }
.sx-ao-potence td { padding: 3px 6px; text-align: right; white-space: nowrap; height: 2em; }
.sx-ao-sign { color: #5b6678; text-align: center !important; padding-right: 2px !important; }
.sx-ao-rule { border-bottom: 2px solid var(--ink); }
.sx-ao-gap { color: #b4bac6; }
.sx-ao-right { display: flex; flex-direction: column; min-width: 7em; margin-left: 6px; border-left: 2.5px solid var(--ink); }
.sx-ao-divisor { border-bottom: 2.5px solid var(--ink); padding: 3px 10px; height: calc(2em + 6px); display: flex; align-items: center; white-space: nowrap; }
.sx-ao-quotient { padding: 3px 10px; white-space: nowrap; min-height: 2em; }
.sx-ao-host .ao-ex, .sx-ao-host .ao-modes, .sx-ao-host .ao-saisie { display: none; }
.sx-ao-host .ao-nav { top: 64px; }
@media (max-width: 640px) {
  .sx-as-part .katex-display { font-size: .82em; }
  .sx-ao-potence { font-size: .64em; }
  .sx-ao-potence td { padding: 2px 1px; }
  .sx-ao-right { min-width: 0; margin-left: 3px; }
  .sx-ao-divisor, .sx-ao-quotient { padding-left: 5px; padding-right: 3px; }
}

/* Derivatives: the teacher's two pages (Dériver pas à pas, Structure des fonctions) in the app's style */
.dv, .st { --dv-ink: #1d2333; --dv-muted: #667085; --dv-line: #e4e7ee; --dv-acc: #0f766e; --dv-acc-soft: #e6f5f3;
  --dv-ok: #15803d; --dv-ok-soft: #e8f7ee; --dv-ko: #c62828; --dv-ko-soft: #fdecec; --dv-alt: #b45309; --dv-alt-soft: #fff4e0; color: var(--dv-ink); }
.st { --dv-acc: #4338ca; --dv-acc-soft: #eef0ff; }
.dv { display: flex; flex-direction: column; gap: 12px; }
.dv-step { background: #fff; border: 1px solid var(--dv-line); border-radius: 12px; overflow: hidden; }
.dv-sh { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fafbfd; font-weight: 600; }
.dv-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #c9cede; color: #fff; font-size: .8rem; flex: none; }
.dv-active .dv-num { background: var(--dv-acc); }
.dv-done .dv-num { background: var(--dv-ok); }
.dv-todo { opacity: .55; }
.dv-helpflag { margin-left: auto; font-size: .75rem; font-weight: 600; color: var(--dv-alt); background: var(--dv-alt-soft); border-radius: 20px; padding: 2px 9px; }
.dv-sb { padding: 12px 14px 14px; }
.dv-sum, .dv-known { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 10px 14px; }
.dv-known { padding: 0 0 8px; color: var(--dv-muted); }
.dv-rule { text-align: center; color: var(--dv-acc); font-size: 1.1rem; margin: 2px 0 10px; overflow-x: auto; }
.dv-field { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 4px 10px; align-items: center; margin: 10px 0; }
.dv-fl { text-align: right; }
.dv-input { width: 100%; }
input.dv-ko { border-color: var(--dv-ko); background: var(--dv-ko-soft); }
.dv-prev { grid-column: 2; min-height: 1.4em; color: var(--dv-muted); overflow-x: auto; }
.dv-err { color: var(--dv-ko); font-size: .85rem; }
.dv-note { color: var(--dv-muted); font-size: .9rem; margin: 6px 0; }
.dv-fb { border-radius: 12px; padding: 10px 14px; margin-top: 12px; font-size: .95rem; }
.dv-fb p { margin: 4px 0; }
.dv-fb ul { margin: 4px 0 0 1.2em; list-style: disc; }
.dv-ko.dv-fb, .dv-fb.dv-ko { background: var(--dv-ko-soft); border-left: 4px solid var(--dv-ko); }
.dv-fb.dv-alt { background: var(--dv-alt-soft); border-left: 4px solid var(--dv-alt); }
.dv-fb.dv-info { background: var(--dv-acc-soft); border-left: 4px solid var(--dv-acc); }
.dv-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.dv-btn { border: 0; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.dv-primary { background: var(--dv-acc, #0f766e); color: #fff; }
.dv-primary:disabled { opacity: .45; cursor: not-allowed; }
.dv-ghost { background: #eef0f5; color: #1d2333; }
.dv-warn { background: #fff4e0; color: #b45309; }
.dv-final { margin-top: 8px; overflow-x: auto; }
.dv-syntax { border-collapse: collapse; width: 100%; margin-bottom: 8px; }
.dv-syntax td { padding: 3px 4px; border-bottom: 1px solid #fde68a; }
.dv-syntax code { font-size: .85rem; }
.dv-rule-row { display: flex; flex-direction: column; gap: 2px; overflow-x: auto; padding-bottom: 10px; border-bottom: 1px solid #e4e7ee; }
.dv-rule-row:last-child { border-bottom: 0; padding-bottom: 0; }
.dv-rule-row > .dv-m:first-child { color: #0f766e; font-weight: 600; }
.dv-icon { flex: none; }
.st-fn { font-size: 1.35rem; text-align: center; padding: 6px 4px 12px; overflow-x: auto; }
.st-fn.st-dim { font-size: 1rem; color: var(--dv-muted); }
.st-lbl { display: block; font-size: .8rem; margin-bottom: 2px; color: var(--dv-acc); font-weight: 600; }
.st-fn.st-dim .st-lbl { color: var(--dv-muted); font-weight: 400; }
.st-sub { background: var(--dv-acc-soft); border: 2px solid var(--dv-acc); border-radius: 12px; padding: 10px 14px; margin: 4px 0 14px; text-align: center; overflow-x: auto; }
.st-h2 { font-size: 1rem; font-weight: 600; margin: 16px 0 10px; display: flex; align-items: center; gap: 8px; }
.st-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--dv-acc); color: #fff; font-size: .8rem; flex: none; }
.st-forms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.st-fbtn { border: 2px solid var(--dv-line); background: #fff; border-radius: 12px; padding: 10px 6px 8px; cursor: pointer; font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 84px; }
.st-fbtn:hover:not(:disabled) { border-color: var(--dv-acc); background: var(--dv-acc-soft); }
.st-fbtn small { color: var(--dv-muted); font-size: .78rem; }
.st-fbtn:disabled, .st-obtn:disabled { cursor: default; }
.st-ok { border-color: var(--dv-ok) !important; background: var(--dv-ok-soft) !important; }
.st-ko { border-color: var(--dv-ko) !important; background: var(--dv-ko-soft) !important; }
.st-alt { border-color: var(--dv-alt) !important; background: var(--dv-alt-soft) !important; }
.st-expected { border-color: var(--dv-ok) !important; border-style: dashed !important; }
.st-faded { opacity: .45; }
.st-fb { border-radius: 12px; padding: 10px 14px; margin-top: 12px; font-size: .95rem; border: 0 !important; }
.st-fb.st-ok { border-left: 4px solid var(--dv-ok) !important; }
.st-fb.st-ko { border-left: 4px solid var(--dv-ko) !important; }
.st-fb.st-alt { border-left: 4px solid var(--dv-alt) !important; }
.st-fb.st-hint { background: var(--dv-acc-soft); border-left: 4px solid var(--dv-acc) !important; }
.st-fb p { margin: 4px 0; }
.st-head { font-weight: 700; }
.st-pattern { text-align: center; font-size: 1.15rem; margin: 4px 0 12px; color: var(--dv-acc); }
.st-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; margin: 10px 0; }
.st-rl { text-align: right; }
.st-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.st-obtn { border: 2px solid var(--dv-line); background: #fff; border-radius: 10px; padding: 8px 12px; cursor: pointer; font: inherit; min-width: 64px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; max-width: 100%; overflow-x: auto; }
.st-obtn:hover:not(:disabled) { border-color: var(--dv-acc); }
.st-obtn.st-sel { border-color: var(--dv-acc); background: var(--dv-acc-soft); }
.st-tree { margin: 6px 0 0; padding: 0; }
.st-tree ul { list-style: none; margin: 0 0 0 12px; padding-left: 22px; border-left: 2px solid #dfe3ee; }
.st-tree li { list-style: none; margin: 6px 0; }
.st-tnode { display: inline-flex; align-items: center; gap: 10px; background: #f8f9fc; border: 1px solid var(--dv-line); border-radius: 10px; padding: 6px 10px; flex-wrap: wrap; max-width: 100%; }
.st-badge { font-size: .75rem; font-weight: 600; border-radius: 20px; padding: 2px 9px; background: var(--dv-acc-soft); color: var(--dv-acc); }
.st-badge.st-base { background: #eef6ee; color: #3d7a3d; }
.st-badge.st-cst { background: #f3eefa; color: #6b3fa0; }
.st-memo-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.st-memo-head b { font-weight: 600; color: #334155; }
.st-memo-row { padding-bottom: 8px; border-bottom: 1px solid #e4e7ee; }
.st-memo-row:last-child { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 640px) {
  .st-forms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-fn { font-size: 1.1rem; }
  .dv-field { grid-template-columns: minmax(0, 1fr); }
  .dv-fl { text-align: left; }
  .dv-prev { grid-column: 1; }
  .st-row { grid-template-columns: minmax(0, 1fr); }
  .st-rl { text-align: left; }
}

/* Rates of change: the correction's sections and the table of average rates */
.rt-section { font-weight: 700; margin: 14px 0 2px; color: #334155; }
.rt-table-wrap { overflow-x: auto; margin: 6px 0 12px; }
.rt-table { border-collapse: collapse; margin: 0 auto; }
.rt-table th, .rt-table td { border: 1px solid #cdd4df; padding: 6px 10px; text-align: center; white-space: nowrap; }
.rt-table th { background: #f4f6f9; font-weight: 400; }
.rt-method { font-size: .9rem; color: #5b6678; margin: 8px 0 0; font-style: italic; }
.sx-as-choice { display: flex; flex-wrap: wrap; gap: 10px; }
.sx-as-choice-btn { border: 2px solid #c7d2fe; background: #eef2ff; color: #3730a3; border-radius: 10px; padding: 10px 14px; font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.sx-as-choice-btn:hover { border-color: #4f46e5; background: #e0e7ff; }
.sx-as-break { flex-basis: 100%; height: 0; }
