.fermat-modes{flex-wrap:wrap;max-width:100%;width:max-content;margin-bottom:1.5rem}.fermat-modes button{min-height:44px;font-size:1rem}.fermat-equation{margin:.5rem 0 1.25rem;overflow-x:auto;max-width:100%;padding-bottom:.4rem}.fermat-visual{min-width:0}.fermat-solids{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}.fermat-solids figure{margin:0;min-width:0;text-align:center}.fermat-solids svg{display:block;width:100%;max-height:180px}.fermat-solids figcaption{font-size:1rem;overflow-x:auto}.fermat-bars{margin:1rem 0}.fermat-bars>p{margin:.8rem 0 .35rem;font-size:1rem}.fermat-track{height:28px;display:flex;width:100%;background:#f0f2f6;border:1px solid #a8afb9;overflow:hidden}.fermat-track>span{display:block;height:100%}.fermat-a{background:#245de1}.fermat-b{background:#147a59}.fermat-c{background:#6c45b0}.fermat-result{font-size:1.125rem;line-height:1.6;margin:1.25rem 0}.fermat-values dl{margin:1rem 0;border-top:1px solid var(--line)}.fermat-values dl>div{display:grid;grid-template-columns:minmax(8rem,1fr) minmax(0,2fr);gap:1rem;padding:.75rem 0;border-bottom:1px solid var(--line)}.fermat-values dt{font-size:.875rem;color:var(--muted)}.fermat-values dd{margin:0;font-size:1rem;overflow-wrap:anywhere;min-width:0;font-variant-numeric:tabular-nums;max-width:100%;overflow-x:auto}.fermat-theorem{margin:1rem 0;font-size:1rem}.fermat-theorem summary{min-height:44px;cursor:pointer;display:flex;align-items:center;font-size:.875rem}.fermat-theorem a{text-decoration:underline}.fermat-grid{width:100%;max-width:430px;height:auto;display:block;margin:auto}.fermat-grid text{font:18px sans-serif;fill:var(--ink)}.fermat-matches{display:flex;flex-wrap:wrap;gap:.5rem}.fermat-matches .button{min-height:44px}.fermat-rounded{padding:1.25rem 0}.fermat-rounded>span{display:block;font-size:1rem;color:var(--muted)}.fermat-rounded output{display:block;font-size:clamp(1.75rem,4vw,2.5rem);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;margin:.5rem 0}.fermat-rounded p,.fermat-divisibility p{font-size:1rem;line-height:1.6}.fermat-divisibility h2{font-size:1.125rem;font-weight:500}.fermat-lab .control-actions{display:flex;flex-direction:column;gap:.6rem}.fermat-lab .control-actions .button{min-height:44px}.fermat-lab .controls .button{white-space:normal}
@media(max-width:720px){.fermat-lab .workspace{display:flex;flex-direction:column}.fermat-lab .controls{order:-1;padding:0 0 1rem;border-top:0;border-bottom:1px solid var(--line)}.fermat-values dl>div{grid-template-columns:minmax(0,1fr);gap:.35rem}.fermat-solids figcaption{font-size:.9375rem}.fermat-modes{gap:.25rem}.fermat-modes button{padding:.6rem .75rem}.fermat-rounded{padding:.5rem 0}}
