.mathsheet,.mathsheet__layout{display:grid;gap:var(--space-4)}.mathsheet{container-type:inline-size}.mathsheet__layout > *{min-width:0;margin:0}.mathsheet__choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3);align-items:end}.mathsheet__choices [data-ms-field="type"]{grid-column:1 / -1}.mathsheet__go{display:flex;flex-wrap:wrap;gap:var(--space-3)}.mathsheet__go > .btn{flex:1 1 auto}.mathsheet__go > [data-primary-action]{flex-grow:9}.mathsheet__more{border-top:1px solid var(--line)}.mathsheet__more > summary{display:flex;gap:var(--space-2);align-items:center;justify-content:space-between;min-height:var(--tap);border-radius:var(--radius-sm);color:var(--ink-muted);cursor:pointer;list-style:none}.mathsheet__more > summary::-webkit-details-marker{display:none}.mathsheet__more > summary:hover{color:var(--ink)}.mathsheet__more > summary:focus-visible,.mathsheet__sheet:focus-visible{outline:3px solid var(--ring);outline-offset:2px}.mathsheet__more[open] .mathsheet__chevron{transform:rotate(180deg)}.mathsheet__more .tool-more__body{display:grid;gap:var(--space-3);padding-block:var(--space-2) var(--space-3)}.mathsheet__more .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3)}.mathsheet__more [data-ms-field="layout"]{grid-column:1 / -1}.mathsheet__tables{gap:var(--space-2)}.mathsheet__tables .pills{display:grid;grid-template-columns:repeat(6,minmax(0,1fr))}.mathsheet__tables .pill{justify-content:center;min-height:var(--tap);padding-inline:0;font-size:var(--step-0);font-variant-numeric:tabular-nums}.mathsheet__tables .pill[aria-pressed="true"]{background:var(--brand-soft);box-shadow:inset 0 0 0 1.5px var(--brand);color:var(--ink)}.mathsheet__after{display:grid;gap:var(--space-3)}.mathsheet__after[data-wait]{display:none}.mathsheet__preview,.mathsheet__sheet{display:grid;gap:var(--space-3);align-content:start}.mathsheet__preview > .tool-status{min-height:4.8em}@container (min-width:30rem){.mathsheet__preview > .tool-status{min-height:3.2em}}.mathsheet__frame{position:relative}.mathsheet__sheet{height:20rem;padding:var(--space-2);overflow-y:auto;border-radius:var(--radius);background:var(--surface-2)}.mathsheet__over{position:absolute;inset:var(--space-3) var(--space-3) auto;z-index:1;border-radius:var(--radius-sm);background:var(--surface);box-shadow:var(--shadow-2)}.mathsheet__over .banner{display:grid;gap:var(--space-2)}.mathsheet__over p{margin:0}.mathsheet__page{display:grid;gap:var(--space-4);padding:var(--space-4);border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--ink)}.mathsheet__page > *,.mathsheet__head > *{margin:0}.mathsheet__head{display:grid;gap:var(--space-2)}.mathsheet__title{font-size:var(--step-0);font-weight:700;line-height:1.25}.mathsheet__fill,.mathsheet__n,.mathsheet__foot{color:var(--ink-muted);font-size:var(--step--1)}.mathsheet__fill{display:flex;flex-wrap:wrap;gap:var(--space-1) var(--space-4)}.mathsheet__rule{display:inline-block;width:5em;border-bottom:1px solid currentColor}.mathsheet__rule--long{width:8em}.mathsheet__rule--short{width:2.5em}.mathsheet__grid,.mathsheet__answers{margin:0;padding:0;list-style:none;font-variant-numeric:tabular-nums}.mathsheet__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(8.5rem,1fr));gap:var(--space-4);font-size:var(--step-0)}.mathsheet__item{display:flex;align-items:baseline;gap:var(--space-2);min-width:0}.mathsheet__n{flex:none;min-width:1.9em;text-align:right}.mathsheet__sum{white-space:nowrap}.mathsheet__blank{flex:1;min-width:var(--space-4);max-width:4rem;border-bottom:1px solid var(--line-strong)}[data-layout="stacked"] > .mathsheet__grid{grid-template-columns:repeat(auto-fill,minmax(4.75rem,1fr));gap:var(--space-5) var(--space-4)}.mathsheet__page[data-layout="stacked"] .mathsheet__item{position:relative;display:block;padding-bottom:1.75em}.mathsheet__page[data-layout="stacked"] .mathsheet__n{position:absolute;top:0;left:0;min-width:0}.mathsheet__stack{display:grid;width:fit-content;min-width:2.75em;margin-left:auto;font-size:var(--step-1);line-height:1.3}.mathsheet__row{display:block;text-align:right}.mathsheet__row--last{display:flex;justify-content:space-between;gap:var(--space-2);border-bottom:2px solid currentColor}.mathsheet__answers{columns:8.5rem auto;column-gap:var(--space-4);font-size:var(--step--1)}.mathsheet__answer{padding-block:var(--space-1);white-space:nowrap;break-inside:avoid}.mathsheet__answer .mathsheet__n{display:inline-block;margin-right:var(--space-2)}.mathsheet__foot{text-align:right}.mathsheet__work{flex:1;min-width:0}.mathsheet__line{display:block;line-height:1.9}.mathsheet__gap--0{display:inline-block;width:1.6em;height:1.6em;border:1px solid;border-radius:50%;vertical-align:middle}.mathsheet__frac{vertical-align:middle}.mathsheet__pic{vertical-align:top}[data-fit="mid"] > .mathsheet__grid{grid-template-columns:repeat(auto-fill,minmax(min(14rem,100%),1fr))}[data-fit="wide"] > .mathsheet__grid{grid-template-columns:1fr}[data-layout="boxes"] .mathsheet__item{padding:var(--space-3);border:1px solid;border-radius:var(--radius-sm)}.mathsheet__table{position:relative}.mathsheet__table,.mathsheet__table :is(th,td){border:1px solid;font-size:inherit;text-align:center}@media (prefers-reduced-motion:no-preference){.mathsheet__page.is-new{animation:mathsheet-in 0.25s var(--ease)}}@keyframes mathsheet-in{from{opacity:0.4}}@container (min-width:46rem){.mathsheet__layout{grid-template-columns:minmax(0,4fr) minmax(0,7fr);grid-template-rows:auto auto auto 1fr;column-gap:var(--space-6);align-items:start}.mathsheet__layout > *{grid-column:1}.mathsheet__layout > .mathsheet__preview{grid-column:2;grid-row:1 / -1}.mathsheet__sheet{height:38rem}}@media print{main:has(.mathsheet) > :not(.tool){display:none !important}.mathsheet,.mathsheet__layout,.mathsheet__preview,.mathsheet__sheet{display:block}.mathsheet__sheet{height:auto;padding:0;overflow:visible;background:none}.mathsheet__page{display:block;padding:0;border:0;border-radius:0}.mathsheet__title{font-size:15pt}.mathsheet__fill{justify-content:space-between;margin-top:5mm;color:inherit;font-size:11pt}.mathsheet__rule{width:32mm}.mathsheet__rule--long{width:70mm}.mathsheet__rule--short{width:12mm}.mathsheet__grid{grid-auto-rows:1fr;height:212mm;margin-top:8mm;font-size:17pt}[data-cols] > .mathsheet__grid{grid-template-columns:repeat(var(--ms-c),minmax(0,1fr));gap:0 6mm}[data-cols="10"] > .mathsheet__grid{gap:0 4mm}[data-cols="1"]{--ms-c:1}[data-cols="2"]{--ms-c:2}[data-cols="3"]{--ms-c:3}[data-cols="4"]{--ms-c:4}[data-cols="5"]{--ms-c:5}[data-cols="6"]{--ms-c:6}[data-cols="8"]{--ms-c:8}[data-cols="10"]{--ms-c:10}[data-count="30"] > .mathsheet__grid{font-size:15pt}[data-count="40"] > .mathsheet__grid{font-size:14pt}[data-count="60"] > .mathsheet__grid{font-size:12pt}[data-count="100"] > .mathsheet__grid{font-size:11pt}.mathsheet__item{align-items:center;gap:2mm;break-inside:avoid}.mathsheet__n{color:inherit;font-size:0.6em}.mathsheet__blank{align-self:center;max-width:24mm;margin-top:0.9em}.mathsheet__page[data-layout="stacked"] .mathsheet__item{padding-bottom:0}.mathsheet__stack{font-size:1.15em}.mathsheet__answers{columns:4;column-gap:8mm;margin-top:8mm;font-size:11pt}[data-count="100"] > .mathsheet__answers{columns:5;font-size:10pt}.mathsheet__answer{padding-block:1mm}.mathsheet__foot{margin-top:4mm;color:inherit;font-size:8pt}.mathsheet__task{margin-top:3mm;font-size:11pt}.mathsheet__page--typed > :is(ol,.table-wrap){height:auto;margin-top:5mm;font-size:var(--ms-s,17pt)}.mathsheet__page--typed > ol{min-height:186mm}[data-size="14"]{--ms-s:14pt}[data-size="12"]{--ms-s:12pt}[data-size="10"]{--ms-s:10pt}[data-size="8"]{--ms-s:8pt}.mathsheet__page--typed .mathsheet__item{align-items:baseline}}.mathsheet__layout{display:grid;gap:var(--space-4)}.mathsheet__layout > .mathsheet__preview{order:-1}.mathsheet__layout > .mathsheet__go{order:-2}.mathsheet [data-ms-status],.mathsheet .btn:not(.btn-primary) > .icon{display:none}.mathsheet__frame{max-height:none;overflow:visible;border:0;background:none;padding:0}.mathsheet__go .btn-secondary,.mathsheet__after .btn{min-height:0;padding:0;border:0;border-radius:0;background:none;color:var(--link);font-weight:400;text-decoration:underline;text-underline-offset:0.25em}
