/* Reference sheets for the question bank (js/reference-sheets.js), shown in
   a floating window (js/sat-tools.js; the window's own rules are in
   sat-run.css). Formulas in a few columns, each section with the meaning of
   its letters; the periodic table as a grid that scrolls sideways when the
   window is narrow. */
html:root body .satx-float--sheet { width: min(44rem, calc(100vw - 1rem)); height: min(40rem, calc(100vh - 5.5rem)); }
html:root body .satx-float--sheet-wide { width: min(62rem, calc(100vw - 1rem)); }
html:root body .satx-float--sheet.is-large { width: min(78rem, calc(100vw - 1rem)); height: calc(100vh - 5.5rem); }
html:root body .refsheet { color: var(--ink); font-size: .9375rem; line-height: 1.5; }
html:root body .refsheet__section + .refsheet__section { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
html:root body .refsheet h3 { margin: 0 0 .7rem; color: var(--brand); font-size: 1.0625rem; font-stretch: 92%; line-height: 1.3; }
html:root body .refsheet h4 { margin: 1rem 0 .5rem; color: var(--ink); font-size: .9375rem; }
html:root body .refsheet__equations { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .55rem 1.5rem; margin: 0 0 .75rem; padding: 0; list-style: none; }
html:root body .refsheet__equations li { min-width: 0; min-height: 2rem; overflow-x: auto; overflow-y: hidden; }
html:root body .refsheet__equations li.has-label { display: grid; gap: .1rem; }
html:root body .refsheet__label { color: var(--muted); font-size: .8125rem; }
html:root body .refsheet__symbols { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; margin: .5rem 0 0; padding: .6rem .75rem; background: var(--mist); border-radius: var(--r-ctl); font-size: .8125rem; }
html:root body .refsheet__symbols div { display: inline-flex; gap: .35rem; align-items: baseline; }
html:root body .refsheet__symbols dt { font-weight: 400; }
html:root body .refsheet__symbols dt::after { content: " ="; }
html:root body .refsheet__symbols dd { margin: 0; color: var(--ink-soft); }
html:root body .refsheet__terms { display: grid; gap: .35rem; margin: 0; }
html:root body .refsheet__terms div { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: .75rem; }
html:root body .refsheet__terms dt { font-weight: 700; }
html:root body .refsheet__terms dd { margin: 0; }
html:root body .refsheet__list { margin: 0; padding-left: 1.2rem; list-style: disc; }
html:root body .refsheet__note { margin: .6rem 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.5; }
html:root body .refsheet__scroll { max-width: 100%; overflow-x: auto; }
html:root body .refsheet__table { width: 100%; border-collapse: collapse; font-size: .875rem; font-variant-numeric: tabular-nums; }
html:root body .refsheet__table.is-narrow { width: auto; min-width: 16rem; }
html:root body .refsheet__table :is(th, td) { padding: .35rem .65rem; border: 1px solid var(--line-strong); text-align: center; white-space: nowrap; }
html:root body .refsheet__table thead th { background: var(--mist); font-weight: 700; }
html:root body .refsheet__table tbody th { font-weight: 600; text-align: left; }
html:root body .refsheet__instructions { display: grid; gap: .6rem; margin: 0; }
html:root body .refsheet__instructions div { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: .5rem 1.1rem; align-items: start; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
html:root body .refsheet__instructions div:last-child { padding-bottom: 0; border-bottom: 0; }
html:root body .refsheet__instructions dt { display: flex; flex-wrap: wrap; gap: .3rem; min-width: 0; }
html:root body .refsheet__instructions dd { margin: 0; }
html:root body .refsheet__code { display: inline-block; padding: .2rem .45rem; background: var(--mist); border: 1px solid var(--line); border-radius: 4px; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8125rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
html:root body .refsheet__source { margin: 1.25rem 0 0; padding-top: .75rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }
html:root body .refsheet__source a { color: var(--brand); text-decoration: underline; text-underline-offset: .2em; }

/* The periodic table: eighteen columns; the two long series sit below. */
html:root body .ptable { display: grid; grid-template-columns: repeat(18, minmax(2.6rem, 1fr)); grid-template-rows: auto repeat(7, auto) .6rem auto auto; gap: 2px; min-width: 49rem; }
html:root body .ptable__group { color: var(--muted); font-size: .6875rem; text-align: center; }
html:root body .ptable__cell { display: grid; justify-items: center; padding: .15rem .1rem .2rem; border: 1px solid var(--line-strong); background: var(--paper); line-height: 1.15; }
html:root body .ptable__cell strong { color: var(--ink); font-size: .9375rem; }
html:root body .ptable__number { color: var(--muted); font-size: .625rem; }
html:root body .ptable__mass { color: var(--ink-soft); font-size: .625rem; font-variant-numeric: tabular-nums; }
html:root body .ptable__series { display: grid; place-items: center; border: 1px dashed var(--line-strong); color: var(--muted); font-size: .625rem; }

@media (max-width: 720px) {
  html:root body .satx-float--sheet, html:root body .satx-float--sheet.is-large { height: 78vh; }
  html:root body .refsheet__equations { grid-template-columns: minmax(0, 1fr); }
  html:root body .refsheet__instructions div { grid-template-columns: minmax(0, 1fr); }
}
