/* Cellwise public site. Tokens first; every colour pair below meets WCAG AA in both themes. */
:root {
  --bg: #F3F7F5; --ink: #12201A; --ink2: #4A5C54; --ink3: #5E6F68;
  --card: #FFFFFF; --hair: rgba(18, 32, 26, .12); --green: #12A150; --green2: #0B7A3B; --btn: #0D8040; --on-green: #fff;
  --tint: color-mix(in srgb, var(--green) 9%, var(--card));
  --blue: #1A58C0; --link: #0A7037; --link-hover: #06552A; --bad: #C9302C; --gold: #7A5600;
  --cell: #FFFFFF; --cellh: #F2F5F4; --cell-line: #DCE3E0;
  --hue-l: 27%; --hue-bg: .14;
  --radius: 16px; --radius-s: 10px;
  --shadow: 0 1px 2px rgba(16, 40, 30, .06), 0 8px 24px -12px rgba(16, 40, 30, .16);
  --shadow-hover: 0 2px 4px rgba(16, 40, 30, .08), 0 14px 30px -12px rgba(16, 40, 30, .24);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", sans-serif;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1512; --ink: #E9F3EE; --ink2: #B0C2BA; --ink3: #8A9C94;
    --card: #142019; --hair: rgba(255, 255, 255, .11); --green: #2FC874; --green2: #4ED68A; --btn: #2FC874; --on-green: #0B1A12;
    --blue: #7AAEFF; --link: #4ED68A; --link-hover: #7FE5AB; --bad: #FF6B70; --gold: #F2C14E; --cell: #16211D; --cellh: #1D2A25; --cell-line: #2A3833;
    --hue-l: 72%; --hue-bg: .2;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -12px rgba(0, 0, 0, .5);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 16px 32px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1512; --ink: #E9F3EE; --ink2: #B0C2BA; --ink3: #8A9C94;
  --card: #142019; --hair: rgba(255, 255, 255, .11); --green: #2FC874; --green2: #4ED68A; --btn: #2FC874; --on-green: #0B1A12;
  --blue: #7AAEFF; --link: #4ED68A; --link-hover: #7FE5AB; --bad: #FF6B70; --gold: #F2C14E; --cell: #16211D; --cellh: #1D2A25; --cell-line: #2A3833;
  --hue-l: 72%; --hue-bg: .2;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -12px rgba(0, 0, 0, .5);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 16px 32px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 120px; }
html, body { margin: 0; }
body { font: 1.0625rem/1.6 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
h1, h2, h3 { font-family: var(--round); line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(1.875rem, 5vw, 2.75rem); margin: .3em 0 .25em; }
h2 { font-size: 1.5rem; margin: 1.8em 0 .55em; }
h3 { font-size: 1.125rem; margin: 0 0 .35em; }
p { text-wrap: pretty; }
a { color: var(--link); text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-decoration-thickness: 1px; text-underline-offset: .2em; transition: color .15s ease, text-decoration-color .15s ease; }
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }
code { font-family: var(--mono); font-size: .9em; overflow-wrap: anywhere; } /* long formulas wrap instead of pushing the page sideways */
p code, .steps li code, .links li code, dd code, .answer code, summary code, h3 code { padding: .05em .3em; border-radius: 6px; background: color-mix(in srgb, var(--ink) 6%, transparent); overflow-wrap: anywhere; }
.wrap { width: min(62.5rem, 100% - 32px); margin: 0 auto; } /* rem: the column grows with the reader's text size */
/* Big desktop and TV screens: everything sized in rem (text, the column) steps up, so the page is not a small strip in
   the middle of a 2560px screen. Percentages keep the reader's own font-size setting in the mix. */
@media (min-width: 1800px) { html { font-size: 112.5%; } }
@media (min-width: 2400px) { html { font-size: 125%; } }
.muted { color: var(--ink2); } .small { font-size: .875rem; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; background: var(--card); color: var(--ink); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 650; }
.skip:focus { left: 16px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--hair); padding-top: env(safe-area-inset-top, 0px); }
.top-in { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 750 1.25rem var(--round); color: var(--ink); text-decoration: none; }
.logo { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 26px; height: 26px; padding: 3px; border-radius: 8px; background: var(--green); }
.logo i { background: rgba(255, 255, 255, .92); border-radius: 2px; }
.logo i:nth-child(4) { background: transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .92); }
.topnav { display: flex; justify-content: flex-end; align-items: center; gap: 2px; }
.topnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink2); text-decoration: none; font-weight: 600; font-size: .9375rem; white-space: nowrap; }
.topnav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.topnav a[aria-current] { color: var(--link-hover); background: color-mix(in srgb, var(--green) 10%, transparent); }
.topnav a.nav-fix { gap: 6px; color: var(--green2); }
.topnav .nav-ic { width: 17px; height: 17px; flex: none; }
.topnav .ns { display: none; }
@media (max-width: 640px) { .topnav .nl { display: none; } .topnav .ns { display: inline; } .topnav .nav-ic { width: 15px; height: 15px; } }
.hx-alt { margin: 14px 0 0; }
.hx-alt a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--green) 9%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 28%, var(--hair)); color: var(--ink); text-decoration: none; font-size: .9375rem; line-height: 1.3; }
.hx-alt a:hover { box-shadow: inset 0 0 0 1px var(--green); }
.hx-alt b { color: var(--green2); font-weight: 700; }
.hx-alt .nav-ic { width: 18px; height: 18px; flex: none; color: var(--green2); }
.crumbs { font-size: .875rem; color: var(--ink3); padding-top: 14px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--ink3); }
.crumbs a { color: var(--ink2); }
.crumbs [aria-current] { color: var(--ink3); }
.crumbs li:last-child { min-width: 0; flex: 1 1 7em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--link); text-decoration: underline; }

/* ---------- buttons, cards ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 44px; padding: .55em 1.3em; border-radius: 999px; font-weight: 650; text-decoration: none; text-align: center; background: var(--btn); color: var(--on-green); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 16px -8px var(--btn); }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.small { min-height: 44px; padding: .3em 1.05em; font-size: .9375rem; }
.btn.big { min-height: 52px; padding: .7em 1.7em; font-size: 1.0625rem; }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card { background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
a.card { color: var(--ink); text-decoration: none; }
a.card:hover { box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--green) 45%, var(--hair)); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 50%, var(--hair)); filter: none; }
.pill { display: inline-block; font-size: .75rem; font-weight: 650; line-height: 1.5; color: var(--ink2); background: color-mix(in srgb, var(--ink) 8%, transparent); padding: .1em .6em; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.pill.free { color: var(--link-hover); background: color-mix(in srgb, var(--green) 14%, transparent); }
.pill.plus { color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); }

/* ---------- article ---------- */
.lede { font-size: 1.1875rem; color: var(--ink2); margin: .2em 0 1.2em; max-width: 40em; }
.kicker { margin: 1.4em 0 0; font-weight: 650; font-size: .9375rem; color: hsl(var(--h, 152) 65% var(--hue-l)); }
.doc { max-width: 50rem; }
.doc > p, .doc section > p, .links li, .steps li { max-width: 44em; }
.updated { margin-top: 2.5em; }
.answer { font-size: 1.125rem; background: var(--tint); border-color: color-mix(in srgb, var(--green) 25%, var(--hair)); }
.answer .label { display: block; font: 700 .75rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--green2); margin-bottom: 4px; }
.sig { display: flex; gap: 12px; align-items: flex-start; font-size: 1.0625rem; }
.sig code { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.fxl { flex: none; font: italic 600 .9375rem/1.7 Georgia, serif; color: var(--ink3); }
.args { display: grid; gap: 0; margin: 0; border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; background: var(--card); }
.args div { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 12px; padding: 10px 16px; }
.args div + div { border-top: 1px solid var(--hair); }
.args dt code { font-weight: 650; overflow-wrap: anywhere; } .args dd { margin: 0; color: var(--ink2); }

/* ---------- mini spreadsheet ---------- */
.sheet { overflow-x: auto; border: 1px solid var(--cell-line); border-radius: 12px; background: var(--cell); margin: 12px 0; -webkit-overflow-scrolling: touch; }
.xl { border-collapse: separate; border-spacing: 0; font-size: .9375rem; min-width: 100%; }
/* each cell draws its right and bottom line: a collapsed (shared) border left a gap beside the sticky row numbers */
.xl th, .xl td { border-style: solid; border-color: var(--cell-line); border-width: 0 1px 1px 0; }
.xl tr > :first-child { border-left-width: 1px; }
.xl > :first-child > tr:first-child > * { border-top-width: 1px; }
.xl th { background: var(--cellh); color: var(--ink3); font: 600 .75rem var(--sans); padding: 4px 8px; }
.xl thead th:first-child, .xl tbody th { width: 36px; }
/* row numbers stay put when a wide sheet scrolls sideways, like Excel's frozen headings */
.xl tbody th { position: sticky; left: 0; z-index: 1; box-shadow: inset -1px 0 0 var(--cell-line); }
.xl thead th:first-child { position: sticky; left: 0; z-index: 2; }
.xl td { padding: 6px 10px; white-space: nowrap; min-width: 64px; height: 34px; }
.xl td.n { text-align: right; font-variant-numeric: tabular-nums; }
.xl td.hd { font-weight: 650; background: var(--cellh); }
.xl td.tgt { box-shadow: inset 0 0 0 2px var(--green); font-weight: 650; color: var(--green2); }
.xl td.err, .err { color: var(--bad); }
.sheet + .scroll-hint { display: none; }
/* Scroll shadows: a soft edge appears on whichever side has more columns, and fades as you reach the end. */
.sheet { background:
  linear-gradient(to right, var(--cell) 40%, transparent) left / 32px 100% no-repeat local,
  linear-gradient(to left, var(--cell) 40%, transparent) right / 32px 100% no-repeat local,
  linear-gradient(to right, color-mix(in srgb, var(--ink) 16%, transparent), transparent) left / 14px 100% no-repeat scroll,
  linear-gradient(to left, color-mix(in srgb, var(--ink) 16%, transparent), transparent) right / 14px 100% no-repeat scroll,
  var(--cell); }
@media (max-width: 600px) { .xl td:not(.n) { white-space: normal; overflow-wrap: break-word; max-width: 140px; } }
.fbar { display: flex; align-items: flex-start; gap: 10px; padding: 7px 12px; border-radius: var(--radius-s); background: var(--cell); border: 1px solid var(--cell-line); }
.fbar code { font-size: 1rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.fbar a { color: var(--green2); text-decoration: none; font-weight: 650; }
.fbar a:hover { text-decoration: underline; }
.nb { flex: none; font: 650 .875rem/1.85 var(--mono); color: var(--ink2); padding-right: 10px; border-right: 1px solid var(--cell-line); }
.result { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.result .lbl { color: var(--ink2); }
.result b { font-variant-numeric: tabular-nums; }
.result .shown { color: var(--ink2); font-size: .9375rem; }
.result .shown b { color: var(--ink); }
.result .blank { color: var(--ink2); font-style: italic; }
.ex, .examples > li { display: grid; gap: 0; }
.ex > p:last-child, .examples > li > p:last-child { margin-bottom: 0; }
.ex .sheet, .examples .sheet { margin-bottom: 0; }

/* ---------- lists of things ---------- */
.examples, .exlist, .steps { padding-left: 0; list-style: none; display: grid; gap: 12px; counter-reset: s var(--start, 0); }
.ex { margin: 14px 0; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: baseline; }
.steps li::before { content: counter(s); flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green2); font: 700 .875rem var(--round); transform: translateY(-1px); }
.steps li > span { min-width: 0; }
.mistakes, .guide { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.mistakes p, .guide p { margin: 0; color: var(--ink2); }
.guide .f { display: block; margin: 6px 0 10px; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--green) 10%, transparent); color: var(--green2); font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }
.guide .f a { color: inherit; }
.faq { display: grid; gap: 10px; }
.faq details { padding: 0; }
.faq summary, .exlist summary { cursor: pointer; font-weight: 650; }
.faq summary { padding: 14px 20px; min-height: 44px; list-style: none; display: flex; gap: 12px; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 6%, transparent); font: 600 1.25rem/1 var(--sans); color: var(--ink2); }
.faq summary:hover::after { color: var(--link); background: color-mix(in srgb, var(--green) 12%, transparent); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0; padding: 0 20px 16px; color: var(--ink2); }
.exlist summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--green2); }
.exlist .q { font-weight: 650; margin: 0 0 8px; }
.exlist details { margin-top: 4px; color: var(--ink2); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.opts li { padding: 4px 12px; border-radius: 10px; border: 1px solid var(--hair); font-size: .9375rem; }
.pairs { display: grid; gap: 6px; margin: 0; }
.pairs div { display: grid; grid-template-columns: 160px 1fr; gap: 12px; }
.pairs dt { font-weight: 650; } .pairs dd { margin: 0; color: var(--ink2); }
.links { padding-left: 1.2em; }
.links li { margin: 2px 0; }
.chips { list-style: none; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.chips a { display: flex; flex-direction: column; gap: 2px; min-height: 44px; height: 100%; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--hair); text-decoration: none; color: var(--ink); }
.chips a:hover { border-color: color-mix(in srgb, var(--green) 45%, var(--hair)); }
.chips code { font-weight: 700; color: var(--green2); }
.chips span { font-size: .875rem; color: var(--ink2); }
.chips b { font-weight: 650; }

/* ---------- calls to action ---------- */
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin: 2.2em 0; background: linear-gradient(135deg, color-mix(in srgb, var(--green) 13%, var(--card)), var(--card)); border-color: color-mix(in srgb, var(--green) 25%, var(--hair)); }
.cta > div { min-width: 0; max-width: 44em; }
.cta h2 { margin: 0; font-size: 1.25rem; } .cta p { margin: 6px 0 0; color: var(--ink2); }
.cta .row { flex: none; }
/* early practice link under a guide's quick answer (gen/build.js quickPractice): one tap target, no layout shift */
.qcta { margin: 12px 0 0; }
.qcta a { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; min-height: 48px; padding: 10px 16px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 35%, var(--hair)); color: var(--ink); text-decoration: none; line-height: 1.35; }
.qcta a:hover { box-shadow: inset 0 0 0 1px var(--green); }
.qcta a:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.qcta-t { font-weight: 600; overflow-wrap: anywhere; } .qcta-t b { color: var(--green2); font-weight: 700; }
.qcta-s { grid-column: 1; font-size: .875rem; color: var(--ink2); }
.qcta-ar { grid-column: 2; grid-row: 1 / span 2; font-weight: 700; color: var(--green2); }
.plus-note { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; margin: .5em 0 1.5em; border-style: dashed; box-shadow: none; }
.plus-note p { margin: 0; color: var(--ink2); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 2em 0; }
.pager a { display: grid; gap: 2px; padding: 12px 16px; text-decoration: none; }
.pager a span { font-size: .8125rem; color: var(--ink3); font-weight: 600; }
.pager a b { color: var(--ink); }
.pager .next { text-align: right; grid-column: 2; }

/* ---------- indexes ---------- */
.search { width: 100%; min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--hair); background: var(--card); color: var(--ink); font: inherit; box-shadow: var(--shadow); }
.search::placeholder { color: var(--ink3); }
.noresults { margin: 16px 0; } .noresults p { margin: 0; }
.fngrid { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.fngrid a { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px; }
.fngrid code { font-weight: 700; color: var(--green2); }
.fngrid span { font-size: .875rem; color: var(--ink2); }
.units { list-style: none; padding: 0; display: grid; gap: 10px; }
.units.two { grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); }
.units a { display: flex; gap: 14px; align-items: center; height: 100%; }
.units a > span:last-child { display: grid; gap: 2px; min-width: 0; }
.units .muted { font-size: .9375rem; }
.units .t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.badge { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font: 800 1rem var(--round); color: hsl(var(--h) 70% var(--hue-l)); background: hsl(var(--h) 80% 55% / var(--hue-bg)); }
.glist { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.glist > li { min-width: 0; }
.glist a { display: grid; align-content: start; gap: 4px; height: 100%; }
.glist .muted { font-size: .9375rem; }
.more { font-weight: 650; }
.more a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; padding: 40px 0 8px; }
.hero h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); letter-spacing: -.03em; margin-top: 0; }
.hero .fine { margin: 12px 0 0; font-size: .9375rem; color: var(--ink2); }
.hero > div > .kicker:first-child { margin-top: 0; }
.hero-art { padding: 14px; border-radius: 22px; background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--spec), var(--shadow); transform: rotate(1.5deg); }
.hero-art .glimpse { height: auto; min-height: 230px; }
@media (max-width: 760px) { .hero-art { transform: none; max-width: 420px; } }
.demo { transform: rotate(-1.5deg); }
.demo .xl td { min-width: 0; }
.feat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 32px; }
/* home: see the HOME block at the end */
.feat3 h2 { font-size: 1.125rem; margin: 0 0 .3em; } .feat3 p { margin: 0; color: var(--ink2); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plans h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 1.25rem; }
.plans .price { font: 650 1rem var(--sans); color: var(--ink2); }
.plans ul { margin: .4em 0 1em; padding-left: 1.2em; color: var(--ink2); }
.plans li { margin: 4px 0; }
.plans .card { display: flex; flex-direction: column; }
.plans .card .btn { margin-top: auto; align-self: flex-start; }
.plans .best { border-color: color-mix(in srgb, var(--green) 45%, var(--hair)); }

/* ---------- 404 ---------- */
.nf { padding: 32px 0 8px; }

/* ---------- footer ---------- */
.foot { margin-top: 72px; border-top: 1px solid var(--hair); padding: 36px 0 24px; }
.foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 20px; }
.foot-in > div:first-child p { margin: 10px 0 14px; max-width: 26em; }
.foot h2 { font: 700 .8125rem var(--sans); margin: 0 0 6px; color: var(--ink3); text-transform: uppercase; letter-spacing: .06em; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot ul a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink2); text-decoration: none; font-size: .9375rem; }
.foot ul a:hover { color: var(--ink); text-decoration: underline; }
.foot .legal { margin-top: 24px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  a.card, .chips a, .btn, .topnav a, .dir-chips a, .fngrid a, .glist a { transition: box-shadow .18s ease, border-color .18s ease, filter .18s ease, background-color .18s ease, color .18s ease, transform .18s ease; }
  a.card:hover, .chips a:hover { transform: translateY(-2px); }
  a.card:active, .chips a:active, .dir-chips a:active { transform: translateY(0) scale(.99); transition-duration: .08s; }
  .btn:active { transform: scale(.97); transition-duration: .08s; }
  .faq summary::after { transition: transform .2s ease; }
  .faq details[open] > p { animation: faqIn .22s ease both; }
  @keyframes faqIn { from { opacity: 0; transform: translateY(-4px); } }
}
@media (prefers-reduced-motion: reduce) {
  .demo { transform: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  body { font-size: 1rem; }
  .hero, .feat3, .plans { grid-template-columns: 1fr; }
  .hero { gap: 28px; padding-top: 24px; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-in > div:first-child { grid-column: 1 / -1; }
  .foot ul a { min-height: 44px; }
  .args div, .pairs div { grid-template-columns: 1fr; gap: 2px; }
  .demo { transform: none; }
  .links a { display: inline-block; padding: 9px 0; }
  .cta .row, .cta .row .btn { width: 100%; }
  h2 { font-size: 1.375rem; }
  .lede { font-size: 1.125rem; }
  .card { padding: 16px; }
  .faq summary { padding: 12px 16px; } .faq p { padding: 0 16px 14px; }
  .xl { font-size: .875rem; }
  .xl td { padding: 6px 8px; min-width: 48px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
}
@media (max-width: 640px) {
  .top-in { grid-template-columns: 1fr auto; grid-template-areas: "brand cta" "nav nav"; min-height: 0; padding-top: 6px; gap: 0 12px; }
  .top-in .brand { grid-area: brand; }
  .top-in > .btn { grid-area: cta; }
  .topnav { grid-area: nav; justify-content: space-between; margin: 0 -12px; overflow-x: auto; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { font-size: .9375rem; }
}
@media (max-width: 360px) {
  .wrap { width: calc(100% - 24px); }
  .topnav a { padding: 0 8px; font-size: .875rem; }
}
@media (max-width: 300px) {
  .topnav { margin: 0 -6px; }
  .topnav a { padding: 0 5px; font-size: .8125rem; letter-spacing: -.01em; }
  .brand { font-size: 1.125rem; }
  .btn.big { width: 100%; }
}

/* Long content never pushes the page sideways. */
.doc, main > *, .examples > li, .exlist > li, .mistakes > *, .guide > *, .units > li, .fngrid > li, .hero > *, .feat3 > *, .plans > * { min-width: 0; }
.opts li, .pairs dd, .exlist p, .examples p, .doc p, .doc li, .doc h2, .doc h3, .doc summary, .glist b, .glist span { overflow-wrap: anywhere; }

/* ---------- print (people print the cheat sheets) ---------- */
@media print {
  :root { --bg: #fff; --card: #fff; --shadow: none; --ink2: #333; --ink3: #555; --blue: #000; --link: #000; }
  body { font-size: 11.5pt; background: #fff; }
  .top, .foot, .crumbs, .cta, .search, .noresults, .skip, .plus-note .btn, .pager { display: none !important; }
  .wrap { width: 100%; }
  .card { box-shadow: none; break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  .sheet, .fbar { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .demo { transform: none; }
  .xl td { white-space: normal; }
  .faq summary::after { display: none; }
}

/* Hide the badge Netlify injects at serve time; it overlapped the lesson Check button. */
#nl-badge, .nl-badge, #nl-card { display: none !important; }

/* keyboard shortcut tables */
.kbwrap { overflow-x: auto; }
table.kb { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: .95rem; }
table.kb th, table.kb td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
table.kb th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink2); }
table.kb td:first-child { width: 44%; }
table.kb .combo { white-space: nowrap; }
table.kb .combo i { font-style: normal; margin: 0 3px; color: var(--ink2); }
table.kb kbd { display: inline-block; min-width: 1.6em; padding: 2px 7px; border: 1px solid var(--hair); border-bottom-width: 2px; border-radius: 6px; background: var(--card); font: 600 .82rem/1.4 var(--mono); text-align: center; white-space: nowrap; }
@media (max-width: 520px) { table.kb .combo { white-space: normal; } table.kb { font-size: .88rem; } table.kb th, table.kb td { padding: 8px 4px; } table.kb kbd { padding: 1px 5px; font-size: .76rem; } }

/* "Try it live" box: the sample sheet below becomes an editable mini spreadsheet */
.tryit { margin: 14px 0 6px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--green) 35%, var(--hair)); background: color-mix(in srgb, var(--green) 5%, var(--card)); }
.try-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 10px; }
.try-head strong { color: var(--green2); }
.try-head .muted { font-size: .875rem; }
.try-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--cell-line); border-radius: 10px; background: var(--cell); }
.try-f { flex: 1 1 220px; min-width: 0; min-height: 40px; border: 0; background: transparent; color: var(--ink); font: 600 .95rem var(--mono); }
.try-f:focus { outline: none; }
.try-bar:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 45%, transparent); }
.try-out { flex: none; max-width: 100%; overflow-wrap: anywhere; padding: 4px 12px; border-radius: 999px; font: 700 .95rem var(--mono); color: var(--green2); background: color-mix(in srgb, var(--green) 12%, transparent); }
.try-out.err { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.try-msg { margin: 8px 2px 0; font-size: .875rem; }
.try-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.try-chip { min-height: 36px; max-width: 100%; overflow-wrap: break-word; padding: 4px 10px; border: 1px solid var(--hair); border-radius: 8px; background: var(--card); color: var(--ink); font: 600 .8125rem var(--mono); text-align: left; cursor: pointer; }
.try-chip:hover { border-color: var(--green); }
.try-chip.ghost { font-family: var(--sans); color: var(--ink2); }
.xl td.edit { cursor: text; }
.xl td.edit:hover { background: var(--cellh); }
.xl td.edit:focus { outline: 2px solid var(--blue); outline-offset: -2px; background: var(--card); }
.xl td.ref { background: color-mix(in srgb, var(--blue) 12%, var(--cell)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 45%, transparent); }
@media (prefers-reduced-motion: no-preference) { .try-out.pop { animation: trypop .35s ease; } @keyframes trypop { 0% { transform: scale(.85); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } } }
@media print { .tryit { display: none; } }

/* ---------- templates gallery ---------- */
.tgrid { list-style: none; padding: 0; margin: 8px 0 28px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
a.card.tpl { display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px; height: 100%; color: var(--ink); text-decoration: none; }
a.card.tpl:hover { border-color: color-mix(in srgb, var(--green) 50%, var(--hair)); }
.tpl b { font-size: 1.0625rem; line-height: 1.3; }
.tpl .muted { font-size: .9rem; }
.tpl-ico { display: grid; grid-template-columns: repeat(3, 14px); grid-auto-rows: 9px; gap: 2px; margin-bottom: 4px; }
.tpl-ico i { border-radius: 2px; background: color-mix(in srgb, hsl(var(--h, 152) 60% 45%) 22%, var(--cell)); border: 1px solid color-mix(in srgb, hsl(var(--h, 152) 60% 45%) 35%, transparent); }
.tpl-ico i:nth-child(-n+3) { background: color-mix(in srgb, hsl(var(--h, 152) 60% 45%) 55%, var(--cell)); }
.tpl-get { justify-self: start; margin-top: 6px; padding: 2px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 650; color: var(--green2); background: color-mix(in srgb, var(--green) 12%, transparent); }
.dl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 6px 0 24px; border-color: color-mix(in srgb, var(--green) 35%, var(--hair)); }
.dl > div { display: grid; gap: 2px; min-width: 0; }
.dl b { font-family: var(--mono); font-size: .9375rem; overflow-wrap: anywhere; }
.dl .muted { font-size: .875rem; }
.tips { padding-left: 1.2em; }
.tips li { margin: .4em 0; }

/* ---------- Excel for <field> ---------- */
.fields { list-style: none; padding: 0; margin: 8px 0 28px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.fields a.card { display: grid; align-content: start; gap: 4px; height: 100%; padding: 14px 16px; color: var(--ink); text-decoration: none; border-top: 4px solid hsl(var(--h) 60% 45%); }
.fields a.card:hover { border-color: hsl(var(--h) 60% 45%); }
.fields.big { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.fields.big a.card { padding: 18px 20px; }
.fields.big b { font-size: 1.1875rem; }
.fields .muted { font-size: .9rem; }
@media (max-width: 600px) { .home-fields .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .home-fields .fields .muted { display: none; } .home-fields .fields a.card { padding: 12px; } }
.fcount { margin-top: 6px; font-size: .8125rem; font-weight: 600; color: hsl(var(--h) 65% var(--hue-l)); }
.hub .kicker a { color: inherit; }
.hub-hire { margin: 28px 0 8px; padding: 14px 16px; font-size: .9375rem; color: var(--ink2); } .hub-hire b { color: var(--ink); }
.hub h1 { text-wrap: balance; }
.who { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.who li { padding: 4px 12px; border-radius: 999px; font-size: .875rem; font-weight: 600; color: hsl(var(--h) 65% var(--hue-l)); background: hsl(var(--h) 60% 50% / var(--hue-bg)); }
.hub .qcta { margin-bottom: 16px; }
.careful { margin: 0 0 18px; padding: 10px 14px; border-radius: var(--radius-s); border: 1px solid var(--hair); background: var(--cellh); color: var(--ink2); font-size: .9375rem; }
.hub-toc { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 16px; margin-bottom: 8px; }
.hub-toc a { font-weight: 600; }
.job { margin: 0 0 26px; }
.job h3 { margin-bottom: .3em; }
.proj-teaser { display: grid; gap: 4px; justify-items: start; }

/* practice exercises graded on the page */
.pxs { list-style: none; padding: 0; margin: 10px 0 28px; display: grid; gap: 12px; counter-reset: none; }
.px .q { display: flex; gap: 10px; align-items: baseline; margin: 0 0 10px; }
.px-n { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-weight: 700; font-size: .875rem; color: var(--ink2); background: var(--cellh); }
.px.solved .px-n { color: var(--on-green); background: var(--btn); }
.px-row { display: flex; gap: 8px; flex-wrap: wrap; }
.px-f { flex: 1 1 220px; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--cell-line); border-radius: var(--radius-s); background: var(--cell); color: var(--ink); font: 600 .95rem var(--mono); }
.px-f:disabled { opacity: .6; }
.px-f:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
.px-out { margin: 10px 0 0; padding: 8px 12px; border-radius: var(--radius-s); font-size: .9375rem; }
.px-out.yes { color: var(--green2); background: color-mix(in srgb, var(--green) 10%, transparent); }
.px-out.no { color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); }
.px details { margin-top: 10px; font-size: .9375rem; }
.px:not(.live) .px-row { display: none; }
.px-score { margin-left: 6px; font-weight: 650; color: var(--green2); }
.dlrow { margin: 6px 0 10px; }
/* /clash/ sample questions */
.cq { list-style: none; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.cq > li { min-width: 0; }
.cq > li { padding: 18px 20px; }
.cq h3 { margin: 4px 0 10px; font-size: 1.125rem; }
.cq-opts { margin: 10px 0; padding-left: 1.6em; display: grid; gap: 4px; font-family: var(--mono); }
/* shared-result challenge banner and how-to steps (Daily Fix, Cell Clash, team game pages) */
.chal { margin: 8px 0 20px; border: 2px solid var(--green); background: color-mix(in srgb, var(--green) 9%, var(--card)); }
.chal h2 { margin: 4px 0 10px; font-size: clamp(1.25rem, 3.2vw, 1.6rem); }
.steps-list { list-style: none; padding: 0; display: grid; gap: 10px; margin: 8px 0 24px; }
.steps-list li { display: grid; gap: 4px; padding: 14px 16px; } .steps-list li span { color: var(--ink2); }

/* ---------- returning visitors (CTA_STATE in gen/build.js) ---------- */
html[data-cw]:not([data-cw-ok]) [data-cta="start"], html[data-cw]:not([data-cw-ok]) [data-back], html[data-cw-plus]:not([data-cw-ok]) [data-plus-alt] { visibility: hidden; }
html[data-cw-plus] [data-cta="plus"] { display: none !important; }
/* Plus members: no Free-vs-Plus wording, no plan pills (everything is theirs) */
[data-plus-show] { display: none; }
html[data-cw-plus] [data-plus-show] { display: revert; }
html[data-cw-plus] [data-plus-hide], html[data-cw-plus] .pill.free, html[data-cw-plus] .pill.plus { display: none !important; }

@media (max-width: 340px) { .top-in > .btn { padding-left: .8em; padding-right: .8em; font-size: .875rem; } }
/* Hub and template sample sheets are wider than the text column. From 1100px there is room beside it, so the sheet
   grows to its natural width (up to the window, less a gutter) and shifts left only as far as it must to stay on
   screen, so every column, including the ones the try-it formulas use, is visible without sideways scrolling.
   The doc column starts at (100vw - 62.5rem) / 2, which leaves 50vw + 31.25rem - 40px to the right with a 40px gutter. */
@media (min-width: 1100px) {
  .hub > .sheet, .tmpl > .sheet { width: max-content; min-width: 100%; max-width: calc(100vw - 80px); transform: translateX(min(0px, calc(50vw + 31.25rem - 40px - 100%))); }
  /* still too wide (a long bank description, say): long text cells wrap, so the table fits instead of hiding columns */
  .hub > .sheet .xl td:not(.n):not(.hd), .tmpl > .sheet .xl td:not(.n):not(.hd) { white-space: normal; }
}

/* ---------- Cellwise Fix entry point on guides and function pages ---------- */
.fixbox { margin: 16px 0; padding: 12px 16px; border-style: dashed; box-shadow: none; background: color-mix(in srgb, var(--blue) 5%, var(--card)); }
.fixbox p { margin: 0; color: var(--ink2); } .fixbox b { color: var(--ink); } .fixbox a { font-weight: 650; white-space: nowrap; }
/* five top-nav links (Fix first) fit a phone without hiding any */
@media (max-width: 640px) { .topnav { gap: 0; } .topnav a { padding: 0 7px; } .topnav a.nav-fix { gap: 4px; } }
@media (max-width: 360px) { .topnav { margin: 0 -4px; } .topnav a { padding: 0 4px; font-size: .8125rem; } .topnav .nav-ic { display: none; } } /* first and last links keep a gutter from the screen edge */

/* ---------- reference library: glossary, operators, number format codes, printable cheat sheet ---------- */
.refline { margin: 18px 0; padding: 10px 14px; border-left: 3px solid var(--green); background: var(--tint); border-radius: 0 var(--radius-s) var(--radius-s) 0; font-size: .9375rem; }
.refline a { white-space: nowrap; }
.refhub { margin: 8px 0 28px; }
.toc { margin: 14px 0 22px; padding: 14px 18px; }
.toc ol { margin: 6px 0 0; padding-left: 1.3em; columns: 2; column-gap: 28px; }
.toc li { margin: 0 0 6px; break-inside: avoid; }
@media (max-width: 600px) { .toc ol { columns: 1; } }
table.reft td:first-child, table.codes td:first-child { width: auto; white-space: nowrap; }
table.reft code, table.codes code { font: 600 .9rem/1.4 var(--mono); color: var(--green2); overflow-wrap: anywhere; white-space: pre-wrap; }
table.codes .shown-as { font-variant-numeric: tabular-nums; white-space: pre; }
table.codes td { font-size: .9375rem; }
@media (max-width: 520px) { table.reft td:first-child { white-space: normal; } table.reft td { font-size: .84rem; } }
/* On phones each code becomes a small card: the code, then value → result, then what it is for. */
@media (max-width: 600px) {
  table.codes thead { display: none; }
  table.codes tr { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 9px 2px; border-bottom: 1px solid var(--hair); }
  table.codes td { border: 0; padding: 0; width: auto; }
  table.codes td:first-child { grid-column: 1 / -1; white-space: normal; }
  table.codes td:nth-child(2):not(.desc)::after { content: " →"; color: var(--ink3); }
  table.codes td.desc, table.codes td:last-child { grid-column: 1 / -1; }
  table.codes td:last-child { color: var(--ink2); font-size: .875rem; }
}
.gloss .search { margin-bottom: 10px; }
.gl-jump { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 14px; }
.gl-jump a, .gl-jump span { display: inline-grid; place-items: center; min-width: 34px; min-height: 34px; padding: 0 6px; border-radius: 9px; font-weight: 700; font-size: .9375rem; text-decoration: none; }
.gl-jump a { background: var(--card); border: 1px solid var(--hair); color: var(--green2); }
.gl-jump a:hover, .gl-jump a:focus-visible { border-color: var(--green); }
.gl-jump span { color: var(--ink3); opacity: .55; }
.gl-sample { margin: 0 0 18px; }
.gl-sample summary { cursor: pointer; font-weight: 650; }
.gl-group { scroll-margin-top: 110px; }
.gl-group h2 { margin: 28px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--hair); }
.gl-list { margin: 0; }
.gl-item { padding: 12px 0 14px; border-bottom: 1px solid var(--hair); scroll-margin-top: 110px; }
.gl-item:last-child { border-bottom: 0; }
.gl-item:target { background: var(--tint); border-radius: var(--radius-s); padding-left: 10px; padding-right: 10px; }
.gl-item dt b { font-size: 1.0625rem; }
.gl-aka { display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: 999px; font-size: .8125rem; color: var(--ink2); background: var(--cellh); border: 1px solid var(--hair); }
.gl-item dd { margin: 4px 0 0; }
.gl-item dd p { margin: 4px 0; }
.gl-ex { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.gl-ex code { padding: 2px 8px; border-radius: 7px; background: var(--cell); border: 1px solid var(--cell-line); font-size: .9rem; overflow-wrap: anywhere; }
.gl-ex code a { color: var(--green2); text-decoration: none; font-weight: 650; }
.gl-ex .gl-arrow { color: var(--ink3); }
.gl-ex b { font-variant-numeric: tabular-nums; }
.gl-ex b.err { color: var(--bad); }
.gl-links { font-size: .9375rem; }
.gl-sep { color: var(--ink3); }
/* Without JavaScript the letter bar filters: a letter in the URL shows only that letter's terms. */
.gl-all { display: none; margin: 10px 0; }
.gl-groups:not(.js):has(> section:target) > section:not(:target) { display: none; }
.gl-groups:not(.js):has(> section:target) > .gl-all { display: block; }
/* the printable cheat sheet */
.cs { padding-bottom: 8px; }
.cs-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 20px; }
.cs-head h1 { margin: .2em 0 .3em; }
.cs-sub { color: var(--ink2); margin: 0 0 6px; max-width: 46em; }
.cs-print { display: grid; gap: 6px; justify-items: start; margin: 0 0 6px; }
.cs-grid { columns: 3 300px; column-gap: 16px; margin-top: 14px; }
.cs-b { break-inside: avoid; display: inline-block; width: 100%; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--hair); border-radius: var(--radius-s); background: var(--card); }
.cs-b h2 { margin: 0 0 6px; font-size: 1rem; color: var(--green2); }
.cs-b dl { margin: 0; }
.cs-b dl div { padding: 3px 0; border-bottom: 1px dotted var(--hair); }
.cs-b dl div:last-child { border-bottom: 0; }
.cs-b dt code { font: 600 .8125rem/1.35 var(--mono); overflow-wrap: anywhere; }
.cs-b dd { margin: 0; font-size: .8125rem; color: var(--ink2); }
.cs-b table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.cs-b td, .cs-b th { padding: 3px 4px; border-bottom: 1px dotted var(--hair); text-align: left; vertical-align: top; }
.cs-b th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink2); }
.cs-b td code { font: 600 .8125rem var(--mono); white-space: nowrap; }
.cs-b kbd { display: inline-block; padding: 0 4px; border: 1px solid var(--hair); border-bottom-width: 2px; border-radius: 4px; font: 600 .72rem/1.4 var(--mono); white-space: nowrap; }
.cs-b p { margin: 6px 0 0; font-size: .8125rem; }
.cs-ol { margin: 0; padding-left: 1.3em; font-size: .8125rem; }
.cs-ol li { margin: 1px 0; }
.cs-keys { display: block; }
.cs-keys h2 .muted { font-weight: 500; font-size: .8125rem; color: var(--ink2); }
.cs-keys ul { list-style: none; margin: 0; padding: 0; columns: 2 300px; column-gap: 18px; }
.cs-keys li { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 8px; align-items: center; padding: 3px 0; border-bottom: 1px dotted var(--hair); break-inside: avoid; font-size: .8125rem; }
.cs-keys .w, .cs-keys .m { white-space: nowrap; text-align: right; }
.cs-keys .m { min-width: 7.5em; }
.cs-grid2 { columns: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 0 16px; align-items: start; }
.cs-foot { margin-top: 4px; }
@media print {
  @page { margin: 9mm; }
  .refline, .toc, .gl-jump, .gl-sample, .cs-print, .cs-page .cta, .cs-foot a::after { display: none !important; }
  body.cs-page { font-size: 8pt; }
  .cs-page main { padding: 0; }
  .cs-page .kicker { margin: 0; font-size: 7pt; }
  .cs-head h1 { font-size: 14pt; margin: 0 0 2px; }
  .cs-sub { font-size: 8pt; margin: 0; }
  .cs-grid { columns: 3; column-gap: 8px; margin-top: 6px; }
  .cs-b { margin: 0 0 6px; padding: 5px 7px; border-color: #bbb; }
  .cs-b h2 { font-size: 9pt; margin-bottom: 2px; color: #000; }
  .cs-b dl div { padding: 1px 0; }
  .cs-b dt code, .cs-b td code { font-size: 7.4pt; }
  .cs-b dd, .cs-b td, .cs-b th, .cs-ol, .cs-b p { font-size: 7.4pt; }
  .cs-b td, .cs-b th { padding: 1px 3px; }
  .cs-b kbd { font-size: 6.6pt; padding: 0 2px; }
  .cs-b dl div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
  .cs-b dd { color: #333; }
  .cs-keys { break-before: page; }
  .cs-keys ul { columns: 2; column-gap: 12px; }
  .cs-grid2 { grid-template-columns: 1fr 1fr; gap: 0 8px; }
  .cs-keys li { padding: 1px 0; font-size: 7.2pt; }
  .cs-keys h2 .muted { font-size: 7pt; }
  .cs-foot { font-size: 7pt; margin: 2px 0 0; }
  .cs-page .crumbs, .cs-page .updated { display: none; }
  .gl-all, .gl-groups > section { display: block !important; }
  .gl-item { break-inside: avoid; padding: 5px 0; }
}
/* @section xtest */
/* ---------- /excel-test/: practice test (gen/excel-test/) ---------- */
.xt { margin: 8px 0 28px; border: 2px solid color-mix(in srgb, var(--green) 45%, var(--hair)); }
.xt > h2 { margin: 0 0 12px; font-size: 1.375rem; }
.xt fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.xt legend { font-weight: 650; margin-bottom: 8px; padding: 0; }
.xt-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.xt-lv { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--hair); border-radius: var(--radius-s); background: var(--bg); cursor: pointer; min-height: 44px; }
.xt-lv > span { display: grid; gap: 2px; min-width: 0; }
.xt-lv:has(input:checked) { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: var(--tint); }
.xt input[type="radio"], .xt input[type="checkbox"] { accent-color: var(--btn); width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.xt-opts-row { display: grid; gap: 4px; margin: 14px 0 4px; }
.xt-tog { display: flex; gap: 10px; align-items: flex-start; min-height: 36px; cursor: pointer; }
@media (pointer: coarse) { .xt-tog { min-height: 44px; align-items: center; } .xt-lvls p > a { display: inline-block; padding: 12px 0; margin: -12px 0; } }
.xt-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 650; }
.xt-prog { flex: 1 1 auto; }
.xt-time { font: 650 1rem var(--mono); color: var(--ink2); }
.xt-time.low { color: var(--bad); }
.xt-quit { font: inherit; font-weight: 600; font-size: .9375rem; color: var(--link); background: none; border: 0; padding: 8px 4px; min-height: 44px; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.xt-meter { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 9%, transparent); overflow: hidden; margin: 6px 0 14px; }
.xt-meter i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 3px; }
.xt-q:focus { outline: none; }
.xt-q .xq-q, .xq-q { font-size: 1.0625rem; font-weight: 600; margin: 4px 0 8px; }
.xq-k { margin: 0; font-size: .8125rem; font-weight: 650; color: var(--ink3); text-transform: uppercase; letter-spacing: .04em; }
.xt-choices { display: grid; gap: 8px; margin: 14px 0 0; }
.xt-opt { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border: 1px solid var(--hair); border-radius: var(--radius-s); background: var(--card); cursor: pointer; min-height: 48px; }
.xt-opt:hover { border-color: color-mix(in srgb, var(--green) 50%, var(--hair)); }
.xt-opt:has(input:checked) { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: var(--tint); }
.xt-opt:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.xt-opt input:focus-visible { outline: none; }
.xt-l { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font: 700 .8125rem var(--sans); color: var(--ink2); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.xt-t { min-width: 0; overflow-wrap: anywhere; }
.xt-opt.is-right { border-color: var(--green); background: color-mix(in srgb, var(--green) 12%, var(--card)); }
.xt-opt.is-wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 9%, var(--card)); }
.xt-opt.is-right .xt-l { background: var(--green); color: var(--on-green); }
.xt-opt.is-wrong .xt-l { background: var(--bad); color: #fff; }
.xt-fb:empty { display: none; }
.xt-fb { margin: 14px 0 0; padding: 12px 16px; border-radius: var(--radius-s); border: 1px solid var(--hair); background: var(--bg); }
.xt-fb.ok { border-color: var(--green); } .xt-fb.no { border-color: var(--bad); }
.xt-verdict { margin: 0 0 4px; font-weight: 700; }
.xt-fb.ok .xt-verdict { color: var(--green2); } .xt-fb.no .xt-verdict { color: var(--bad); }
.xt-ex p { margin: 6px 0; }
.xt-whyp { color: var(--ink2); }
.xt-score { font-size: clamp(2rem, 7vw, 2.75rem); margin: 0; }
.xt-score:focus { outline: none; }
.xt-sub { margin: 2px 0 8px; }
#xt-done h4 { margin: 18px 0 8px; font-size: 1rem; }
.xt-skills { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.xt-skills li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) auto; gap: 10px; align-items: center; font-size: .9375rem; }
.xt-sbar { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 9%, transparent); overflow: hidden; }
.xt-sbar i { display: block; height: 100%; background: var(--green); border-radius: 4px; }
.xt-study { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.xt-study li { display: grid; gap: 2px; } .xt-study a { justify-self: start; }
.xt-again { margin: 18px 0 8px; }
.xt-review { margin-top: 10px; }
.xt-review summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; }
.xt-review ol { padding-left: 1.3em; display: grid; gap: 14px; }
.xt-rq { margin: 0 0 6px; font-weight: 600; }
.xt-mark { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1em .6em; border-radius: 999px; margin-right: 4px; vertical-align: middle; color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.xt-review li.ok .xt-mark { color: var(--green2); background: color-mix(in srgb, var(--green) 14%, transparent); }
.xt-nojs { margin: 8px 0 24px; }
.xt-lvls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.xt-lvls .card p { margin: .4em 0 0; color: var(--ink2); font-size: .9375rem; }
.xt-lvls h3 { margin: 0; }
.xt-table th[scope="row"] { text-align: left; font-weight: 600; }
.xt-table td, .xt-table thead th { text-align: center; }
.xt-cover { margin-top: 16px; }
.xq-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.xq-list > li { min-width: 0; }
.xq-opts { margin: 10px 0; padding-left: 1.7em; display: grid; gap: 4px; }
.xq-d summary { cursor: pointer; font-weight: 650; color: var(--link); min-height: 44px; display: flex; align-items: center; }
.xq-ans p { margin: 6px 0; }
.xq-why { padding-left: 1.2em; color: var(--ink2); font-size: .9375rem; }
.xq-why li { margin: .3em 0; }
.xq-study { font-size: .9375rem; }
.qa-i { margin: 18px 0 0; }
.qa-i h3 { margin-bottom: .3em; }
.qa-i .ex { margin-top: 10px; }
.jobbox { background: color-mix(in srgb, var(--green) 5%, var(--card)); }
@media (max-width: 760px) {
  .xt-levels, .xt-lvls { grid-template-columns: minmax(0, 1fr); }
  .xt { padding: 16px; }
}

/* @end xtest */
.sk-gotchas kbd, .answer kbd, main > section p kbd, main > section li kbd, .lede kbd { display: inline-block; min-width: 1.5em; padding: 0 6px; border: 1px solid var(--hair); border-bottom-width: 2px; border-radius: 6px; background: var(--card); font: 600 .8em/1.5 var(--mono); text-align: center; white-space: nowrap; color: var(--ink); }
.sk-gotchas .combo, .answer .combo, main > section .combo, .lede .combo { white-space: nowrap; }
.sk-gotchas .combo i, .answer .combo i, main > section .combo i, .lede .combo i { font-style: normal; margin: 0 2px; color: var(--ink2); }
.hf button[disabled], .hf input[disabled], .hf select[disabled], .hf textarea[disabled], .btn[disabled] { opacity: .6; cursor: default; }
.fxl { font: italic 600 .9375rem Georgia, "Times New Roman", serif; color: var(--ink3); }

/* ---------- every screen size (tests/screens.js checks these at 320 to 2560px) ---------- */
/* Readable measure on wide screens: running text stops at about 85 characters a line, whatever the page layout. */
main p, main li:not(.card) { max-width: 46em; }
.vf-cert p { margin-inline: auto; }
.cq { max-width: 50rem; }
/* Big text (browser text size or 200% text zoom): the top links wrap instead of pushing the page sideways. */
@media (min-width: 641px) { .topnav { flex-wrap: wrap; } }
/* Touch screens: every control, and every link that stands on its own, is at least 44px tall. Breadcrumbs and links in
   headings get the height from padding cancelled by a negative margin, so the layout does not move. */
@media (pointer: coarse) {
  .crumbs a, h2 > a, h3 > a:not(.peek-a) { display: inline-block; padding: 13px 0; margin: -13px 0; }
  .crumbs li:last-child { padding: 13px 0; margin: -13px 0; }
  .toc li { margin: 0; } .toc li a { display: inline-block; padding: 11px 0; }
  .hub-toc { row-gap: 0; } .hub-toc a { display: inline-flex; align-items: center; min-height: 44px; }
  .gl-jump a, .gl-jump span { min-width: 44px; min-height: 44px; }
  .dir-units a, .dir-chips a { min-height: 44px; }
  .try-f, .try-chip { min-height: 44px; }
  .links a, .gl-links a, .kicker a { display: inline-block; padding: 12px 0; margin: -12px 0; }
  .links li { margin: 12px 0; }
  .pxs summary, .gl-sample summary { padding-block: 10px; }
  .cq summary { display: flex; align-items: center; min-height: 44px; }
  .hire-scope li > a, .hire-related li > a { display: inline-block; padding: 12px 0; margin: -12px 0; }
  .hire-related li { margin: 12px 0; }
  /* iOS zooms the page when a field under 16px gets focus: the try box and the editable sample sheets use 16px */
  .try-f, .px-f, .xl td.edit { font-size: max(1rem, 16px); }
}
