/* ======================================================================
   GetCalcMaster — UI v2 ("the graph-paper notebook"), 2026-11-29
   Loaded after tailwind.css, patches.v27.css, cm-content.v1.css and
   cm-design.v1.css. Plain CSS: no Tailwind rebuild is needed.

   Identity
   - Ink-blue (ultramarine) on clean paper; graph-paper grid in the hero.
   - Answers get a highlighter swipe, the way students mark the result.
   - Maths is set in a textbook serif ("GCM Math", from TeX Gyre Pagella);
     interface text in "GCM Sans" (from Source Sans 3, tabular figures).
   - Each subject has a colour, used for its unit-badge (kg/m², EMI, 4.0…).
   Fonts: subsets renamed per their licences (SIL OFL 1.1 / GUST FL);
   see /fonts/FONTS-LICENSE.txt.
   ====================================================================== */

@font-face { font-family: "GCM Sans"; src: url("/fonts/gcm-sans.var.woff") format("woff"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "GCM Math"; src: url("/fonts/gcm-math-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "GCM Math"; src: url("/fonts/gcm-math-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
/* Metric-matched fallback: keeps line breaks stable while GCM Sans loads (less layout shift). */
@font-face { font-family: "GCM Sans Fallback"; src: local("Arial"), local("Helvetica"), local("Liberation Sans"); size-adjust: 93.94%; ascent-override: 109%; descent-override: 42.6%; line-gap-override: 0%; }

:root {
  --g-font: "GCM Sans", "GCM Sans Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --g-font-math: "GCM Math", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --g-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --g-paper: #ffffff;
  --g-paper-2: #f5f7fb;
  --g-paper-3: #edf1f8;
  --g-grid: #e3e9f3;
  --g-grid-strong: #d3dcec;
  --g-ink: #172033;
  --g-ink-2: #34405a;
  --g-graphite: #5b667a;
  --g-line: #dde4ef;
  --g-line-strong: #c7d1e2;
  --g-brand: #2347d6;
  --g-brand-ink: #1a37ae;
  --g-brand-fill: #2347d6;
  --g-brand-soft: #e9eeff;
  --g-highlight: #ffe36e;
  --g-check: #0b7f57;
  --g-red: #c8283b;
  --g-shadow-1: 0 1px 2px rgba(23, 32, 51, .05);
  --g-shadow-2: 0 1px 2px rgba(23, 32, 51, .04), 0 10px 28px -14px rgba(23, 32, 51, .22);
  --g-shadow-pop: 0 18px 48px -18px rgba(23, 32, 51, .35), 0 2px 6px rgba(23, 32, 51, .06);

  /* Subject colours (badges, tabs, chart keys) */
  --c-math: #2347d6;     --c-math-soft: #e9eeff;
  --c-finance: #0b7f57;  --c-finance-soft: #e3f5ed;
  --c-health: #c92d5b;   --c-health-soft: #fbe8ee;
  --c-everyday: #a15c00; --c-everyday-soft: #fbf0dc;
  --c-science: #6b3fd0;  --c-science-soft: #efe9fc;
  --c-convert: #0b7285;  --c-convert-soft: #e0f3f6;

  /* Radii by role, not one radius for everything */
  --r-xs: 6px; --r-sm: 9px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px;
  --g-max: 1200px;

  /* Data-viz tones (light) */
  --tone-a: #2347d6; --tone-b: #f2a33a; --tone-c: #6b3fd0;
  --tone-under: #7aa7e6; --tone-ok: #2fae7a; --tone-ok2: #8fd3a8; --tone-warn: #f2b33d; --tone-high: #e0605b;
}
html.dark {
  --g-paper: #0c1220;
  --g-paper-2: #111a2c;
  --g-paper-3: #16213a;
  --g-grid: rgba(122, 146, 204, .11);
  --g-grid-strong: rgba(122, 146, 204, .2);
  --g-ink: #e9eef8;
  --g-ink-2: #c9d2e4;
  --g-graphite: #9aa6bf;
  --g-line: #223049;
  --g-line-strong: #30405f;
  --g-brand: #8fb0ff;
  --g-brand-ink: #b5caff;
  --g-brand-fill: #2f4fe0;
  --g-brand-soft: rgba(143, 176, 255, .13);
  --g-highlight: rgba(255, 216, 74, .17);
  --g-highlight-ink: #ffe36e;
  --g-check: #3ccf91;
  --g-red: #ff8fa0;
  --g-shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --g-shadow-2: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px -16px rgba(0, 0, 0, .8);
  --g-shadow-pop: 0 24px 60px -20px rgba(0, 0, 0, .85), 0 2px 8px rgba(0, 0, 0, .4);
  --c-math: #8fb0ff;     --c-math-soft: rgba(143, 176, 255, .14);
  --c-finance: #3ccf91;  --c-finance-soft: rgba(60, 207, 145, .13);
  --c-health: #ff8fa8;   --c-health-soft: rgba(255, 143, 168, .13);
  --c-everyday: #f6b44d; --c-everyday-soft: rgba(246, 180, 77, .13);
  --c-science: #b49cff;  --c-science-soft: rgba(180, 156, 255, .14);
  --c-convert: #5cc8db;  --c-convert-soft: rgba(92, 200, 219, .13);
  --tone-a: #8fb0ff; --tone-b: #f6b44d; --tone-c: #b49cff;
  --tone-under: #6f9be0; --tone-ok: #3ccf91; --tone-ok2: #2c8f66; --tone-warn: #e5a93a; --tone-high: #f07a74;
  /* Older layers read these */
  --cm-accent: #8fb0ff;
}
:root { --cm-accent: #2347d6; }

/* ----------------------------------------------------------------------
   Base typography
   ---------------------------------------------------------------------- */
html { font-family: var(--g-font); font-size-adjust: 0.515; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--g-font); color: var(--g-ink); background: var(--g-paper); font-feature-settings: "kern", "liga"; text-rendering: optimizeLegibility; }
html.dark body { background: var(--g-paper); color: var(--g-ink); }
:where(code, kbd, pre, samp, .font-mono, textarea.font-mono, input.font-mono) { font-size-adjust: none; }
:where(h1, h2, h3, h4) { letter-spacing: -0.012em; }
::selection { background: color-mix(in srgb, var(--g-brand) 22%, transparent); }
.gx-m, .cm-solve-math, .cm-solve-eq, .cm-guide-formula-expr, .cm-guide-formula-expr code {
  font-family: var(--g-font-math); font-variant-numeric: lining-nums; font-feature-settings: "lnum";
}
.gx-m i, .cm-guide-formula-expr i { font-style: italic; }
.gx-m sup, .gx-m sub { font-size: .72em; line-height: 0; }
.gx-sr, .gx-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Focus: one clear ring everywhere */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2.5px solid var(--g-brand); outline-offset: 2px; border-radius: var(--r-xs);
}

/* ----------------------------------------------------------------------
   Shared components (restyles the older cm-* classes site-wide)
   ---------------------------------------------------------------------- */
.cm-btn {
  background: var(--g-brand-fill) !important; background-image: none !important; color: #fff !important;
  border: 1px solid transparent; border-radius: var(--r-sm); font-weight: 650; letter-spacing: .005em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 2px rgba(23, 32, 51, .18);
  transition: background-color .15s ease, box-shadow .15s ease;
}
.cm-btn:hover { background: var(--g-brand-ink) !important; }
html.dark .cm-btn:hover { background: #3b5cf0 !important; }
.cm-btn:active { transform: translateY(1px); }
.cm-btn-lite {
  background: var(--g-paper) !important; color: var(--g-ink) !important; border: 1px solid var(--g-line-strong) !important;
  border-radius: var(--r-sm); font-weight: 600; box-shadow: var(--g-shadow-1);
}
.cm-btn-lite:hover { background: var(--g-paper-2) !important; border-color: color-mix(in srgb, var(--g-brand) 40%, var(--g-line-strong)) !important; }
html.dark .cm-btn-lite { background: var(--g-paper-2) !important; }
.cm-chip { border-radius: var(--r-xs); font-weight: 650; border-color: var(--g-line-strong); color: var(--g-ink-2); }
html.dark .cm-chip { background: var(--g-paper-3); border-color: var(--g-line-strong); color: var(--g-ink-2); }
html.dark .cm-chip:hover { background: color-mix(in srgb, var(--g-paper-3) 70%, var(--g-line-strong)); }
/* Selected state, shared by chips, segmented buttons and radio segments */
.cm-chip-active, .cm-seg-btn-active, .cm-chip[aria-pressed="true"] {
  background: var(--g-brand-soft) !important; color: var(--g-brand-ink) !important;
  border-color: color-mix(in srgb, var(--g-brand) 55%, transparent) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--g-brand) 55%, transparent) !important;
}
html.dark :is(.cm-chip-active, .cm-seg-btn-active, .cm-chip[aria-pressed="true"]) { color: var(--g-brand-ink) !important; }
.cm-card { border-radius: var(--r-lg); border-color: var(--g-line); box-shadow: var(--g-shadow-1); }
html.dark .cm-card { background: var(--g-paper-2); border-color: var(--g-line); box-shadow: var(--g-shadow-1); }
a.cm-card:hover { border-color: color-mix(in srgb, var(--g-brand) 45%, var(--g-line)); box-shadow: var(--g-shadow-2); transform: none; }
.cm-prose a, .cm-guide a { color: var(--g-brand); text-underline-offset: 3px; }
.ds-crumbs { font-size: .84rem; }
.ds-crumbs a:hover { color: var(--g-brand); }

/* Step-by-step solvers: textbook maths, highlighter answers */
.cm-solve-badge { color: var(--g-brand); background: var(--g-brand-soft); letter-spacing: .02em; text-transform: none; font-size: .78rem; font-weight: 700; border-radius: var(--r-xs); }
.cm-solve-h1 { font-weight: 750; letter-spacing: -.022em; }
.cm-solve-answer { border: 1px solid var(--g-line); border-left: 4px solid var(--g-check); border-radius: var(--r-md); background: var(--g-paper); }
.cm-solve-answer-k { letter-spacing: .02em; text-transform: none; font-size: .82rem; font-weight: 700; }
.cm-solve-answer-v { font-family: var(--g-font-math); font-size: 1.35rem; font-weight: 400; }
.cm-solve-answer-v { background: linear-gradient(transparent 58%, var(--g-highlight) 58%, var(--g-highlight) 92%, transparent 92%); display: inline; box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 .15em; }
.cm-solve-math { font-size: 1.06rem; }
.cm-solve-steps > li { border-color: var(--g-line); border-radius: var(--r-md); }
.cm-solve-steps > li::before { background: var(--g-brand-fill); font-weight: 700; }
.cm-solve-tile-ico, .cm-solve-ico { font-family: var(--g-font-math); }
.cm-solve-ico { flex: none; width: 2.35rem; min-width: 2.35rem; padding: 0; overflow: hidden; white-space: nowrap; font-weight: 500; font-size: .78rem; letter-spacing: -.02em; background: var(--c-math-soft); color: var(--c-math); }
.cm-solve-tile-ico { flex: none; width: 3rem; font-weight: 500; letter-spacing: -.02em; white-space: nowrap; background: var(--c-math-soft); color: var(--c-math); }
.cm-solve-aside-h { text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--g-graphite); }
.cm-guide-kicker { text-transform: none !important; letter-spacing: 0 !important; }
/* Sentence case everywhere: older components forced tracked-out capitals */
:is(.cm-solve-badge, .cm-solve-answer-k, .cm-solve-group-h, .cm-mat.cm-stat th, .ds-eyebrow, .ds-kpi-k, .ds-table th, .cm-graph-title, .cv-unit-badge, .cm-menu-section-title) { text-transform: none; letter-spacing: 0; }
.cm-solve-group-h, .ds-eyebrow { font-size: .9rem; font-weight: 700; }
.cm-solve-answer-k { font-size: .8rem; font-weight: 700; }
.cm-guide-formula-expr { font-size: 1.08rem; }
.cm-guide-formula-expr code { background: transparent; border: 0; padding: 0; font-size: inherit; color: var(--g-ink); }
.cm-guide-title { font-weight: 750; letter-spacing: -.025em; }
.cm-guide-toc a { font-weight: 600; border-radius: var(--r-xs); color: var(--g-ink-2); border-color: var(--g-line); }
.cm-guide-toc a:hover { color: var(--g-brand); border-color: color-mix(in srgb, var(--g-brand) 45%, var(--g-line)); }
.cm-guide-example { border-left-width: 3px; border-left-color: var(--g-brand); background: var(--g-paper-2); border-radius: 0 var(--r-md) var(--r-md) 0; }
.cm-guide-formula { border-color: var(--g-line); background: var(--g-paper-2); border-radius: var(--r-md); }
.cm-guide-faq details { border-color: var(--g-line); border-radius: var(--r-md); }
.cm-guide-faq details[open] { background: var(--g-paper-2); }
.cm-guide-mistakes { list-style: none; padding-left: 0 !important; }
.cm-guide-mistakes li { position: relative; padding-left: 1.75rem; }
.cm-guide-mistakes li::marker { content: none; }
.cm-guide-mistakes li::before { content: "!"; position: absolute; left: 0; top: .28em; width: 1.15rem; height: 1.15rem; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; line-height: 1; color: var(--c-everyday); background: var(--c-everyday-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-everyday) 30%, transparent); }
@media (min-width: 1100px) {
  .cm-guide > .cm-card { display: grid; grid-template-columns: minmax(0, 1fr) 13.5rem; column-gap: 3rem; align-items: start; }
  .cm-guide > .cm-card > .cm-guide-head { grid-column: 1 / -1; }
  .cm-guide > .cm-card > .cm-guide-toc { grid-column: 2; grid-row: 2; position: sticky; top: 5.25rem; display: flex; flex-direction: column; gap: .1rem; margin: .25rem 0 0; padding-left: 1rem; border-left: 1px solid var(--g-line); }
  .cm-guide > .cm-card > .cm-guide-toc::before { content: "On this page"; content: "On this page" / ""; font-size: .8rem; font-weight: 650; color: var(--g-ink); margin-bottom: .4rem; }
  .cm-guide > .cm-card > .cm-guide-toc a { border: 0; padding: .3rem 0; font-size: .875rem; font-weight: 500; color: var(--g-graphite); border-radius: 0; }
  .cm-guide > .cm-card > .cm-guide-toc a:hover { color: var(--g-brand); }
  .cm-guide > .cm-card > .cm-guide-body { grid-column: 1; grid-row: 2; max-width: 78ch; }
}
.cm-guide-answer b { color: var(--g-check); }
html.dark :is(.gx-answer-v mark, .gx-page-lines .gx-ans mark, .cm-solve-answer-v) { color: var(--g-highlight-ink); }

/* ----------------------------------------------------------------------
   Unit badges (the site's icon system: units and notation, not pictures)
   ---------------------------------------------------------------------- */
.gx-badge {
  --c: var(--c-math); --cs: var(--c-math-soft);
  /* Fixed width (not min-width): every name after a badge starts on the same line. */
  flex: none; display: inline-grid; place-items: center; width: 3.3rem; height: 2.75rem; padding: 0 .15rem; overflow: hidden;
  border-radius: var(--r-sm); background: var(--cs); color: var(--c);
  font-family: var(--g-font-math); font-size: .98rem; line-height: 1; white-space: nowrap; letter-spacing: -.02em;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 18%, transparent);
}
.gx-badge-lg { width: 4.6rem; height: 4rem; font-size: 1.35rem; border-radius: var(--r-md); }
[data-cat="finance"] { --c: var(--c-finance); --cs: var(--c-finance-soft); }
[data-cat="health"] { --c: var(--c-health); --cs: var(--c-health-soft); }
[data-cat="everyday"] { --c: var(--c-everyday); --cs: var(--c-everyday-soft); }
[data-cat="science"] { --c: var(--c-science); --cs: var(--c-science-soft); }
[data-cat="convert"] { --c: var(--c-convert); --cs: var(--c-convert-soft); }
[data-cat="math"] { --c: var(--c-math); --cs: var(--c-math-soft); }

/* Tool links (lists of calculators) */
.gx-tool-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.gx-tool { display: flex; align-items: center; gap: .85rem; padding: .7rem .8rem; border-radius: var(--r-md); color: var(--g-ink); text-decoration: none; border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease; }
.gx-tool:hover { background: var(--g-paper-2); border-color: var(--g-line); }
.gx-tool:hover .gx-tool-name { color: var(--g-brand); }
.gx-tool-text { display: grid; gap: .1rem; min-width: 0; }
.gx-tool-name { font-weight: 650; line-height: 1.25; }
.gx-tool-desc { font-size: .86rem; color: var(--g-graphite); line-height: 1.35; }

.gx-section { margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
.gx-section-h { font-size: clamp(1.35rem, 1.15rem + .7vw, 1.75rem); font-weight: 750; letter-spacing: -.02em; line-height: 1.2; color: var(--g-ink); }
.gx-section-lead { margin-top: .4rem; color: var(--g-graphite); max-width: 62ch; font-size: 1.02rem; line-height: 1.55; }
.gx-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.gx-link { color: var(--g-brand); font-weight: 650; text-decoration: none; }
.gx-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ----------------------------------------------------------------------
   Header
   ---------------------------------------------------------------------- */
.gx-topbar { background: color-mix(in srgb, var(--g-paper) 88%, transparent) !important; border-bottom: 1px solid var(--g-line) !important; backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.gx-topbar.cm-topbar-scrolled { box-shadow: 0 6px 20px -16px rgba(23, 32, 51, .45); }
.gx-topbar-inner { max-width: var(--g-max); margin: 0 auto; padding: 0 1rem; height: 64px; display: flex; align-items: center; gap: 1rem; }
@media (min-width: 1536px) { .gx-topbar-inner { max-width: 1440px; } }
.gx-left { display: flex; align-items: center; gap: .5rem; flex: none; }
.gx-brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--g-ink); text-decoration: none; font-weight: 750; font-size: 1.12rem; letter-spacing: -.02em; border-radius: var(--r-sm); }
.gx-logo { width: 32px; height: 32px; flex: none; }
.gx-logo .gx-logo-bg { fill: var(--g-brand-fill); }
.gx-wordmark { white-space: nowrap; }
.gx-nav { display: none; align-items: center; gap: .15rem; margin-left: .75rem; }
.gx-nav-link, .gx-nav summary.gx-nav-link {
  display: inline-flex; align-items: center; gap: .3rem; height: 40px; padding: 0 .7rem; border-radius: var(--r-sm);
  font-weight: 600; font-size: .95rem; color: var(--g-ink-2); text-decoration: none; white-space: nowrap; cursor: pointer; list-style: none;
}
.gx-nav summary::-webkit-details-marker { display: none; }
.gx-nav-link:hover, .gx-dd[open] > summary { background: var(--g-paper-2); color: var(--g-ink); }
.gx-nav-link.cm-is-active, .gx-nav-link[aria-current="page"] { color: var(--g-brand); }
.gx-nav-link.cm-is-active { background: transparent; box-shadow: inset 0 -2px 0 var(--g-brand); border-radius: 0; }
.gx-chev { width: 14px; height: 14px; opacity: .6; transition: transform .15s ease; }
.gx-dd[open] .gx-chev { transform: rotate(180deg); }
.gx-dd { position: relative; }
.gx-panel-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 270px; padding: .5rem;
  background: var(--g-paper); border: 1px solid var(--g-line); border-radius: var(--r-lg); box-shadow: var(--g-shadow-pop);
}
html.dark .gx-panel-menu, html.dark .gx-mega { background: var(--g-paper-2); }
.gx-panel-menu a { display: block; padding: .55rem .7rem; border-radius: var(--r-sm); color: var(--g-ink); text-decoration: none; font-weight: 600; font-size: .94rem; }
.gx-panel-menu a span { display: block; font-weight: 400; font-size: .82rem; color: var(--g-graphite); margin-top: .05rem; }
.gx-panel-menu a:hover { background: var(--g-paper-2); color: var(--g-brand); }
html.dark .gx-panel-menu a:hover { background: var(--g-paper-3); }
.gx-panel-menu hr { border: 0; border-top: 1px solid var(--g-line); margin: .35rem .3rem; }
.gx-panel-right { left: auto; right: 0; }
.gx-panel-wide { width: 540px; }
.gx-panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .25rem; }
.gx-panel-grid a { font-weight: 550; font-size: .9rem; padding: .42rem .7rem; }
.gx-mega {
  position: absolute; top: calc(100% + 8px); left: -.5rem; z-index: 60; width: min(980px, calc(100vw - 3rem));
  padding: 1.1rem 1.1rem .9rem; background: var(--g-paper); border: 1px solid var(--g-line); border-radius: var(--r-xl); box-shadow: var(--g-shadow-pop);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem 1.1rem;
}
.gx-mega-h { display: flex; align-items: center; gap: .45rem; margin: .2rem .5rem .35rem; }
.gx-mega-h::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.gx-mega-h a { padding: 0 !important; font-size: .82rem !important; font-weight: 700 !important; color: var(--g-graphite) !important; background: transparent !important; }
.gx-mega-h a:hover { color: var(--c) !important; text-decoration: underline; text-underline-offset: 3px; }
.gx-mega-col ul { list-style: none; margin: 0 0 .7rem; padding: 0; }
.gx-mega-col a { display: flex; align-items: center; gap: .55rem; padding: .36rem .5rem; border-radius: var(--r-sm); color: var(--g-ink); text-decoration: none; font-size: .92rem; font-weight: 550; }
.gx-mega-col a:hover { background: var(--g-paper-2); color: var(--g-brand); }
html.dark .gx-mega-col a:hover { background: var(--g-paper-3); }
.gx-mega-col .gx-badge { width: 2.85rem; height: 1.75rem; font-size: .78rem; border-radius: var(--r-xs); }
.gx-mega-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .75rem .5rem 0; margin-top: .2rem; border-top: 1px solid var(--g-line); font-size: .9rem; color: var(--g-graphite); }
.gx-dock { display: none; align-items: center; gap: .1rem; margin-left: .5rem; overflow-x: auto; scrollbar-width: none; }
.gx-dock::-webkit-scrollbar { display: none; }
.gx-right { margin-left: auto; display: flex; align-items: center; gap: .4rem; flex: none; }
.gx-search {
  display: inline-flex; align-items: center; gap: .55rem; height: 40px; padding: 0 .55rem 0 .75rem; min-width: 40px;
  border: 1px solid var(--g-line-strong); border-radius: var(--r-sm); background: var(--g-paper); color: var(--g-graphite);
  font-weight: 500; font-size: .92rem; cursor: pointer; box-shadow: var(--g-shadow-1);
}
html.dark .gx-search { background: var(--g-paper-2); }
.gx-search:hover { border-color: color-mix(in srgb, var(--g-brand) 50%, var(--g-line-strong)); color: var(--g-ink); }
.gx-search svg { width: 17px; height: 17px; flex: none; }
.gx-search kbd { font-family: var(--g-font); font-size: .74rem; font-weight: 600; color: var(--g-graphite); background: var(--g-paper-2); border: 1px solid var(--g-line); border-radius: 5px; padding: .1rem .35rem; }
html.dark .gx-search kbd { background: var(--g-paper-3); }
.gx-search .cm-cmdk-label { min-width: 8.5rem; text-align: left; }
.gx-iconbtn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid transparent;
  background: transparent; color: var(--g-ink-2); cursor: pointer; font-weight: 700; font-size: 1rem;
}
.gx-iconbtn:hover { background: var(--g-paper-2); color: var(--g-ink); }
.gx-iconbtn svg { width: 20px; height: 20px; }
.gx-theme .gx-moon { display: none; }
html.dark .gx-theme .gx-sun { display: none; }
html.dark .gx-theme .gx-moon { display: block; }
.gx-menubtn { border-color: var(--g-line-strong); }
#cm-net.gx-net { display: none !important; }
#cm-net.gx-net.bg-amber-100 { display: inline-flex !important; align-items: center; height: 28px; padding: 0 .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }

/* Breakpoints: the inline fallback in _Layout toggles .cm-desktop-nav / .cm-tablet-dock / .cm-menu-btn. */
@media (max-width: 767.98px) {
  .gx-topbar-inner { height: 58px; gap: .5rem; }
  .gx-search { padding: 0; justify-content: center; width: 40px; }
  .gx-search .cm-cmdk-label, .gx-search kbd { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .gx-help { display: none; }
}
@media (min-width: 768px) and (max-width: 1279.98px) {
  .gx-search .cm-cmdk-label { min-width: 0; }
  .gx-search kbd { display: none; }
}
@media (min-width: 1280px) {
  .gx-nav { display: flex; }
}
@media (min-width: 1280px) and (max-width: 1439.98px) {
  .gx-search .cm-cmdk-label { min-width: 6.5rem; }
  .gx-nav-link, .gx-nav summary.gx-nav-link { padding: 0 .55rem; }
}

/* Command palette */
#cm-cmdk > .absolute { background: rgba(12, 18, 32, .42) !important; backdrop-filter: blur(2px); }
#cm-cmdk .rounded-2xl { border-radius: var(--r-xl) !important; border-color: var(--g-line) !important; box-shadow: var(--g-shadow-pop) !important; background: var(--g-paper) !important; overflow: hidden; }
html.dark #cm-cmdk .rounded-2xl { background: var(--g-paper-2) !important; }
#cm-cmdk-input { font-size: 1.05rem !important; font-weight: 500 !important; padding: .8rem .9rem !important; border-radius: var(--r-md) !important; border-color: var(--g-line-strong) !important; background: var(--g-paper) !important; color: var(--g-ink) !important; }
html.dark #cm-cmdk-input { background: var(--g-paper-3) !important; }
#cm-cmdk-title { font-size: .8rem !important; letter-spacing: .01em; color: var(--g-graphite) !important; }
#cm-cmdk-results { max-height: min(60vh, 460px) !important; }
#cm-cmdk-results button .font-extrabold { font-weight: 650 !important; }

/* Mobile/tablet drawer */
.cm-menu-panel.gx-drawer { background: var(--g-paper) !important; border-color: var(--g-line) !important; }
html.dark .cm-menu-panel.gx-drawer { background: var(--g-paper-2) !important; }
.gx-drawer .cm-menu-top { border-bottom-color: var(--g-line) !important; }
.gx-drawer .cm-menu-close, .gx-drawer .cm-menu-action { background: var(--g-paper) !important; border-color: var(--g-line-strong) !important; border-radius: var(--r-sm) !important; font-weight: 650 !important; color: var(--g-ink); }
html.dark .gx-drawer .cm-menu-close, html.dark .gx-drawer .cm-menu-action { background: var(--g-paper-3) !important; }
.gx-drawer .cm-menu-item { border-radius: var(--r-md) !important; font-weight: 650 !important; background: var(--g-paper) !important; border-color: var(--g-line) !important; }
html.dark .gx-drawer .cm-menu-item { background: var(--g-paper-3) !important; }
.gx-drawer .cm-menu-item-primary { background: var(--g-brand-fill) !important; color: #fff !important; border-color: transparent !important; }
.gx-drawer .gx-brand { font-size: 1.05rem; }
.gx-drawer-section { padding: .25rem 0 .75rem; }
.gx-drawer-h { font-size: .8rem; font-weight: 700; color: var(--g-graphite); margin: .5rem .25rem .4rem; }
.gx-drawer-acc { border-radius: var(--r-md); }
.gx-drawer-acc > summary { list-style: none; display: flex; align-items: center; gap: .65rem; padding: .55rem .5rem; border-radius: var(--r-md); cursor: pointer; font-weight: 650; color: var(--g-ink); }
.gx-drawer-acc > summary::-webkit-details-marker { display: none; }
.gx-drawer-acc > summary .gx-badge { width: 3rem; height: 2rem; font-size: .82rem; }
.gx-drawer-acc > summary .gx-chev { margin-left: auto; }
.gx-drawer-acc[open] > summary { background: var(--g-paper-2); }
.gx-drawer-acc[open] > summary .gx-chev { transform: rotate(180deg); }
.gx-drawer-acc ul { list-style: none; margin: .25rem 0 .5rem; padding: 0 0 0 .5rem; }
.gx-drawer-acc li a, .gx-drawer-links a { display: flex; align-items: center; min-height: 40px; padding: .35rem .6rem; border-radius: var(--r-sm); color: var(--g-ink); text-decoration: none; font-size: .95rem; }
.gx-drawer-acc li a:hover, .gx-drawer-links a:hover { background: var(--g-paper-2); color: var(--g-brand); }
.gx-drawer-links { display: grid; grid-template-columns: 1fr 1fr; gap: .1rem .5rem; }

/* ----------------------------------------------------------------------
   Footer
   ---------------------------------------------------------------------- */
.gx-footer { margin-top: 4rem; border-top: 1px solid var(--g-line); background: var(--g-paper-2); color: var(--g-ink-2); }
html.dark .gx-footer { background: #0a0f1b; }
.gx-footer-inner { max-width: var(--g-max); margin: 0 auto; padding: 3rem 1rem 2rem; }
@media (min-width: 1536px) { .gx-footer-inner { max-width: 1440px; } }
.gx-footer-top { display: grid; gap: 2.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .gx-footer-top { grid-template-columns: minmax(0, 1.35fr) minmax(0, 3fr); gap: 3rem; } }
.gx-footer-brand p { margin-top: .75rem; max-width: 34ch; color: var(--g-graphite); line-height: 1.55; }
.gx-footer-brand .gx-motto { font-family: var(--g-font-math); font-style: italic; font-size: 1.08rem; color: var(--g-ink); }
.gx-footer-cols { display: grid; gap: 1.5rem 1.25rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .gx-footer-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gx-footer-cols h2 { font-size: .9rem; font-weight: 700; color: var(--g-ink); margin-bottom: .6rem; }
.gx-footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.gx-footer-cols a { display: inline-flex; align-items: center; min-height: 30px; color: var(--g-graphite); text-decoration: none; font-size: .93rem; }
.gx-footer-cols a:hover { color: var(--g-brand); text-decoration: underline; text-underline-offset: 3px; }
.gx-footer .ds-trust { margin-top: 2.5rem; border-top-color: var(--g-line); }
.gx-footer .ds-badge { background: var(--g-paper); }
html.dark .gx-footer .ds-badge { background: var(--g-paper-2); }
.gx-legal { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; justify-content: space-between; font-size: .82rem; color: var(--g-graphite); }

/* ----------------------------------------------------------------------
   Homepage
   ---------------------------------------------------------------------- */
.gx-home { margin-top: 0; }
/* The hero is full-bleed (100vw includes the scrollbar on Windows): clip at the root so the page never scrolls sideways. */
html:has(.gx-hero), body:has(.gx-hero) { overflow-x: clip; }
.gx-hero {
  position: relative; margin: 0 calc(50% - 50vw); padding: clamp(2.5rem, 1.5rem + 4vw, 5rem) 0 clamp(2.5rem, 2rem + 2vw, 4rem);
  background-color: var(--g-paper);
  background-image:
    linear-gradient(var(--g-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--g-grid) 1px, transparent 1px),
    linear-gradient(var(--g-grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--g-grid-strong) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  background-position: -1px -1px;
  border-bottom: 1px solid var(--g-line);
}
.gx-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 55%, var(--g-paper) 100%); }
.gx-hero-inner { position: relative; z-index: 1; max-width: var(--g-max); margin: 0 auto; padding: 0 1rem; display: grid; gap: clamp(2rem, 1rem + 3vw, 3.5rem); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 1024px) { .gx-hero-inner { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); } }
@media (min-width: 1536px) { .gx-hero-inner { max-width: 1440px; } }
.gx-hero h1 { font-size: clamp(2.35rem, 1.5rem + 3.4vw, 4rem); line-height: 1.02; font-weight: 750; letter-spacing: -.035em; color: var(--g-ink); max-width: 15ch; text-wrap: balance; }
.gx-hero-lead { margin-top: 1.1rem; font-size: clamp(1.05rem, 1rem + .3vw, 1.22rem); line-height: 1.55; color: var(--g-ink-2); max-width: 46ch; }
.gx-find { margin-top: 1.75rem; position: relative; max-width: 560px; }
.gx-find-box { display: flex; align-items: center; gap: .6rem; height: 58px; padding: 0 .5rem 0 1rem; background: var(--g-paper); border: 1.5px solid var(--g-line-strong); border-radius: var(--r-md); box-shadow: var(--g-shadow-2); }
html.dark .gx-find-box { background: var(--g-paper-2); }
.gx-find-box:focus-within { border-color: var(--g-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--g-brand) 18%, transparent), var(--g-shadow-2); }
.gx-find-box svg { width: 20px; height: 20px; color: var(--g-graphite); flex: none; }
.gx-find-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--g-ink); font-size: 1.08rem; font-family: var(--g-font); }
.gx-find-box input::placeholder { color: var(--g-graphite); opacity: .85; }
.gx-find-box button { height: 42px; padding: 0 1rem; }
.gx-find-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; list-style: none; margin: 0; padding: .35rem; max-height: 360px; overflow: auto; background: var(--g-paper); border: 1px solid var(--g-line); border-radius: var(--r-md); box-shadow: var(--g-shadow-pop); }
html.dark .gx-find-results { background: var(--g-paper-2); }
.gx-find-results[hidden] { display: none; }
.gx-find-results a { display: flex; align-items: center; gap: .7rem; padding: .45rem .55rem; border-radius: var(--r-sm); color: var(--g-ink); text-decoration: none; }
.gx-find-results a .gx-badge { width: 3rem; height: 2rem; font-size: .82rem; }
.gx-find-results a small { display: block; color: var(--g-graphite); font-size: .82rem; }
.gx-find-results a[aria-selected="true"], .gx-find-results a:hover { background: var(--g-brand-soft); }
.gx-find-empty { padding: .7rem .75rem; color: var(--g-graphite); font-size: .92rem; }
.gx-try { margin-top: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; font-size: .92rem; color: var(--g-graphite); }
.gx-try a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 .65rem; border-radius: 999px; border: 1px solid var(--g-line-strong); background: var(--g-paper); color: var(--g-ink); text-decoration: none; font-weight: 550; }
html.dark .gx-try a { background: var(--g-paper-2); }
.gx-try a:hover { border-color: var(--g-brand); color: var(--g-brand); }
.gx-proof { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .93rem; color: var(--g-ink-2); list-style: none; padding: 0; }
.gx-proof li { display: inline-flex; align-items: center; gap: .45rem; }
.gx-proof svg { width: 16px; height: 16px; color: var(--g-check); flex: none; }

/* The notebook page: a real worked solution, typeset like a textbook */
.gx-page {
  position: relative; background: var(--g-paper); border: 1px solid var(--g-line); border-radius: var(--r-lg);
  box-shadow: var(--g-shadow-pop); padding: 1.5rem 1.5rem 1.35rem 3.4rem; max-width: 520px; justify-self: center; width: 100%;
  background-image: linear-gradient(transparent 31px, var(--g-grid) 31px); background-size: 100% 32px; background-position: 0 14px;
}
html.dark .gx-page { background-color: var(--g-paper-2); }
.gx-page::before { content: ""; position: absolute; top: 0; bottom: 0; left: 2.4rem; width: 1.5px; background: color-mix(in srgb, var(--g-red) 45%, transparent); }
.gx-page-tab { position: absolute; top: -12px; right: 1.25rem; padding: .2rem .65rem; border-radius: var(--r-xs); background: var(--g-ink); color: var(--g-paper); font-size: .78rem; font-weight: 650; }
.gx-page-title { font-size: .95rem; font-weight: 650; color: var(--g-graphite); margin-bottom: .4rem; }
.gx-page-lines { list-style: none; margin: 0; padding: 0; counter-reset: line; }
.gx-page-lines li { position: relative; counter-increment: line; min-height: 32px; display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .6rem; padding: .35rem 0 0; font-family: var(--g-font-math); font-size: clamp(1.05rem, .98rem + .3vw, 1.2rem); color: var(--g-ink); line-height: 1.35; }
.gx-page-lines li::before { content: counter(line); position: absolute; left: -2.45rem; width: 1.5rem; text-align: right; top: .5rem; font-family: var(--g-font); font-size: .75rem; color: var(--g-graphite); font-variant-numeric: tabular-nums; }
.gx-page-lines small { font-family: var(--g-font); font-size: .8rem; color: var(--g-graphite); }
.gx-page-lines .gx-ans mark { background: linear-gradient(transparent 52%, var(--g-highlight) 52%, var(--g-highlight) 94%, transparent 94%); color: inherit; padding: 0 .2em; }
.gx-page-check { margin-top: .9rem; display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--g-check); font-weight: 650; }
.gx-page-check svg { width: 18px; height: 18px; }
.gx-page-foot { margin-top: .8rem; padding-top: .7rem; border-top: 1px dashed var(--g-line-strong); display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; font-size: .86rem; color: var(--g-graphite); }

/* One orchestrated moment: the working writes itself, then the answer is highlighted. */
@media (prefers-reduced-motion: no-preference) {
  .gx-page-lines li { animation: gx-write .5s cubic-bezier(.2, .7, .2, 1) both; }
  .gx-page-lines li:nth-child(1) { animation-delay: .15s; }
  .gx-page-lines li:nth-child(2) { animation-delay: .45s; }
  .gx-page-lines li:nth-child(3) { animation-delay: .75s; }
  .gx-page-lines li:nth-child(4) { animation-delay: 1.05s; }
  .gx-page-lines li:nth-child(5) { animation-delay: 1.35s; }
  .gx-page-lines .gx-ans mark { background-size: 0% 100%; background-repeat: no-repeat; background-image: linear-gradient(transparent 52%, var(--g-highlight) 52%, var(--g-highlight) 94%, transparent 94%); background-color: transparent; animation: gx-mark .6s 1.75s ease-out forwards; }
  .gx-page-check { animation: gx-write .4s 2.2s both; }
}
@keyframes gx-write { from { opacity: 0; transform: translateY(4px); clip-path: inset(0 100% 0 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }
@keyframes gx-mark { to { background-size: 100% 100%; } }

/* Popular + categories */
.gx-popular { display: grid; gap: .65rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); list-style: none; margin: 0; padding: 0; }
.gx-popular a { display: flex; align-items: center; gap: .85rem; padding: .85rem .9rem; border: 1px solid var(--g-line); border-radius: var(--r-md); background: var(--g-paper); color: var(--g-ink); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
html.dark .gx-popular a { background: var(--g-paper-2); }
.gx-popular a:hover { border-color: color-mix(in srgb, var(--c, var(--g-brand)) 55%, var(--g-line)); box-shadow: var(--g-shadow-2); }
.gx-popular a:hover .gx-tool-name { color: var(--g-brand); }
.gx-cats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.gx-cat { position: relative; padding: 1.25rem 1.25rem 1rem; border: 1px solid var(--g-line); border-radius: var(--r-lg); background: var(--g-paper); }
html.dark .gx-cat { background: var(--g-paper-2); }
.gx-cat::before { content: ""; position: absolute; left: 1.25rem; top: -1px; width: 56px; height: 4px; border-radius: 0 0 4px 4px; background: var(--c); }
.gx-cat h3 { font-size: 1.12rem; font-weight: 750; letter-spacing: -.01em; color: var(--g-ink); }
.gx-cat h3 a { color: inherit; text-decoration: none; }
.gx-cat h3 a:hover { color: var(--c); }
.gx-cat p { margin-top: .25rem; font-size: .9rem; color: var(--g-graphite); }
.gx-cat ul { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .05rem; }
.gx-cat li a { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 36px; padding: .25rem .45rem; margin: 0 -.45rem; border-radius: var(--r-xs); color: var(--g-ink); text-decoration: none; font-size: .96rem; }
.gx-cat li a:hover { background: var(--cs); color: var(--g-ink); }
.gx-cat li a .gx-cat-unit { font-family: var(--g-font-math); font-size: .88rem; color: var(--c); }
.gx-cat-more { margin-top: .6rem; display: inline-flex; font-size: .9rem; font-weight: 650; color: var(--c); text-decoration: none; }
.gx-cat-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Why GetCalcMaster */
.gx-why { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); background: var(--g-line); border: 1px solid var(--g-line); border-radius: var(--r-lg); overflow: hidden; }
.gx-why > div { background: var(--g-paper); padding: 1.35rem 1.35rem 1.25rem; }
html.dark .gx-why > div { background: var(--g-paper-2); }
.gx-why h3 { font-size: 1.05rem; font-weight: 700; color: var(--g-ink); }
.gx-why p { margin-top: .4rem; font-size: .94rem; line-height: 1.55; color: var(--g-graphite); }
.gx-why .gx-why-sym { display: block; font-family: var(--g-font-math); font-size: 1.6rem; line-height: 1; color: var(--g-brand); margin-bottom: .7rem; }
/* Fixed column counts so a 4- or 3-card row never leaves an empty grey cell at tablet widths. */
.gx-why--4, .gx-why--3 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .gx-why--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .gx-why--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 760px) { .gx-why--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Notebook band */
.gx-band { display: grid; gap: 1.5rem; align-items: center; grid-template-columns: minmax(0, 1fr); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); border-radius: var(--r-xl); background: var(--g-ink); color: #eef2fb; }
html.dark .gx-band { background: #131d33; border: 1px solid var(--g-line); }
@media (min-width: 900px) { .gx-band { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.gx-band h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.9rem); font-weight: 750; letter-spacing: -.02em; color: #fff; }
.gx-band p { margin-top: .5rem; color: #c3ccdf; max-width: 52ch; line-height: 1.55; }
.gx-band .cm-btn-lite { background: transparent !important; color: #fff !important; border-color: rgba(255, 255, 255, .35) !important; box-shadow: none; }
.gx-band .cm-btn-lite:hover { background: rgba(255, 255, 255, .08) !important; }
.gx-band-actions { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.gx-cells { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-family: var(--g-font-mono); font-size: .88rem; }
.gx-cells li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .75rem; border-radius: var(--r-sm); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); color: #e6ebf7; }
.gx-cells li span:last-child { color: #9fb6ff; }
.gx-cells li.gx-cell-note { font-family: var(--g-font); color: #c3ccdf; background: transparent; border-style: dashed; }

/* Guides list on the homepage */
.gx-guides { display: grid; gap: 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); border-top: 1px solid var(--g-line); }
.gx-guides a { display: grid; gap: .15rem; padding: .95rem .25rem; border-bottom: 1px solid var(--g-line); color: var(--g-ink); text-decoration: none; }
@media (min-width: 720px) { .gx-guides a { padding-right: 1.25rem; } }
.gx-guides a b { font-weight: 650; }
.gx-guides a span { font-size: .9rem; color: var(--g-graphite); }
.gx-guides a:hover b { color: var(--g-brand); text-decoration: underline; text-underline-offset: 3px; }

/* ----------------------------------------------------------------------
   Directory (/calc)
   ---------------------------------------------------------------------- */
.gx-dir-head { margin-top: 1.25rem; }
.gx-dir-head h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); font-weight: 750; letter-spacing: -.03em; line-height: 1.08; }
.gx-dir-head p { margin-top: .6rem; font-size: 1.08rem; color: var(--g-ink-2); max-width: 60ch; }
.gx-dir-tools { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }
.gx-dir-tools .gx-find { margin-top: 0; flex: 1 1 380px; max-width: 520px; }
.gx-dir-tools .gx-find-box { height: 52px; }
.gx-jump { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.gx-jump a { display: inline-flex; align-items: center; gap: .4rem; min-height: 34px; padding: 0 .7rem; border-radius: 999px; border: 1px solid var(--g-line-strong); color: var(--g-ink); text-decoration: none; font-size: .9rem; font-weight: 600; background: var(--g-paper); }
html.dark .gx-jump a { background: var(--g-paper-2); }
.gx-jump a::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.gx-jump a:hover { border-color: var(--c); }
.gx-dir-sec { margin-top: 2.5rem; scroll-margin-top: 90px; }
.gx-dir-sec-h { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; padding-bottom: .6rem; margin-bottom: .6rem; border-bottom: 2px solid var(--c); }
.gx-dir-sec-h h2 { font-size: 1.45rem; font-weight: 750; letter-spacing: -.02em; }
.gx-dir-sec-h p { color: var(--g-graphite); font-size: .95rem; }
.gx-dir-sec-h .gx-count { margin-left: auto; font-size: .85rem; color: var(--g-graphite); font-variant-numeric: tabular-nums; }
[data-gx-filter-empty] { margin-top: 1.5rem; padding: 1rem; border: 1px dashed var(--g-line-strong); border-radius: var(--r-md); color: var(--g-graphite); }
[data-gx-filter-empty][hidden], .gx-dir-sec[hidden], .gx-tool-list li[hidden] { display: none; }

/* ----------------------------------------------------------------------
   Calculator pages
   ---------------------------------------------------------------------- */
.gx-calc { max-width: 1120px; margin: 0 auto; padding-top: .25rem; }
.gx-calc-head { margin-top: 1.25rem; display: flex; align-items: flex-start; gap: 1.1rem; }
.gx-calc-h1 { font-size: clamp(1.9rem, 1.45rem + 1.8vw, 2.7rem); font-weight: 750; letter-spacing: -.03em; line-height: 1.06; color: var(--g-ink); }
.gx-calc-lead { margin-top: .5rem; font-size: 1.06rem; line-height: 1.55; color: var(--g-ink-2); max-width: 62ch; }
@media (max-width: 639.98px) { .gx-calc-head .gx-badge-lg { width: 3.8rem; height: 3.2rem; font-size: 1.1rem; } }
.gx-calc-grid { margin-top: 1.5rem; display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1024px) { .gx-calc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 1.4rem; } }
.gx-panel { background: var(--g-paper); border: 1px solid var(--g-line); border-radius: var(--r-lg); padding: clamp(1rem, .8rem + .8vw, 1.5rem); box-shadow: var(--g-shadow-1); min-width: 0; }
html.dark .gx-panel { background: var(--g-paper-2); }
.gx-panel-h { font-size: .95rem; font-weight: 700; color: var(--g-graphite); margin-bottom: .9rem; }
.gx-result { border-top: 3px solid var(--c, var(--g-brand)); }
@media (min-width: 1024px) { .gx-result { position: sticky; top: calc(var(--cm-topbar-h, 64px) + 16px); } }
.gx-calc-out { min-height: 320px; }

/* Form controls */
.gx-fields { display: grid; gap: 1rem 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .gx-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gx-field-wide, .gx-fields > .gx-check, .gx-fields > .gx-field-wide { grid-column: 1 / -1; }
.gx-field { display: grid; gap: .35rem; align-content: start; min-width: 0; }
.gx-field[hidden], .gx-seg[hidden], .gx-check[hidden], .gx-label[hidden] { display: none !important; }
.gx-label { font-size: .9rem; font-weight: 650; color: var(--g-ink); }
.gx-opt { font-weight: 400; color: var(--g-graphite); font-size: .82rem; margin-left: .25rem; }
.gx-hint { font-size: .82rem; color: var(--g-graphite); line-height: 1.4; }
.gx-input { display: flex; align-items: stretch; height: 46px; border: 1px solid var(--g-line-strong); border-radius: var(--r-sm); background: var(--g-paper); overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
html.dark .gx-input, html.dark .gx-select, html.dark .gx-row-name { background: var(--g-paper-3); }
.gx-input:focus-within { border-color: var(--g-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g-brand) 20%, transparent); }
.gx-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 .75rem; font-size: 1.05rem; font-family: var(--g-font); color: var(--g-ink); font-variant-numeric: tabular-nums; }
.gx-input input[type="date"], .gx-input input[type="month"] { font-size: 1rem; }
.gx-input input:focus-visible { outline: none; }
.gx-affix { display: inline-flex; align-items: center; padding: 0 .7rem; background: var(--g-paper-2); color: var(--g-graphite); font-size: .92rem; white-space: nowrap; }
html.dark .gx-affix { background: var(--g-paper-2); }
.gx-input .gx-affix:first-child { border-right: 1px solid var(--g-line); }
.gx-input .gx-affix:last-child { border-left: 1px solid var(--g-line); }
.gx-affix-select { border: 0; border-left: 1px solid var(--g-line); background: var(--g-paper-2); color: var(--g-ink); padding: 0 .55rem; font-size: .92rem; font-family: var(--g-font); }
.gx-select { height: 46px; width: 100%; border: 1px solid var(--g-line-strong); border-radius: var(--r-sm); background: var(--g-paper); color: var(--g-ink); padding: 0 .7rem; font-size: 1rem; font-family: var(--g-font); }
.gx-select:focus { border-color: var(--g-brand); }
.gx-seg { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: .35rem; align-content: start; }
.gx-seg legend { padding: 0; margin-bottom: .35rem; float: left; width: 100%; }
.gx-seg label { position: relative; display: inline-flex; }
.gx-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.gx-seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 .85rem; border: 1px solid var(--g-line-strong); border-radius: var(--r-sm); background: var(--g-paper); color: var(--g-ink-2); font-weight: 600; font-size: .93rem; cursor: pointer; }
html.dark .gx-seg span { background: var(--g-paper-3); }
.gx-seg input:checked + span { background: var(--g-brand-soft); color: var(--g-brand-ink); border-color: color-mix(in srgb, var(--g-brand) 55%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--g-brand) 55%, transparent); }
.gx-seg input:focus-visible + span { outline: 2.5px solid var(--g-brand); outline-offset: 2px; }
.gx-check { display: flex; align-items: center; gap: .6rem; font-size: .95rem; color: var(--g-ink); cursor: pointer; min-height: 36px; }
.gx-check input { width: 20px; height: 20px; accent-color: var(--g-brand-fill); }
.gx-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.gx-quad { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 720px) { .gx-quad { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gx-quick { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .15rem; }
.gx-quick-btn { min-height: 32px; padding: 0 .6rem; border-radius: 999px; border: 1px solid var(--g-line-strong); background: var(--g-paper); color: var(--g-ink-2); font-size: .85rem; font-weight: 650; cursor: pointer; }
html.dark .gx-quick-btn { background: var(--g-paper-3); }
.gx-quick-btn:hover { border-color: var(--g-brand); color: var(--g-brand); }
.gx-rows { display: grid; gap: .45rem; }
.gx-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 104px 36px; gap: .4rem; align-items: center; }
.gx-row-name { height: 44px; border: 1px solid var(--g-line-strong); border-radius: var(--r-sm); padding: 0 .65rem; background: var(--g-paper); color: var(--g-ink); font-size: .98rem; font-family: var(--g-font); min-width: 0; }
.gx-row .gx-select { height: 44px; padding: 0 .4rem; }
.gx-input-sm { height: 44px; }
.gx-row-del { width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; color: var(--g-graphite); font-size: 1.3rem; cursor: pointer; }
.gx-row-del:hover { background: var(--c-health-soft); color: var(--g-red); }
.gx-row-add { margin-top: .55rem; justify-self: start; }
@media (max-width: 479.98px) { .gx-row { grid-template-columns: minmax(0, 1fr) 76px 92px 32px; } .gx-row-name { font-size: .9rem; } }
.gx-form-actions { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.gx-form-actions .cm-btn { min-width: 8.5rem; height: 46px; font-size: 1rem; }
.gx-form-actions .cm-btn-lite { height: 46px; }
.gx-form-error { margin-top: .85rem; padding: .6rem .8rem; border-radius: var(--r-sm); background: var(--c-health-soft); color: var(--g-red); font-weight: 600; font-size: .93rem; }
.gx-form-error[hidden] { display: none; }

/* Result panel */
.gx-answer { padding-bottom: 1rem; border-bottom: 1px solid var(--g-line); }
.gx-answer-k { font-size: .95rem; font-weight: 650; color: var(--g-graphite); }
.gx-answer-v { margin-top: .25rem; font-size: clamp(2rem, 1.6rem + 1.6vw, 2.9rem); font-weight: 750; letter-spacing: -.025em; line-height: 1.12; color: var(--g-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.gx-answer-v mark { color: inherit; background: linear-gradient(transparent 56%, var(--g-highlight) 56%, var(--g-highlight) 92%, transparent 92%); padding: 0 .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.gx-unit { font-size: .45em; font-weight: 600; color: var(--g-graphite); letter-spacing: 0; }
.gx-answer-sub { margin-top: .35rem; color: var(--g-ink-2); font-size: .98rem; }
.gx-stats { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 0 1.25rem; }
.gx-stats > div { padding: .75rem 0; border-bottom: 1px solid var(--g-line); }
.gx-stats dt { font-size: .86rem; color: var(--g-graphite); }
.gx-stats dd { margin: .15rem 0 0; font-size: 1.12rem; font-weight: 650; color: var(--g-ink); font-variant-numeric: tabular-nums; }
.gx-split { margin-top: 1.1rem; }
.gx-split-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--g-paper-3); }
.gx-split-seg { display: block; height: 100%; }
/* Chart tones (scoped so other [data-tone] elements, e.g. the site banner, are untouched) */
:is(.gx-split-seg, .gx-key, .gx-scale-band, .gx-col-stack > span)[data-tone="a"] { background: var(--tone-a); }
:is(.gx-split-seg, .gx-key, .gx-scale-band, .gx-col-stack > span)[data-tone="b"] { background: var(--tone-b); }
:is(.gx-split-seg, .gx-key, .gx-scale-band, .gx-col-stack > span)[data-tone="c"] { background: var(--tone-c); }
:is(.gx-split-seg, .gx-key, .gx-scale-band, .gx-col-stack > span)[data-tone="under"] { background: var(--tone-under); }
:is(.gx-split-seg, .gx-key, .gx-scale-band, .gx-col-stack > span)[data-tone="ok"] { background: var(--tone-ok); }
:is(.gx-split-seg, .gx-key, .gx-scale-band, .gx-col-stack > span)[data-tone="ok2"] { background: var(--tone-ok2); }
:is(.gx-split-seg, .gx-key, .gx-scale-band, .gx-col-stack > span)[data-tone="warn"] { background: var(--tone-warn); }
:is(.gx-split-seg, .gx-key, .gx-scale-band, .gx-col-stack > span)[data-tone="high"] { background: var(--tone-high); }
.gx-legend { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .9rem; color: var(--g-ink-2); }
.gx-legend b { font-weight: 650; color: var(--g-ink); }
.gx-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .4rem; vertical-align: 0; }
.gx-dim { color: var(--g-graphite); font-size: .86em; }
.gx-scale { margin: 1.1rem 0 .4rem; }
.gx-scale-track { position: relative; height: 14px; border-radius: 999px; background: var(--g-paper-3); overflow: visible; }
.gx-scale-band { position: absolute; top: 0; bottom: 0; }
.gx-scale-band:first-child { border-radius: 999px 0 0 999px; }
.gx-scale-band:nth-last-child(2) { border-radius: 0 999px 999px 0; }
.gx-scale-marker { position: absolute; top: -6px; width: 4px; height: 26px; margin-left: -2px; border-radius: 3px; background: var(--g-ink); box-shadow: 0 0 0 2px var(--g-paper); }
.gx-scale-ticks { position: relative; height: 1.2rem; margin-top: .3rem; font-size: .78rem; color: var(--g-graphite); font-variant-numeric: tabular-nums; }
.gx-scale-tick { position: absolute; transform: translateX(-50%); }
.gx-cols { margin-top: 1.1rem; display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-bottom: 1.3rem; position: relative; }
.gx-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; position: relative; }
.gx-col-stack { display: flex; flex-direction: column-reverse; height: 100%; justify-content: flex-start; }
.gx-col-stack span { display: block; width: 100%; }
.gx-col-stack span:last-child { border-radius: 3px 3px 0 0; }
.gx-col-label { position: absolute; bottom: -1.25rem; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--g-graphite); font-variant-numeric: tabular-nums; }
.gx-cols .gx-col:nth-child(odd):not(:last-child) .gx-col-label { visibility: hidden; }
@media (min-width: 640px) { .gx-cols .gx-col:nth-child(odd):not(:last-child) .gx-col-label { visibility: visible; } .gx-cols { gap: 5px; } }
.gx-targets { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .35rem; }
.gx-targets li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; padding: .6rem .75rem; border-radius: var(--r-sm); background: var(--g-paper-2); color: var(--g-ink-2); }
html.dark .gx-targets li { background: var(--g-paper-3); }
.gx-targets li b { color: var(--g-ink); font-variant-numeric: tabular-nums; }
.gx-targets li.is-main { background: var(--g-brand-soft); color: var(--g-ink); }
.gx-targets li .gx-dim { flex-basis: 100%; }
.gx-targets li[data-low] b { color: var(--g-graphite); text-decoration: line-through; text-decoration-thickness: 1px; }

.gx-work, .gx-more { margin-top: 1.1rem; border: 1px solid var(--g-line); border-radius: var(--r-md); background: var(--g-paper); }
html.dark .gx-work, html.dark .gx-more { background: var(--g-paper); }
.gx-work > summary, .gx-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; font-weight: 650; color: var(--g-ink); }
.gx-work > summary::-webkit-details-marker, .gx-more > summary::-webkit-details-marker { display: none; }
.gx-work > summary::after, .gx-more > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--g-graphite); border-bottom: 2px solid var(--g-graphite); transform: rotate(45deg); transition: transform .15s ease; margin-right: .2rem; }
.gx-work[open] > summary::after, .gx-more[open] > summary::after { transform: rotate(-135deg); }
.gx-steps { margin: 0; padding: .2rem 1rem 1rem 2.6rem; display: grid; gap: .6rem; counter-reset: s; list-style: none; }
.gx-steps li { position: relative; counter-increment: s; line-height: 1.6; color: var(--g-ink-2); overflow-wrap: anywhere; }
.gx-steps li::before { content: counter(s); position: absolute; left: -1.85rem; top: .15rem; width: 1.35rem; height: 1.35rem; border-radius: 999px; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--g-brand); background: var(--g-brand-soft); }
.gx-steps .gx-m { color: var(--g-ink); font-size: 1.08em; }
.gx-steps b { color: var(--g-ink); }
.gx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gx-more .gx-table-wrap { padding: 0 1rem 1rem; }
.gx-result > .gx-calc-out > .gx-table-wrap { margin-top: 1rem; }
.gx-table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.gx-table th, .gx-table td { padding: .5rem .55rem; border-bottom: 1px solid var(--g-line); text-align: left; white-space: nowrap; }
.gx-table thead th { font-size: .8rem; color: var(--g-graphite); font-weight: 650; }
.gx-table tbody th { font-weight: 600; color: var(--g-ink); }
.gx-table .num { text-align: right; }
.gx-table tr.is-input th, .gx-table tr.is-input td { background: var(--g-brand-soft); }
.gx-note { margin-top: .9rem; font-size: .88rem; line-height: 1.5; color: var(--g-graphite); }
.gx-disclaimer { margin-top: 1rem; padding: .75rem 1rem; border-radius: var(--r-md); background: var(--g-paper-2); color: var(--g-ink-2); font-size: .9rem; line-height: 1.5; border: 1px solid var(--g-line); }
.gx-related { margin-top: 2.25rem; }
.gx-related .gx-section-h { font-size: 1.2rem; margin-bottom: .6rem; }

/* Featured sections (admin-editable at /admin/site-content) */
.gx-home .ds-featured { margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
.ds-featured .ds-h2 { font-size: clamp(1.35rem, 1.15rem + .7vw, 1.75rem); font-weight: 750; letter-spacing: -.02em; line-height: 1.2; color: var(--g-ink); }
.ds-featured .ds-lead { margin-top: .4rem; color: var(--g-graphite); max-width: 62ch; font-size: 1.02rem; line-height: 1.55; }
.ds-featured-grid { margin-top: 1.1rem; }
.ds-featured-grid { gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.ds-feature { padding: 1rem 1.1rem 1.1rem; gap: .3rem; border: 1px solid var(--g-line); }
.ds-feature-tag { text-transform: none; letter-spacing: 0; font-size: .78rem; font-weight: 650; padding: .12rem .5rem; border-radius: var(--r-xs); color: var(--c-math); background: var(--c-math-soft); }
.ds-feature-title { font-weight: 700; letter-spacing: -.01em; color: var(--g-ink); }
a.ds-feature:hover .ds-feature-title { color: var(--g-brand); }
.ds-feature-desc { color: var(--g-graphite); }

/* ----------------------------------------------------------------------
   Calculator apps (general, scientific, engineering, programmer, complex)
   Flat keys, one accent for equals, maths type on the function keys.
   ---------------------------------------------------------------------- */
.cm-calc-grid {
  --cm-key-radius: 12px;
  --cm-key-shadow: 0 1px 0 rgba(23, 32, 51, .07), 0 1px 2px rgba(23, 32, 51, .05);
  --cm-key-shadow-pressed: inset 0 1px 2px rgba(23, 32, 51, .14);
}
html.dark .cm-calc-grid { --cm-key-shadow: 0 1px 0 rgba(0, 0, 0, .5); --cm-key-shadow-pressed: inset 0 1px 3px rgba(0, 0, 0, .6); }
.cm-calc-grid h1 { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); font-weight: 750; letter-spacing: -.025em; color: var(--g-ink); }
.cm-calc-grid h1 + p { flex-basis: 100%; max-width: 64ch; color: var(--g-graphite); line-height: 1.5; }
/* Tool page headers (title + action buttons): let the actions wrap under the title on narrow screens */
.cm-main .cm-card > .flex.justify-between:has(> div > h1) { flex-wrap: wrap; }
.cm-main .cm-card > .flex.justify-between > div:has(> h1) { flex: 1 1 18rem; min-width: 0; }
.cm-main .cm-card > .flex.justify-between > div:has(> h1) h1 { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); font-weight: 750; letter-spacing: -.025em; }
/* Keep CE / AC beside the heading instead of wrapping under it */
.cm-calc-grid .min-w-0:has(+ [aria-label="Clear controls"]) { flex: 1 1 18rem; }
:is(.cm-key, .cm-palette-btn, .cm-hexkey) { border-color: var(--g-line); background: var(--g-paper); color: var(--g-ink); font-weight: 600; }
:is(.cm-key, .cm-palette-btn, .cm-hexkey):hover { background: var(--g-paper-2); border-color: var(--g-line-strong); }
html.dark :is(.cm-key, .cm-palette-btn, .cm-hexkey) { background: var(--g-paper-2); border-color: var(--g-line); color: var(--g-ink); }
html.dark :is(.cm-key, .cm-palette-btn, .cm-hexkey):hover { background: var(--g-paper-3); }
.cm-key { font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.cm-key:is([data-cm-key="+"], [data-cm-key="-"], [data-cm-key="*"], [data-cm-key="/"], [data-cm-key="^"]) {
  background: var(--g-brand-soft); color: var(--g-brand-ink); border-color: color-mix(in srgb, var(--g-brand) 22%, var(--g-line)); font-size: 1.22rem; font-weight: 500;
}
html.dark .cm-key:is([data-cm-key="+"], [data-cm-key="-"], [data-cm-key="*"], [data-cm-key="/"], [data-cm-key="^"]) { background: var(--g-brand-soft); color: var(--g-brand-ink); }
:is(.cm-key-strong, .cm-key[data-cm-key="="]),
html.dark :is(.cm-key-strong, .cm-key[data-cm-key="="]) { background: var(--g-brand-fill); border-color: var(--g-brand-fill); color: #fff; }
:is(.cm-key-strong, .cm-key[data-cm-key="="]):hover { background: var(--g-brand-ink); border-color: var(--g-brand-ink); }
html.dark :is(.cm-key-strong, .cm-key[data-cm-key="="]):hover { background: #3b5cf0; border-color: #3b5cf0; }
.cm-palette-btn { font-weight: 600; letter-spacing: 0; background: var(--g-paper-2); }
.cm-palette-btn[data-cm-insert] { font-family: var(--g-font-math); font-weight: 500; font-size: 1.02rem; }
html.dark .cm-palette-btn { background: var(--g-paper-3); }
.cm-display { background: var(--g-paper-2); border-color: var(--g-line); box-shadow: inset 0 1px 2px rgba(23, 32, 51, .05); }
html.dark .cm-display { background: #0a101c; border-color: var(--g-line); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5); }
.cm-display #cm-calc-input { font-size: clamp(1.1rem, 1rem + .45vw, 1.3rem); font-weight: 500; background: var(--g-paper); border-color: var(--g-line); color: var(--g-ink); }
html.dark .cm-display #cm-calc-input { background: var(--g-paper-2); }
#cm-calc-result { font-weight: 650; color: var(--g-ink); }
.cm-toolbar { border-color: var(--g-line); background: var(--g-paper); }
html.dark .cm-toolbar { background: var(--g-paper-2); border-color: var(--g-line); }
.cm-toolbar .cm-chip { font-weight: 600; font-size: .8rem; border-radius: var(--r-xs); }
/* The "|" spacers between toggle groups become quiet dividers */
.cm-toolbar [role="toolbar"] > span[aria-hidden="true"] { font-size: 0; color: transparent; overflow: hidden; width: 1px; align-self: stretch; margin: .3rem .15rem; background: var(--g-line-strong); }
.cm-rail-panel, .cm-history-item, .cm-explain-body { border-color: var(--g-line); }
html.dark :is(.cm-rail-panel, .cm-history-item) { background: var(--g-paper-2); }
.cm-rail-title { font-weight: 700; letter-spacing: -.01em; }

/* ----------------------------------------------------------------------
   Practice: one-problem-at-a-time sessions (/practice, /practice/{topic})
   ---------------------------------------------------------------------- */
.gx-ps-head h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem); font-weight: 760; letter-spacing: -.03em; line-height: 1.08; color: var(--g-ink); }
.gx-ps-head p { margin-top: .55rem; max-width: 66ch; color: var(--g-graphite); font-size: 1.04rem; line-height: 1.6; }
.gx-ps-head .gx-ps-levels { font-size: .9rem; margin-top: .35rem; }
.gx-ps-head .gx-ps-levels b { color: var(--g-ink-2); font-weight: 650; }
.gx-ps-hero { padding: .5rem 0 0; }
.gx-ps-tabs { display: flex; gap: .25rem; margin: 1.25rem 0 0; border-bottom: 1px solid var(--g-line); }
.gx-ps-tabs [role="tab"] { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: .65rem .95rem; font: inherit; font-weight: 650; font-size: .95rem; color: var(--g-graphite); cursor: pointer; border-radius: var(--r-xs) var(--r-xs) 0 0; }
.gx-ps-tabs [role="tab"]:hover { color: var(--g-ink); background: var(--g-paper-2); }
.gx-ps-tabs [role="tab"][aria-selected="true"] { color: var(--g-ink); border-bottom-color: var(--g-brand); }
[data-ps-panel] { margin-top: 1rem; }
.gx-ps { padding: clamp(1rem, .7rem + 1.2vw, 1.5rem); }
.gx-ps-loading { min-height: 24rem; display: grid; place-items: center; color: var(--g-graphite); }
.gx-ps-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .85rem 1.5rem; }
.gx-ps-topic { display: grid; gap: .3rem; min-width: min(100%, 15rem); }
.gx-ps-topic select { height: 2.6rem; }
.gx-ps-level { display: grid; gap: .3rem; }
.gx-ps-seg { display: inline-flex; border: 1px solid var(--g-line-strong); border-radius: var(--r-sm); padding: 2px; background: var(--g-paper); }
.gx-ps-seg button { appearance: none; border: 0; background: none; font: inherit; font-size: .9rem; font-weight: 600; color: var(--g-ink-2); padding: .45rem .85rem; border-radius: calc(var(--r-sm) - 2px); cursor: pointer; min-height: 36px; }
.gx-ps-seg button:hover { background: var(--g-paper-2); }
.gx-ps-seg button[aria-checked="true"] { background: var(--g-brand-soft); color: var(--g-brand-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--g-brand) 55%, transparent); }
.gx-ps-auto { margin-left: auto; font-size: .9rem; color: var(--g-ink-2); }
.gx-ps-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: 1rem 0; }
.gx-ps-stats > div { border: 1px solid var(--g-line); border-radius: var(--r-md); padding: .6rem .8rem; background: var(--g-paper); }
.gx-ps-stats dt { font-size: .78rem; font-weight: 600; color: var(--g-graphite); }
.gx-ps-stats dd { margin: .15rem 0 0; font-size: 1.35rem; font-weight: 750; letter-spacing: -.02em; color: var(--g-ink); font-variant-numeric: tabular-nums; }
.gx-ps-card {
  position: relative; border: 1px solid var(--g-line); border-radius: var(--r-lg); padding: clamp(1rem, .8rem + 1vw, 1.5rem);
  background-color: var(--g-paper);
  background-image: linear-gradient(var(--g-grid) 1px, transparent 1px), linear-gradient(90deg, var(--g-grid) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px;
}
.gx-ps-meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: .85rem; }
.gx-ps-num { font-weight: 700; color: var(--g-ink); }
.gx-ps-tag { padding: .12rem .5rem; border-radius: 999px; background: var(--c-math-soft); color: var(--c-math); font-weight: 650; }
.gx-ps-time { margin-left: auto; color: var(--g-graphite); font-variant-numeric: tabular-nums; min-width: 3.2rem; text-align: right; }
.gx-ps-q { margin: .9rem 0 1.1rem; font-family: var(--g-font-math); font-size: clamp(1.35rem, 1.05rem + 1.3vw, 2rem); line-height: 1.4; color: var(--g-ink); overflow-wrap: anywhere; }
.gx-ps-q.gx-ps-q-text { font-family: var(--g-font); font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); font-weight: 500; line-height: 1.5; letter-spacing: -.005em; }
.gx-ps-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.gx-ps-input { flex: 1 1 16rem; min-width: 0; height: 3rem !important; font-size: 1.1rem !important; background: var(--g-paper) !important; }
.gx-ps-form .cm-btn { height: 3rem; padding-inline: 1.4rem; }
.gx-ps-fb { min-height: 1.6em; margin-top: .6rem; font-weight: 650; color: var(--g-ink-2); }
.gx-ps-fb.gx-ok { color: var(--g-check); }
.gx-ps-fb.gx-ok::before { content: "✓ "; }
.gx-ps-fb.gx-no { color: var(--c-everyday); }
.gx-ps-tip { margin: .25rem 0 0; padding: .65rem .85rem; border-radius: var(--r-md); background: color-mix(in srgb, var(--g-highlight) 32%, var(--g-paper)); color: var(--g-ink); font-size: .95rem; line-height: 1.5; }
html.dark .gx-ps-tip { background: rgba(255, 227, 110, .12); }
.gx-ps-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; align-items: center; }
.gx-ps-actions .gx-ps-next { margin-left: auto; }
.gx-ps-sol { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--g-line-strong); }
.gx-ps-sol > .cm-btn-lite { margin-top: .75rem; display: inline-flex; }
.gx-ps-foot { margin-top: 1rem; display: grid; gap: .5rem; }
.gx-ps-hist summary { cursor: pointer; font-weight: 650; color: var(--g-ink-2); font-size: .95rem; padding: .3rem 0; }
.gx-ps-hist ol { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .3rem; }
.gx-ps-hist li { display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; font-size: .92rem; padding: .4rem .6rem; border-radius: var(--r-sm); background: var(--g-paper-2); }
.gx-ps-h-r { font-weight: 700; font-size: .8rem; min-width: 7.5rem; }
.gx-ps-h-ok .gx-ps-h-r { color: var(--g-check); }
.gx-ps-h-shown .gx-ps-h-r { color: var(--c-everyday); }
.gx-ps-h-skipped .gx-ps-h-r, .gx-ps-h-missed .gx-ps-h-r { color: var(--g-graphite); }
.gx-ps-h-q { font-family: var(--g-font-math); color: var(--g-ink); }
.gx-ps-h-a { margin-left: auto; color: var(--g-graphite); }
.gx-ps-note { font-size: .85rem; color: var(--g-graphite); line-height: 1.6; }
.gx-ps-note kbd { font: 600 .78rem var(--g-font); padding: .05rem .35rem; border: 1px solid var(--g-line-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--g-paper); color: var(--g-ink-2); }
.gx-linkbtn { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: var(--g-brand); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.gx-ps-help { margin-top: 1.5rem; }
.gx-ps-quick { display: grid; gap: .85rem; }
.gx-ps-quick-head h2 { font-size: clamp(1.35rem, 1.15rem + .7vw, 1.75rem); font-weight: 750; letter-spacing: -.02em; color: var(--g-ink); }
.gx-ps-quick-head p { margin-top: .3rem; color: var(--g-graphite); }
.gx-ps-group-h { margin: 1.4rem 0 .6rem; font-size: 1rem; font-weight: 700; color: var(--g-ink-2); }
.gx-ps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: .75rem; }
.gx-ps-topic-card { display: grid; gap: .3rem; align-content: start; padding: 1rem 1.1rem !important; text-decoration: none; border: 1px solid var(--g-line); transition: border-color .15s, box-shadow .15s; }
.gx-ps-topic-card:hover { border-color: color-mix(in srgb, var(--g-brand) 45%, var(--g-line)); box-shadow: var(--g-shadow-2); }
.gx-ps-topic-name { font-weight: 700; font-size: 1.05rem; color: var(--g-ink); }
.gx-ps-topic-card:hover .gx-ps-topic-name { color: var(--g-brand); }
.gx-ps-topic-desc { font-size: .92rem; color: var(--g-graphite); line-height: 1.5; }
.gx-ps-topic-progress { margin-top: .25rem; justify-self: start; font-size: .8rem; font-weight: 650; color: var(--g-brand-ink); background: var(--g-brand-soft); padding: .1rem .5rem; border-radius: 999px; }
@media (max-width: 639.98px) {
  /* Compact one-row scoreboard so the problem stays near the top on phones. */
  .gx-ps-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem; margin: .75rem 0; }
  .gx-ps-stats > div { padding: .4rem .45rem; }
  .gx-ps-stats dt { font-size: .66rem; line-height: 1.2; }
  .gx-ps-stats dd { font-size: 1.05rem; }
  .gx-ps-auto { margin-left: 0; }
  .gx-ps-actions .gx-ps-next { margin-left: 0; flex: 1 1 100%; justify-content: center; }
  .gx-ps-h-a { margin-left: 0; }
}

/* ----------------------------------------------------------------------
   /p/ guides and conversion pages (693 programmatic pages)
   ---------------------------------------------------------------------- */
.gx-p > .cm-card { border-radius: var(--r-lg); border: 1px solid var(--g-line); box-shadow: var(--g-shadow-1); }
.gx-p-head { display: grid; gap: .55rem; border-color: var(--g-line) !important; }
.gx-p-h1 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.45rem); font-weight: 760; letter-spacing: -.03em; line-height: 1.12; color: var(--g-ink); }
.gx-p-lead { color: var(--g-graphite); font-size: 1.05rem; line-height: 1.6; max-width: 66ch; }
.gx-p-meta { font-size: .85rem; color: var(--g-graphite); }
.gx-p .cm-prose h2 { margin-top: 2rem; font-size: 1.3rem; font-weight: 740; letter-spacing: -.015em; color: var(--g-ink); }
.gx-p .cm-prose > .rounded-2xl.border.bg-white { background: var(--g-paper-2); border-color: var(--g-line); box-shadow: none; border-radius: var(--r-lg); padding: 1rem 1.1rem; }
html.dark .gx-p .cm-prose > .rounded-2xl.border.bg-white { background: var(--g-paper-2); }
.gx-p .cm-prose > .rounded-2xl.border.bg-white > p { color: var(--g-ink-2); font-size: .98rem; margin: 0; }
.gx-p .cm-prose .border-amber-200 { border-color: color-mix(in srgb, var(--c-everyday) 30%, transparent) !important; background: var(--c-everyday-soft) !important; color: var(--g-ink) !important; font-weight: 500 !important; border-radius: var(--r-md) !important; }
.gx-p .cm-prose .border-amber-200 b { color: var(--c-everyday); }
.gx-p .cm-prose pre { border-radius: var(--r-md); border-color: var(--g-line); background: var(--g-paper-2); }
.gx-p .cm-prose details[data-faq] { border: 1px solid var(--g-line); border-radius: var(--r-md); padding: .75rem .9rem; background: var(--g-paper); }
.gx-p .cm-prose details[data-faq][open] { background: var(--g-paper-2); }
.gx-p .cm-prose details[data-faq] summary { font-weight: 650; color: var(--g-ink); }
.gx-p .cm-prose table { font-variant-numeric: tabular-nums; }
.gx-pconv {
  margin: 0 0 1.6rem; padding: clamp(1rem, .8rem + .8vw, 1.35rem); border: 1px solid var(--g-line); border-radius: var(--r-lg);
  background-color: var(--g-paper);
  background-image: linear-gradient(var(--g-grid) 1px, transparent 1px), linear-gradient(90deg, var(--g-grid) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px;
}
.gx-pconv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: .75rem; }
.gx-pconv-field { display: grid; gap: .35rem; margin: 0; }
.gx-pconv-label { font-size: .88rem; font-weight: 650; color: var(--g-ink-2); }
.gx-pconv-field .gx-input { width: 100%; height: 3.15rem; padding: 0 .9rem; font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; border: 1px solid var(--g-line-strong); border-radius: var(--r-md); background: var(--g-paper); color: var(--g-ink); }
.gx-pconv-field .gx-input:focus { outline: 2px solid var(--g-brand); outline-offset: 1px; border-color: var(--g-brand); }
.gx-pconv-field .gx-input[aria-invalid="true"] { border-color: var(--g-red); }
.gx-pconv-swap { width: 2.8rem; height: 2.8rem; margin-bottom: .18rem; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--g-line-strong); background: var(--g-paper); color: var(--g-brand); font-size: 1.15rem; cursor: pointer; transition: transform .2s; }
.gx-pconv-swap:hover { background: var(--g-brand-soft); }
.gx-pconv.is-swapped .gx-pconv-swap { transform: rotate(180deg); }
.gx-pconv-result { margin: 1rem 0 0; font-size: 1.2rem; font-weight: 600; color: var(--g-ink); font-variant-numeric: tabular-nums; }
.gx-pconv-result mark { background: linear-gradient(104deg, transparent .9%, var(--g-highlight) 2.4%, var(--g-highlight) 97%, transparent 99%); color: inherit; padding: 0 .15em; border-radius: 3px; }
html.dark .gx-pconv-result mark { background: rgba(255, 216, 74, .17); color: var(--g-highlight-ink, #ffe36e); }
.gx-pconv-sub { margin: .3rem 0 0; font-size: .92rem; color: var(--g-graphite); }
.gx-pconv-note { margin: .5rem 0 0; font-size: .85rem; color: var(--g-graphite); line-height: 1.5; }
.gx-pconv-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin: .75rem 0 .5rem; }
.gx-pconv-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; border: 1px solid var(--g-line); border-radius: var(--r-md); overflow: hidden; }
.gx-pconv-table caption { caption-side: top; text-align: left; font-weight: 700; color: var(--g-ink); padding: 0 0 .4rem; }
.gx-pconv-table th { background: var(--g-paper-2); font-size: .85rem; font-weight: 700; color: var(--g-ink-2); }
.gx-pconv-table th, .gx-pconv-table td { padding: .45rem .75rem; border-bottom: 1px solid var(--g-line); text-align: right; }
.gx-pconv-table th:first-child, .gx-pconv-table td:first-child { text-align: left; }
.gx-pconv-table tr:last-child td { border-bottom: 0; }
@media (max-width: 559.98px) {
  .gx-pconv-row { grid-template-columns: minmax(0, 1fr); }
  .gx-pconv-swap { justify-self: center; transform: rotate(90deg); margin: 0; }
  .gx-pconv.is-swapped .gx-pconv-swap { transform: rotate(270deg); }
}

/* ----------------------------------------------------------------------
   Older hub pages: lighter, calmer headings
   ---------------------------------------------------------------------- */
.cm-main h1 { font-weight: 750; letter-spacing: -.025em; }

/* ----------------------------------------------------------------------
   Motion + print
   ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .gx-chev, .gx-work > summary::after, .gx-more > summary::after, .gx-input, .gx-tool, .gx-popular a { transition: none !important; }
}
@media print {
  .gx-topbar, .gx-footer, .gx-form-actions, .gx-related, .gx-find, .gx-try { display: none !important; }
  .gx-calc-grid { grid-template-columns: 1fr 1fr; }
  .gx-panel, .gx-result { box-shadow: none !important; position: static !important; }
  .gx-work, .gx-more { border: 0; }
  .gx-more:not([open]) > :not(summary) { display: block; }
  body { background: #fff !important; }
}

/* ======================================================================
   Admin growth tools: marketing command center, SEO control, site audit,
   revenue planner (.ga-*). Admin-only pages, same tokens as the public UI.
   ====================================================================== */
.ga { margin-top: 1rem; display: grid; gap: 1rem; }
.ga-card { background: var(--g-paper); border: 1px solid var(--g-line); border-radius: var(--r-lg); padding: 1.15rem 1.25rem; box-shadow: var(--g-shadow-1); min-width: 0; }
.ga-head { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: flex-end; justify-content: space-between; }
.ga-head h1 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; color: var(--g-ink); margin: 0; }
.ga-lead { margin-top: .3rem; color: var(--g-graphite); font-size: .92rem; max-width: 70ch; }
.ga-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.ga h2 { font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; color: var(--g-ink); margin: 0 0 .2rem; }
.ga h3 { font-size: .92rem; font-weight: 750; color: var(--g-ink); } /* no margin reset: mt-* utilities space sub-sections */
.ga details > summary { cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--g-brand-ink); list-style: none; display: inline-flex; align-items: center; gap: .35rem; }
.ga details > summary::-webkit-details-marker { display: none; }
.ga details > summary::before { content: ""; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; }
.ga details[open] > summary::before { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .ga details > summary::before { transition: none; } }
.ga-sub { color: var(--g-graphite); font-size: .84rem; margin: 0 0 .8rem; }
.ga-jump { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .84rem; font-weight: 650; }
.ga-jump a { color: var(--g-brand-ink); text-decoration: none; border-bottom: 1px solid transparent; }
.ga-jump a:hover { border-bottom-color: currentColor; }
.ga-msg { border-radius: var(--r-md); padding: .7rem .9rem; font-size: .88rem; font-weight: 600; border: 1px solid; }
.ga-msg.ok { background: #e7f6ee; border-color: #b6e2ca; color: #0a5c3f; }
.ga-msg.err { background: #fdeef0; border-color: #f4c1c8; color: #8d1c2c; }
.ga-msg ul { margin: .3rem 0 0 1.1rem; list-style: disc; font-weight: 500; }
html.dark .ga-msg.ok { background: rgba(60, 207, 145, .12); border-color: rgba(60, 207, 145, .35); color: #9ff0cb; }
html.dark .ga-msg.err { background: rgba(255, 143, 160, .1); border-color: rgba(255, 143, 160, .35); color: #ffc2cb; }

/* progress bars */
.ga-bar { height: 8px; border-radius: 99px; background: var(--g-paper-3); overflow: hidden; }
.ga-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--g-brand-fill); transition: width .25s ease; }
.ga-bar.good > i { background: var(--g-check); }
.ga-bar.warn > i { background: #d98b06; }

/* KPI tiles */
.ga-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.ga-stat { border: 1px solid var(--g-line); border-radius: var(--r-md); padding: .75rem .85rem; background: var(--g-paper); display: grid; gap: .3rem; align-content: start; }
.ga-stat dt { font-size: .78rem; font-weight: 650; color: var(--g-graphite); }
.ga-stat dd { margin: 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; color: var(--g-ink); font-variant-numeric: tabular-nums; }
.ga-stat small { font-size: .74rem; color: var(--g-graphite); font-weight: 500; }
.ga-delta { font-size: .74rem; font-weight: 700; }
.ga-delta.up { color: var(--g-check); } .ga-delta.down { color: var(--g-red); }

/* phases + tasks */
.ga-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; }
.ga-phase { border: 1px solid var(--g-line); border-radius: var(--r-md); padding: .7rem .8rem; display: grid; gap: .35rem; text-decoration: none; color: inherit; background: var(--g-paper); }
.ga-phase:hover { border-color: var(--g-brand); }
.ga-phase b { font-size: .88rem; color: var(--g-ink); }
.ga-phase span { font-size: .75rem; color: var(--g-graphite); }
.ga-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.ga-task { display: grid; grid-template-columns: auto 1fr auto; gap: .2rem .7rem; align-items: start; padding: .6rem .7rem; border: 1px solid var(--g-line); border-radius: var(--r-md); background: var(--g-paper); }
.ga-task input[type=checkbox] { width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--g-check); cursor: pointer; }
.ga-task label { font-weight: 650; font-size: .9rem; color: var(--g-ink); cursor: pointer; }
.ga-task p { grid-column: 2; margin: 0; font-size: .82rem; color: var(--g-graphite); line-height: 1.5; }
.ga-task .ga-tag { grid-column: 3; grid-row: 1; }
.ga-task.is-done { background: var(--g-paper-2); }
.ga-task.is-done label { color: var(--g-graphite); text-decoration: line-through; text-decoration-color: var(--g-line-strong); }
.ga-task a { font-size: .8rem; font-weight: 650; color: var(--g-brand-ink); }
.ga-tag { display: inline-block; font-size: .72rem; font-weight: 650; color: var(--g-ink-2); background: var(--g-paper-3); border-radius: 99px; padding: .12rem .55rem; white-space: nowrap; }
.ga-phase-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; margin: 1.1rem 0 .5rem; }
.ga-phase-h:first-child { margin-top: 0; }
.ga-phase-h .ga-bar { width: 160px; }
.ga-status { font-size: .78rem; color: var(--g-graphite); min-height: 1.2em; }

/* forms */
.ga-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .65rem .8rem; align-items: end; }
.ga-field { display: grid; gap: .25rem; min-width: 0; }
.ga-field > span { font-size: .78rem; font-weight: 650; color: var(--g-ink-2); }
.ga-field input, .ga-field select, .ga-field textarea { width: 100%; min-height: 2.5rem; border: 1px solid var(--g-line-strong); border-radius: var(--r-sm); padding: .45rem .6rem; font: inherit; font-size: .9rem; background: var(--g-paper); color: var(--g-ink); }
.ga-field textarea { min-height: 5rem; resize: vertical; }
.ga-field input:focus-visible, .ga-field select:focus-visible, .ga-field textarea:focus-visible { outline: 2px solid var(--g-brand); outline-offset: 1px; border-color: var(--g-brand); }
.ga-field small { font-size: .74rem; color: var(--g-graphite); }
.ga-wide { grid-column: 1 / -1; }
.ga-count { font-variant-numeric: tabular-nums; }
.ga-count.over { color: var(--g-red); font-weight: 700; }

/* tables */
.ga-tablewrap { overflow-x: auto; border: 1px solid var(--g-line); border-radius: var(--r-md); }
.ga-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.ga-table th, .ga-table td { padding: .5rem .65rem; border-bottom: 1px solid var(--g-line); text-align: left; vertical-align: top; }
.ga-table thead th { background: var(--g-paper-2); font-size: .76rem; font-weight: 700; color: var(--g-ink-2); position: sticky; top: 0; }
.ga-table tbody tr:last-child td { border-bottom: 0; }
.ga-table td.n, .ga-table th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ga-table code { font-size: .8rem; word-break: break-all; }
.ga-table input { width: 6.5rem; min-height: 2.1rem; border: 1px solid var(--g-line-strong); border-radius: var(--r-xs); padding: .25rem .45rem; text-align: right; font: inherit; background: var(--g-paper); color: var(--g-ink); }
.ga-sev { display: inline-block; min-width: 4.2rem; text-align: center; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: .1rem .5rem; }
.ga-sev.err { background: #fdeef0; color: #a3182c; } .ga-sev.warn { background: #fff4dc; color: #8a5600; } .ga-sev.ok { background: #e7f6ee; color: #0a6b48; }
html.dark .ga-sev.err { background: rgba(255,143,160,.14); color: #ffc2cb; } html.dark .ga-sev.warn { background: rgba(246,180,77,.14); color: #f8cd85; } html.dark .ga-sev.ok { background: rgba(60,207,145,.13); color: #9ff0cb; }

/* SERP preview */
.ga-serp { border: 1px solid var(--g-line); border-radius: var(--r-md); padding: .85rem 1rem; background: #fff; max-width: 640px; font-family: Arial, ui-sans-serif, system-ui, sans-serif; }
.ga-serp-url { font-size: .8rem; color: #202124; }
.ga-serp-title { font-size: 1.15rem; line-height: 1.3; color: #1a0dab; margin: .2rem 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ga-serp-desc { font-size: .84rem; line-height: 1.5; color: #4d5156; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html.dark .ga-serp { background: #202124; border-color: #3c4043; }
html.dark .ga-serp-url { color: #dadce0; } html.dark .ga-serp-title { color: #8ab4f8; } html.dark .ga-serp-desc { color: #bdc1c6; }

/* tool panels (UTM builder, post generator) */
.ga-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.ga-out { display: flex; gap: .4rem; align-items: stretch; margin-top: .6rem; }
.ga-out output, .ga-out textarea { flex: 1; min-width: 0; font-family: var(--g-font-mono); font-size: .8rem; background: var(--g-paper-2); border: 1px solid var(--g-line); border-radius: var(--r-sm); padding: .5rem .6rem; word-break: break-all; color: var(--g-ink); }
.ga-out textarea { min-height: 7rem; font-family: var(--g-font); font-size: .85rem; resize: vertical; }
.ga-chart { width: 100%; height: auto; display: block; }
.ga-chart text { font-size: 11px; fill: var(--g-graphite); font-family: var(--g-font); }
.ga-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .78rem; color: var(--g-graphite); margin-top: .3rem; }
.ga-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.ga-playbook h3 { margin-top: 1.5rem; font-size: 1rem; }
.ga-playbook .note { font-size: .78rem; color: var(--g-graphite); }
.ga-playbook a { color: var(--g-brand-ink); }
.ga-playbook p, .ga-playbook li { font-size: .88rem; line-height: 1.6; color: var(--g-ink-2); }
.ga-playbook ul, .ga-playbook ol { padding-left: 1.2rem; margin: .4rem 0; }
.ga-playbook ul { list-style: disc; } .ga-playbook ol { list-style: decimal; }
.ga-playbook table { width: 100%; border-collapse: collapse; font-size: .82rem; margin-top: .5rem; }
.ga-playbook th, .ga-playbook td { border-bottom: 1px solid var(--g-line); padding: .4rem .5rem; text-align: left; vertical-align: top; }
.ga-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 860px) { .ga-split { grid-template-columns: 1fr; } .ga-task { grid-template-columns: auto 1fr; } .ga-task .ga-tag { grid-column: 2; grid-row: auto; justify-self: start; } }
.ga-stat dd.ga-stat-meta { font-size: inherit; font-weight: 500; letter-spacing: 0; display: grid; gap: .3rem; }
.ga figure { margin: 0; }
label.cm-field-label { display: block; }
/* Skip link: first stop for keyboard users, hidden until focused. */
.gx-skip { position: absolute; left: .75rem; top: -3.5rem; z-index: 100; padding: .6rem 1rem; border-radius: var(--r-sm); background: var(--g-brand-fill); color: #fff; font-weight: 700; text-decoration: none; box-shadow: var(--g-shadow-pop); transition: top .12s ease; }
.gx-skip:focus { top: .75rem; outline: 3px solid var(--g-highlight); outline-offset: 2px; }
main#main-content:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { .gx-skip { transition: none; } }
/* Practice topic guide: method, worked example on graph paper, common mistakes */
.gx-ps-guide h3 { margin-top: 1.25rem; }
.gx-ps-guide .gx-ps-ex-q { font-family: var(--g-font-math); font-size: 1.08rem; color: var(--g-ink); margin-top: .4rem; }
.gx-ps-guide .gx-ps-ex-steps { background-color: var(--g-paper); background-image: linear-gradient(var(--g-grid) 1px, transparent 1px), linear-gradient(90deg, var(--g-grid) 1px, transparent 1px); background-size: 22px 22px; border: 1px solid var(--g-line); border-radius: var(--r-md); padding: .8rem 1rem .8rem 2.2rem; }
.gx-ps-guide .gx-ps-ex-a b { font-weight: 750; }
.gx-ps-guide .gx-ps-ex-a { display: inline-block; background: linear-gradient(transparent 58%, var(--g-highlight) 58%); padding: 0 .2rem; }
html.dark .gx-ps-guide .gx-ps-ex-a { background: linear-gradient(transparent 58%, var(--g-highlight) 58%); color: var(--g-highlight-ink, var(--g-ink)); }

/* ======================================================================
   404 / error page (.gx-nf)
   ====================================================================== */
.gx-nf { padding-top: clamp(1.5rem, 1rem + 2vw, 3rem); }
.gx-nf-hero { display: grid; gap: 2rem; align-items: center; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); margin-bottom: clamp(1.5rem, 1rem + 2vw, 3rem); }
.gx-nf-hero h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); line-height: 1.05; font-weight: 750; letter-spacing: -.03em; color: var(--g-ink); max-width: 18ch; text-wrap: balance; }
.gx-nf-lead { margin-top: .9rem; font-size: 1.08rem; line-height: 1.55; color: var(--g-ink-2); max-width: 52ch; }
.gx-nf-actions { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.gx-nf-sheet { margin: 0; aspect-ratio: 4 / 3; display: grid; place-content: center; gap: .6rem; text-align: center; border: 1px solid var(--g-line); border-radius: var(--r-lg); box-shadow: var(--g-shadow-2);
  background-color: var(--g-paper);
  background-image: linear-gradient(var(--g-grid) 1px, transparent 1px), linear-gradient(90deg, var(--g-grid) 1px, transparent 1px);
  background-size: 22px 22px; }
.gx-nf-code { font-family: var(--g-font-math); font-size: clamp(4rem, 3rem + 5vw, 7rem); line-height: 1; color: var(--g-ink); padding: 0 .35em; background: linear-gradient(transparent 62%, var(--g-highlight) 62%); justify-self: center; }
html.dark .gx-nf-code { color: var(--g-ink); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--g-highlight) 45%, transparent) 62%); }
.gx-nf-eq { font-family: var(--g-font-math); font-size: 1.05rem; color: var(--g-graphite); padding: 0 1rem; overflow-wrap: anywhere; }
.gx-nf-eq code { font-family: var(--g-font-mono); font-size: .85em; color: var(--g-ink-2); }
.gx-nf-suggest { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.gx-nf-suggest a { display: grid; gap: .15rem; padding: .85rem 1rem; border: 1.5px solid color-mix(in srgb, var(--g-brand) 40%, var(--g-line)); border-radius: var(--r-md); background: var(--g-brand-soft); color: var(--g-ink); text-decoration: none; }
.gx-nf-suggest a:hover { border-color: var(--g-brand); box-shadow: var(--g-shadow-2); }
.gx-nf-suggest .gx-tool-name { font-weight: 700; }
.gx-nf-more { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; padding: 1.25rem 0 .5rem; border-top: 1px solid var(--g-line); margin-top: 2rem; font-size: .95rem; font-weight: 600; }
.gx-nf-more a { color: var(--g-brand-ink); text-decoration: none; }
.gx-nf-more a:hover { text-decoration: underline; }
@media (max-width: 860px) { .gx-nf-hero { grid-template-columns: 1fr; } .gx-nf-sheet { aspect-ratio: auto; padding: 1.75rem 1rem; order: -1; } }

/* ======================================================================
   Document pages: About, Quality, Editorial policy, Privacy, Terms,
   Advertising (.gx-doc). One reading layout for every policy page:
   header, plain-language summary, sticky contents, related policies.
   ====================================================================== */
.gx-doc { max-width: 980px; padding-top: clamp(1rem, .7rem + 1.4vw, 2rem); }
.gx-doc--wide { max-width: none; }
.gx-doc-head { padding-bottom: clamp(1.25rem, 1rem + 1vw, 2rem); margin-bottom: clamp(1.5rem, 1.1rem + 1.5vw, 2.5rem); border-bottom: 1px solid var(--g-line); }
.gx-doc-h1 { font-size: clamp(2rem, 1.45rem + 2.1vw, 2.8rem); line-height: 1.08; font-weight: 760; letter-spacing: -.03em; color: var(--g-ink); text-wrap: balance; }
.gx-doc-h1, .gx-doc-lead { max-width: 64ch; }
.gx-doc-lead { margin-top: .85rem; font-size: clamp(1.02rem, .97rem + .25vw, 1.16rem); line-height: 1.6; color: var(--g-ink-2); }
.gx-doc-meta { margin: 1.1rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-size: .9rem; color: var(--g-graphite); }
.gx-doc-meta b { color: var(--g-ink-2); font-weight: 600; }
.gx-doc-meta a { color: var(--g-brand); text-decoration: none; }
.gx-doc-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gx-doc-actions { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem; }

.gx-doc-grid { display: grid; gap: 1.5rem clamp(2rem, 1rem + 3vw, 4rem); grid-template-columns: minmax(0, 1fr); align-items: start; }
.gx-doc-side { display: grid; gap: 1.75rem; font-size: .92rem; min-width: 0; }
.gx-doc-main { min-width: 0; max-width: 74ch; }
@media (min-width: 960px) {
  .gx-doc-grid { grid-template-columns: 232px minmax(0, 1fr); }
  .gx-doc-side { position: sticky; top: 88px; max-height: calc(100dvh - 104px); overflow-y: auto; overscroll-behavior: contain; padding: 0 .25rem 1rem 0; }
}

/* Contents: a collapsed disclosure on phones, an always-open list on desktop. */
.gx-doc-toc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 46px; padding: .55rem .9rem; border: 1px solid var(--g-line); border-radius: var(--r-md); background: var(--g-paper); font-weight: 650; color: var(--g-ink); }
.gx-doc-toc > summary::-webkit-details-marker { display: none; }
.gx-doc-toc > summary::after { content: ""; flex: none; width: .5rem; height: .5rem; margin-top: -.2rem; border-right: 2px solid var(--g-graphite); border-bottom: 2px solid var(--g-graphite); transform: rotate(45deg); transition: transform .15s ease; }
.gx-doc-toc[open] > summary::after { transform: rotate(-135deg); margin-top: .2rem; }
.gx-doc-toc ol { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; }
.gx-doc-toc a { display: block; padding: .38rem .8rem; border-left: 2px solid var(--g-line); color: var(--g-graphite); line-height: 1.35; text-decoration: none; }
.gx-doc-toc a:hover { color: var(--g-ink); border-left-color: var(--g-line-strong); }
.gx-doc-toc a[aria-current="true"] { color: var(--g-brand-ink); border-left-color: var(--g-brand); font-weight: 650; }
html.dark .gx-doc-toc a[aria-current="true"] { color: var(--g-brand); }
@media (min-width: 960px) {
  .gx-doc-toc > summary { min-height: 0; padding: 0 0 .15rem; border: 0; background: none; font-size: .85rem; font-weight: 650; color: var(--g-graphite); }
  .gx-doc-toc > summary::after { display: none; }
}
.gx-doc-rel-h { font-size: .85rem; font-weight: 650; color: var(--g-graphite); margin-bottom: .45rem; }
.gx-doc-rel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.gx-doc-rel a { display: block; padding: .3rem 0; color: var(--g-ink-2); text-decoration: none; line-height: 1.35; }
.gx-doc-rel a:hover { color: var(--g-brand); }
.gx-doc-rel a[aria-current="page"] { color: var(--g-ink); font-weight: 650; }
.gx-doc-rel a[aria-current="page"]::before { content: ""; display: inline-block; width: .4rem; height: .4rem; margin: 0 .5rem .12rem 0; border-radius: 50%; background: var(--g-brand); }
@media (max-width: 959.98px) { .gx-doc-side .gx-doc-rel { display: none; } }

/* Plain-language summary: a margin note in highlighter, read before the detail. */
.gx-doc-short { position: relative; margin-bottom: 2.25rem; padding: 1.15rem 1.35rem 1.2rem 1.7rem; border: 1px solid var(--g-line); border-radius: var(--r-md); background: var(--g-paper-2); }
.gx-doc-short::before { content: ""; position: absolute; left: .7rem; top: 1.05rem; bottom: 1.05rem; width: 4px; border-radius: 2px; background: var(--g-highlight); }
html.dark .gx-doc-short::before { background: var(--g-highlight-ink); opacity: .75; }
.gx-doc-short h2 { font-size: 1.02rem; font-weight: 700; color: var(--g-ink); }
.gx-doc-short ul { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .5rem; }
.gx-doc-short li { position: relative; padding-left: 1.15rem; line-height: 1.55; color: var(--g-ink-2); }
.gx-doc-short li::before { content: ""; position: absolute; left: 0; top: .66em; width: .42rem; height: 2px; border-radius: 1px; background: var(--g-graphite); }
.gx-doc-short b { color: var(--g-ink); font-weight: 650; }
.gx-doc-short .gx-doc-fine { margin-top: .8rem; font-size: .88rem; line-height: 1.5; color: var(--g-graphite); }

/* Long-form reading typography (independent of the legacy .cm-prose). */
.gx-prose { color: var(--g-ink-2); font-size: 1rem; line-height: 1.72; }
.gx-prose > * + * { margin-top: 1rem; }
.gx-prose h2 { margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--g-line); font-size: clamp(1.22rem, 1.1rem + .45vw, 1.45rem); line-height: 1.3; font-weight: 720; letter-spacing: -.015em; color: var(--g-ink); scroll-margin-top: 88px; text-wrap: balance; }
.gx-prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.gx-prose h3 { margin-top: 1.75rem; font-size: 1.06rem; line-height: 1.35; font-weight: 700; color: var(--g-ink); scroll-margin-top: 88px; }
.gx-prose ul, .gx-prose ol { padding-left: 1.3rem; }
.gx-prose ul { list-style: disc; }
.gx-prose ol { list-style: decimal; }
.gx-prose li + li { margin-top: .5rem; }
.gx-prose li::marker { color: var(--g-graphite); }
.gx-prose :is(b, strong) { color: var(--g-ink); font-weight: 650; }
.gx-prose a { color: var(--g-brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.gx-prose a:hover { text-decoration-thickness: 2px; }
.gx-prose code { font-family: var(--g-font-mono); font-size: .86em; padding: .1em .35em; border: 1px solid var(--g-line); border-radius: var(--r-xs); background: var(--g-paper-2); color: var(--g-ink); }
.gx-prose .gx-doc-fine { font-size: .9rem; line-height: 1.6; color: var(--g-graphite); }
.gx-prose .gx-doc-callout { padding: .95rem 1.1rem; border: 1px solid var(--g-line); border-radius: var(--r-md); background: var(--g-paper-2); color: var(--g-ink-2); }
/* Numbered legal sections: the number sits like a line number in the notebook margin. */
.gx-doc-num { display: inline-block; min-width: 1.9em; margin-right: .2rem; font-family: var(--g-font-math); font-weight: 400; color: var(--g-graphite); font-variant-numeric: tabular-nums; }
@media (min-width: 1100px) { .gx-prose--numbered h2 { position: relative; } .gx-prose--numbered .gx-doc-num { position: absolute; left: -2.6rem; min-width: 2rem; margin: 0; text-align: right; } }

/* End of document: who to ask, then where to go next. */
.gx-doc-foot { margin-top: 3rem; padding: 1.35rem 1.5rem; border-radius: var(--r-lg); background: var(--g-paper-2); border: 1px solid var(--g-line); display: grid; gap: 1rem; }
.gx-doc-foot h2 { font-size: 1.08rem; font-weight: 700; color: var(--g-ink); }
.gx-doc-foot p { margin-top: .3rem; color: var(--g-ink-2); line-height: 1.55; }
.gx-doc-foot a { color: var(--g-brand); }
.gx-doc-foot ul { list-style: none; margin: 0; padding: .9rem 0 0; border-top: 1px solid var(--g-line); display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; font-size: .92rem; }
.gx-doc-foot ul a { color: var(--g-ink-2); text-decoration: none; font-weight: 600; }
.gx-doc-foot ul a:hover { color: var(--g-brand); text-decoration: underline; text-underline-offset: 3px; }
.gx-doc-foot ul a[aria-current="page"] { color: var(--g-graphite); font-weight: 500; pointer-events: none; }

/* About: the house style in one worked example, plus live counts. */
.gx-about-hero { display: grid; gap: clamp(1.5rem, 1rem + 2vw, 3rem); align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .gx-about-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }
.gx-about-hero .gx-doc-head { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.gx-about-hero .gx-page { margin: .75rem 0 0; }
.gx-counts { margin: clamp(1.75rem, 1.2rem + 2vw, 3rem) 0 clamp(1.75rem, 1.2rem + 2vw, 3rem); padding: 1.25rem 0; border-top: 1px solid var(--g-line); border-bottom: 1px solid var(--g-line); display: grid; gap: 1rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); list-style: none; }
.gx-counts li { display: grid; gap: .15rem; }
.gx-counts b { font-family: var(--g-font-math); font-size: clamp(1.9rem, 1.5rem + 1.3vw, 2.5rem); font-weight: 400; line-height: 1; color: var(--g-ink); font-variant-numeric: tabular-nums; }
.gx-counts span { font-size: .92rem; color: var(--g-graphite); }
.gx-counts a { color: inherit; text-decoration: none; }
.gx-counts a:hover span { color: var(--g-brand); text-decoration: underline; text-underline-offset: 3px; }

/* Contact: one row per inbox, what to include on the left, the address on the right. */
.gx-contact { list-style: none; margin: 0; padding: 0; }
.gx-contact > li:first-child { padding-top: 0; }
@media (max-width: 959.98px) { .gx-doc-side:not(:has(.gx-doc-toc)) { display: none; } }
.gx-contact > li { display: grid; gap: .6rem 2rem; padding: 1.3rem 0 1.35rem; border-bottom: 1px solid var(--g-line); scroll-margin-top: 88px; }
.gx-contact h2 { font-size: 1.1rem; line-height: 1.3; font-weight: 700; color: var(--g-ink); }
.gx-contact p { margin-top: .35rem; max-width: 58ch; line-height: 1.55; color: var(--g-ink-2); }
.gx-contact-mail { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: .45rem .85rem; border: 1px solid var(--g-line-strong); border-radius: var(--r-sm); background: var(--g-paper); color: var(--g-brand-ink); font-weight: 650; text-decoration: none; white-space: nowrap; justify-self: start; }
html.dark .gx-contact-mail { color: var(--g-brand); }
.gx-contact-mail svg { width: 18px; height: 18px; flex: none; color: var(--g-graphite); }
.gx-contact-mail:hover { border-color: var(--g-brand); box-shadow: var(--g-shadow-1); }
.gx-contact-mail:hover svg { color: var(--g-brand); }
.gx-contact-before { margin-top: 2.5rem; }
.gx-contact-before h2 { font-size: 1.1rem; font-weight: 700; color: var(--g-ink); }
.gx-contact-before ul { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .65rem; }
.gx-contact-before li { display: grid; gap: .1rem; }
.gx-contact-before a { font-weight: 650; color: var(--g-brand); text-decoration: none; justify-self: start; }
.gx-contact-before a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gx-contact-before span { color: var(--g-graphite); font-size: .95rem; line-height: 1.5; }

/* Pricing: the price written as the last line of a worked solution, then two plans. */
.gx-price-hero { display: grid; gap: clamp(1.5rem, 1rem + 2vw, 3rem); align-items: center; grid-template-columns: minmax(0, 1fr); margin-bottom: clamp(2rem, 1.4rem + 2vw, 3.25rem); }
@media (min-width: 900px) { .gx-price-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }
.gx-price-hero .gx-doc-head { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.gx-price-sheet { margin: 0; display: grid; gap: 1rem; padding: clamp(1.6rem, 1.1rem + 2vw, 2.6rem) clamp(1.35rem, 1rem + 1.6vw, 2.4rem); border: 1px solid var(--g-line); border-radius: var(--r-lg); box-shadow: var(--g-shadow-2);
  background-color: var(--g-paper);
  background-image: linear-gradient(var(--g-grid) 1px, transparent 1px), linear-gradient(90deg, var(--g-grid) 1px, transparent 1px);
  background-size: 22px 22px; }
html.dark .gx-price-sheet { background-color: var(--g-paper-2); }
.gx-price-eq { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .8rem; font-family: var(--g-font-math); color: var(--g-ink); }
.gx-price-terms { font-size: clamp(1.15rem, 1rem + .7vw, 1.5rem); line-height: 1.3; color: var(--g-ink-2); }
.gx-price-eqs { font-size: clamp(2.6rem, 2rem + 2.6vw, 4rem); line-height: 1; white-space: nowrap; }
.gx-price-eqsign { font-size: .5em; vertical-align: .22em; color: var(--g-ink-2); }
.gx-price-eqs mark { color: inherit; padding: 0 .12em; background: linear-gradient(transparent 55%, var(--g-highlight) 55%, var(--g-highlight) 92%, transparent 92%); }
html.dark .gx-price-eqs mark { color: var(--g-highlight-ink); }
.gx-price-sheet figcaption { font-size: .95rem; font-weight: 600; color: var(--g-graphite); }

.gx-price-plans { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
@media (min-width: 900px) { .gx-price-plans { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.gx-plan { display: flex; flex-direction: column; gap: 1.1rem; padding: clamp(1.3rem, 1rem + 1vw, 1.9rem); border-radius: var(--r-lg); }
.gx-plan--now { background: var(--g-paper); border: 1.5px solid var(--g-ink); box-shadow: var(--g-shadow-2); }
html.dark .gx-plan--now { background: var(--g-paper-2); border-color: var(--g-line-strong); }
.gx-plan--later { border: 1.5px dashed var(--g-line-strong); }
.gx-plan-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; }
.gx-plan-head h3 { font-size: 1.4rem; font-weight: 750; letter-spacing: -.02em; color: var(--g-ink); }
.gx-plan-price { display: flex; align-items: baseline; gap: .55rem; font-size: .95rem; color: var(--g-graphite); }
.gx-plan-price b { font-family: var(--g-font-math); font-weight: 400; font-size: 2.1rem; line-height: 1; color: var(--g-ink); }
.gx-plan-status { padding: .2rem .6rem; border-radius: var(--r-xs); background: var(--c-everyday-soft); color: var(--c-everyday); font-size: .86rem; font-weight: 650; }
html.dark .gx-plan-status { background: rgba(255, 196, 92, .12); color: #ffcf7a; }
.gx-plan-desc { color: var(--g-ink-2); line-height: 1.55; }
.gx-plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem 1.75rem; }
@media (min-width: 1100px) { .gx-plan--now .gx-plan-list { grid-template-columns: 1fr 1fr; } }
.gx-plan-list li { position: relative; padding-left: 1.75rem; line-height: 1.5; color: var(--g-ink-2); }
.gx-plan-list li::before { content: ""; position: absolute; left: .15rem; top: .36em; width: .8rem; height: .45rem; border-left: 2.5px solid var(--g-check); border-bottom: 2.5px solid var(--g-check); transform: rotate(-45deg); }
.gx-plan-list b { color: var(--g-ink); font-weight: 650; }
.gx-plan-list--plain li::before { left: .25rem; top: .55em; width: .45rem; height: .45rem; border: 1.5px solid var(--g-graphite); border-radius: 50%; transform: none; }
.gx-plan-actions { margin-top: auto; padding-top: .35rem; display: flex; flex-wrap: wrap; gap: .5rem; }

/* FAQ list: plain disclosures separated by rules. */
.gx-faq { margin-top: 1rem; max-width: 80ch; border-top: 1px solid var(--g-line); }
.gx-faq details { border-bottom: 1px solid var(--g-line); }
.gx-faq summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem 0; font-weight: 650; color: var(--g-ink); }
.gx-faq summary::-webkit-details-marker { display: none; }
.gx-faq summary::after { content: "+"; flex: none; font-family: var(--g-font-math); font-size: 1.45rem; line-height: 1; color: var(--g-graphite); }
.gx-faq details[open] summary::after { content: "\2212"; }
.gx-faq summary:hover { color: var(--g-brand); }
.gx-faq details p { margin-top: -.2rem; padding-bottom: 1.1rem; max-width: 70ch; line-height: 1.6; color: var(--g-ink-2); }

/* Learn hub: practice topics and a curated map of guides, grouped by what they help with. */
.gx-learn { padding-top: clamp(1rem, .7rem + 1.4vw, 2rem); }
.gx-learn-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.gx-learn-sec { margin-top: clamp(2rem, 1.5rem + 2vw, 3.25rem); padding-top: clamp(1.5rem, 1.2rem + 1vw, 2.25rem); border-top: 1px solid var(--g-line); }
.gx-learn-group :is(h2, h3) { margin-bottom: .2rem; padding-bottom: .5rem; border-bottom: 2px solid var(--g-ink); font-size: .98rem; font-weight: 700; color: var(--g-ink); }
.gx-learn-group ul { list-style: none; margin: 0; padding: 0; }
.gx-learn-topics { columns: 3 220px; column-gap: 2.25rem; }
.gx-learn-topics .gx-learn-group { break-inside: avoid; margin-bottom: 1.6rem; }
.gx-learn-topics li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 44px; padding: .3rem 0; border-bottom: 1px solid var(--g-line); }
.gx-learn-topics li > a:first-child { color: var(--g-ink); font-weight: 600; text-decoration: none; }
.gx-learn-topics li > a:first-child:hover { color: var(--g-brand); text-decoration: underline; text-underline-offset: 3px; }
.gx-learn-solver { flex: none; padding: .15rem .5rem; border: 1px solid var(--g-line-strong); border-radius: var(--r-xs); font-size: .8rem; font-weight: 650; color: var(--g-graphite); text-decoration: none; }
.gx-learn-solver:hover { color: var(--g-brand); border-color: var(--g-brand); }
.gx-learn-guides { display: grid; gap: 1.75rem 2.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.gx-learn-guides li { padding: .8rem 0 .85rem; border-bottom: 1px solid var(--g-line); }
.gx-learn-guides li > a { font-weight: 650; line-height: 1.35; color: var(--g-ink); text-decoration: none; }
.gx-learn-guides li > a:hover { color: var(--g-brand); text-decoration: underline; text-underline-offset: 3px; }
.gx-learn-guides li > p { margin-top: .25rem; font-size: .92rem; line-height: 1.5; color: var(--g-graphite); }
.gx-learn-split { display: grid; gap: 2rem 3rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .gx-learn-split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.gx-learn-recent { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--g-line); }
.gx-learn-recent li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--g-line); }
.gx-learn-recent a { min-width: 0; font-weight: 600; color: var(--g-ink); text-decoration: none; }
.gx-learn-recent a:hover { color: var(--g-brand); text-decoration: underline; text-underline-offset: 3px; }
.gx-learn-recent time { flex: none; font-size: .85rem; color: var(--g-graphite); font-variant-numeric: tabular-nums; }
.gx-learn-note { padding: 1.25rem 1.35rem; border: 1px solid var(--g-line); border-radius: var(--r-lg); background: var(--g-paper-2); }
.gx-learn-note h2 { font-size: 1.05rem; font-weight: 700; color: var(--g-ink); }
.gx-learn-note p { margin-top: .55rem; font-size: .94rem; line-height: 1.55; color: var(--g-ink-2); }
.gx-learn-note p:last-child { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; font-weight: 650; }
.gx-learn-note a { color: var(--g-brand); text-decoration: none; }
.gx-learn-note a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* List filter (progressive) and the labs hub. */
.gx-filter { margin-top: 1.4rem; max-width: 32rem; }
.gx-filter-empty { margin-top: .6rem; font-size: .92rem; color: var(--g-graphite); }
[data-list-filter][hidden], [data-filter-item][hidden], [data-filter-group][hidden], [data-list-empty][hidden] { display: none !important; }
.gx-labs-flags { display: inline-flex; flex-wrap: wrap; gap: .3rem; margin-left: .5rem; vertical-align: .1em; }
.gx-labs-flag { padding: .05rem .45rem; border-radius: var(--r-xs); background: var(--g-paper-3); color: var(--g-ink-2); font-size: .75rem; font-weight: 650; line-height: 1.5; white-space: nowrap; }
.gx-labs-flag--online { background: var(--c-everyday-soft); color: var(--c-everyday); }
html.dark .gx-labs-flag--online { background: rgba(255, 196, 92, .12); color: #ffcf7a; }
.gx-labs-how { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .9rem; max-width: 66ch; }
.gx-labs-how li { padding-left: 1.1rem; border-left: 3px solid var(--g-line-strong); line-height: 1.55; color: var(--g-ink-2); }
.gx-labs-how b { color: var(--g-ink); font-weight: 650; }

/* Graphing hub: a real plot on graph paper, two tools, examples that open preloaded. */
.gx-graph-hero { display: grid; gap: clamp(1.5rem, 1rem + 2vw, 3rem); align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .gx-graph-hero { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); } }
.gx-graph-hero .gx-doc-head { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.gx-graph-fig { margin: 0; border: 1px solid var(--g-line); border-radius: var(--r-lg); background: var(--g-paper); box-shadow: var(--g-shadow-2); overflow: hidden; }
html.dark .gx-graph-fig { background: var(--g-paper-2); }
.gx-graph-fig figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .35rem 1rem; padding: .75rem 1rem .85rem; border-top: 1px solid var(--g-line); font-family: var(--g-font-math); font-size: 1rem; color: var(--g-ink-2); }
.gx-graph-fig figcaption .gx-link { font-family: var(--g-font); font-size: .92rem; }
.gx-plot { display: block; width: 100%; height: auto; }
.gx-plot line, .gx-plot path { vector-effect: non-scaling-stroke; }
.gx-plot .g-minor { stroke: var(--g-grid); stroke-width: 1; }
.gx-plot .g-major { stroke: var(--g-grid-strong); stroke-width: 1; }
.gx-plot .g-axis { stroke: var(--g-graphite); stroke-width: 1.4; }
.gx-plot .g-f { fill: none; stroke: var(--tone-a); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.gx-plot .g-h { stroke: var(--tone-b); stroke-width: 2.2; stroke-dasharray: 7 6; }
.gx-plot .g-env { fill: none; stroke: var(--g-graphite); stroke-width: 1.2; stroke-dasharray: 4 5; opacity: .7; }
.gx-plot .g-pt { fill: var(--g-paper); stroke: var(--g-ink); stroke-width: 2.4; }
.gx-plot .g-wire { fill: none; stroke: var(--tone-a); stroke-width: 1; opacity: .75; }
.gx-plot text { font-family: var(--g-font-math); font-size: 13px; fill: var(--g-graphite); }
.gx-plot .g-lbl { font-size: 15px; fill: var(--g-ink); paint-order: stroke; stroke: var(--g-paper); stroke-width: 4px; stroke-linejoin: round; }
.gx-plot .g-key { font-size: 15px; paint-order: stroke; stroke: var(--g-paper); stroke-width: 4px; stroke-linejoin: round; }
.gx-plot .g-key-f { fill: var(--tone-a); }
.gx-plot .g-key-h { fill: color-mix(in srgb, var(--tone-b) 80%, var(--g-ink)); }
html.dark .gx-plot .g-lbl, html.dark .gx-plot .g-key, html.dark .gx-plot .g-pt { stroke: var(--g-paper-2); }
html.dark .gx-plot .g-pt { fill: var(--g-paper-2); stroke: var(--g-ink); }
.gx-graph-tools { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); margin-top: 1rem; }
.gx-graph-tool { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--g-line); border-radius: var(--r-lg); background: var(--g-paper); color: var(--g-ink); text-decoration: none; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
.gx-graph-tool:hover { border-color: color-mix(in srgb, var(--g-brand) 55%, var(--g-line)); box-shadow: var(--g-shadow-2); }
.gx-graph-tool .gx-plot { background: var(--g-paper-2); border-bottom: 1px solid var(--g-line); max-height: 180px; }
.gx-graph-tool-body { display: grid; gap: .4rem; padding: 1.1rem 1.25rem 1.25rem; }
.gx-graph-tool-name { font-size: 1.2rem; font-weight: 720; letter-spacing: -.015em; }
.gx-graph-tool:hover .gx-graph-tool-name { color: var(--g-brand); }
.gx-graph-tool-desc { color: var(--g-ink-2); line-height: 1.5; }
.gx-graph-tool-list { display: grid; gap: .3rem; margin-top: .3rem; font-size: .92rem; color: var(--g-graphite); }
.gx-graph-tool-list span { position: relative; padding-left: 1rem; }
.gx-graph-tool-list span::before { content: ""; position: absolute; left: 0; top: .62em; width: .4rem; height: 2px; border-radius: 1px; background: var(--g-graphite); }
.gx-graph-ex { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem 2.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.gx-graph-ex li { display: grid; gap: .4rem; align-content: start; padding-top: .9rem; border-top: 2px solid var(--g-ink); }
.gx-graph-ex h3 { font-size: 1rem; font-weight: 700; color: var(--g-ink); }
.gx-graph-ex .gx-graph-expr { font-family: var(--g-font-math); font-size: 1.08rem; color: var(--g-ink); }
.gx-graph-ex p { font-size: .94rem; line-height: 1.5; color: var(--g-ink-2); }
.gx-graph-ex .gx-link { justify-self: start; font-size: .92rem; }

/* Features: one row per feature, the text beside a real worked specimen. */
.gx-feat-jump { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: .95rem; font-weight: 600; }
.gx-feat-jump a { color: var(--g-ink-2); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.gx-feat-jump a:hover { color: var(--g-brand); border-bottom-color: var(--g-brand); }
.gx-feat-row { display: grid; gap: 1.5rem clamp(2rem, 1rem + 3vw, 4rem); align-items: center; grid-template-columns: minmax(0, 1fr); margin-top: clamp(2rem, 1.5rem + 2vw, 3.25rem); padding-top: clamp(1.5rem, 1.2rem + 1vw, 2.25rem); border-top: 1px solid var(--g-line); scroll-margin-top: 88px; }
@media (min-width: 900px) { .gx-feat-row { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }
.gx-feat-text > p { margin-top: .6rem; max-width: 60ch; line-height: 1.65; color: var(--g-ink-2); }
.gx-feat-text .gx-link { display: inline-block; margin: 1rem 1.25rem 0 0; }
.gx-feat-list { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .45rem; }
.gx-feat-list li { position: relative; padding-left: 1.6rem; line-height: 1.5; color: var(--g-ink-2); }
.gx-feat-list li::before { content: ""; position: absolute; left: .1rem; top: .36em; width: .75rem; height: .42rem; border-left: 2.5px solid var(--g-check); border-bottom: 2.5px solid var(--g-check); transform: rotate(-45deg); }
.gx-feat-spec { margin: 0; padding: 1.25rem 1.4rem 1.3rem; border: 1px solid var(--g-line); border-radius: var(--r-lg); box-shadow: var(--g-shadow-2);
  background-color: var(--g-paper);
  background-image: linear-gradient(var(--g-grid) 1px, transparent 1px), linear-gradient(90deg, var(--g-grid) 1px, transparent 1px);
  background-size: 22px 22px; }
html.dark .gx-feat-spec { background-color: var(--g-paper-2); }
.gx-feat-spec figcaption { font-size: .9rem; font-weight: 650; color: var(--g-graphite); margin-bottom: .55rem; }
.gx-feat-spec ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-family: var(--g-font-math); font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.4; color: var(--g-ink); }
.gx-feat-ans mark { color: inherit; padding: 0 .2em; background: linear-gradient(transparent 52%, var(--g-highlight) 52%, var(--g-highlight) 94%, transparent 94%); }
html.dark .gx-feat-ans mark { color: var(--g-highlight-ink); }
.gx-feat-check { margin-top: .8rem; display: flex; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 650; color: var(--g-check); }
.gx-feat-check::before { content: ""; flex: none; width: .7rem; height: .4rem; margin-top: -.2rem; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg); }
.gx-feat-spec--plot { padding: 0; overflow: hidden; background-image: none; }
.gx-feat-spec--plot figcaption { margin: 0; padding: .7rem 1rem .8rem; border-top: 1px solid var(--g-line); font-family: var(--g-font-math); font-weight: 400; font-size: 1rem; color: var(--g-ink-2); }
.gx-feat-more { margin-top: 1rem; }

/* Templates gallery. */
.gx-tpl-cats { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.gx-tpl-cats a { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: .35rem .85rem; border: 1px solid var(--g-line-strong); border-radius: 999px; background: var(--g-paper); color: var(--g-ink); font-weight: 600; text-decoration: none; }
.gx-tpl-cats a:hover { border-color: var(--g-brand); color: var(--g-brand); }
.gx-tpl-cats span { font-size: .8rem; font-weight: 650; color: var(--g-graphite); font-variant-numeric: tabular-nums; }
.gx-tpl-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.gx-tpl-card { display: flex; flex-direction: column; gap: .45rem; padding: 1.1rem 1.2rem 1.15rem; border: 1px solid var(--g-line); border-radius: var(--r-md); background: var(--g-paper); }
.gx-tpl-card:hover { border-color: var(--g-line-strong); }
.gx-tpl-cat { align-self: flex-start; font-size: .8rem; font-weight: 650; color: var(--g-graphite); text-decoration: none; }
.gx-tpl-cat:hover { color: var(--g-brand); text-decoration: underline; text-underline-offset: 3px; }
.gx-tpl-card h2 { font-size: 1.06rem; line-height: 1.3; font-weight: 700; }
.gx-tpl-card h2 a { color: var(--g-ink); text-decoration: none; }
.gx-tpl-card h2 a:hover { color: var(--g-brand); text-decoration: underline; text-underline-offset: 3px; }
.gx-tpl-card p { font-size: .93rem; line-height: 1.5; color: var(--g-ink-2); }
.gx-tpl-actions { margin-top: auto; padding-top: .6rem; display: flex; align-items: center; gap: 1rem; }

/* Comparison table: GetCalcMaster's column carries the highlight; rows are jobs. */
.gx-cmp-wrap { margin-top: 1.1rem; overflow-x: auto; border: 1px solid var(--g-line); border-radius: var(--r-lg); background: var(--g-paper); }
.gx-cmp-wrap:focus-visible { outline: 2px solid var(--g-brand); outline-offset: 2px; }
.gx-cmp { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.gx-cmp th, .gx-cmp td { padding: .85rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--g-line); }
.gx-cmp tbody tr:last-child > * { border-bottom: 0; }
.gx-cmp thead th { font-size: .88rem; font-weight: 700; color: var(--g-graphite); background: var(--g-paper-2); }
.gx-cmp tbody th { width: 19%; font-weight: 650; color: var(--g-ink); }
.gx-cmp td { color: var(--g-ink-2); }
.gx-cmp .gx-cmp-us { width: 31%; background: var(--g-brand-soft); color: var(--g-ink); }
.gx-cmp thead .gx-cmp-us { color: var(--g-brand-ink); }
html.dark .gx-cmp thead .gx-cmp-us { color: var(--g-brand); }

/* Notebook toolbar: wrap from tablet width up so no button sits half-hidden past the edge.
   Phones keep the swipeable command rows. */
@media (min-width: 640px) {
  .cm-notebook-toolbar .cm-toolbar-row { flex-wrap: wrap; overflow: visible; row-gap: .5rem; scrollbar-width: auto; }
  .cm-notebook-toolbar .cm-toolbar-group { flex-wrap: wrap; row-gap: .5rem; }
}

/* Topic and conversion hubs (/p/*-hub, /p/*-conversions): full-title link lists instead of truncated chips. */
.cm-prose .gx-hub { display: grid; }
.cm-prose .gx-hub :is(p, ul, ol) { margin: 0; }
.cm-prose .gx-hub ul { list-style: none; padding: 0; }
.cm-prose .gx-hub li { margin: 0; }
.cm-prose .gx-hub a { text-decoration: none; }
.cm-prose .gx-hub a:not(.cm-btn):not(.cm-btn-lite):hover { text-decoration: underline; text-underline-offset: 3px; }
.cm-prose .gx-hub .gx-hub-intro { padding-bottom: 1.4rem; border-bottom: 1px solid var(--g-line); }
.cm-prose .gx-hub .gx-hub-intro > p:first-child { max-width: 64ch; font-size: 1.02rem; line-height: 1.6; color: var(--g-ink-2); }
.cm-prose .gx-hub .gx-hub-actions { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.cm-prose .gx-hub .gx-hub-sec { padding: 1.5rem 0 1.6rem; border-bottom: 1px solid var(--g-line); }
.cm-prose .gx-hub .gx-hub-sec:last-of-type { border-bottom: 0; }
.cm-prose .gx-hub .gx-hub-sec > h2 { margin: 0 0 .35rem; padding: 0; border: 0; font-size: 1.2rem; font-weight: 720; letter-spacing: -.015em; color: var(--g-ink); }
.cm-prose .gx-hub .gx-hub-sec > p { margin-bottom: .8rem; font-size: .95rem; line-height: 1.55; color: var(--g-graphite); }
.cm-prose .gx-hub .gx-hub-cols { columns: 3 13rem; column-gap: 2rem; margin-top: .6rem; }
.cm-prose .gx-hub .gx-hub-cols li { break-inside: avoid; padding: .4rem 0; border-bottom: 1px solid var(--g-line); line-height: 1.35; }
.cm-prose .gx-hub .gx-hub-cols a { color: var(--g-ink); font-weight: 600; }
.cm-prose .gx-hub .gx-hub-cols a:hover { color: var(--g-brand); }
.cm-prose .gx-hub .gx-hub-cats { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.cm-prose .gx-hub .gx-hub-cats a { display: inline-flex; align-items: center; min-height: 38px; padding: .3rem .85rem; border: 1px solid var(--g-line-strong); border-radius: 999px; color: var(--g-ink); font-weight: 600; white-space: nowrap; }
.cm-prose .gx-hub .gx-hub-cats a:hover { border-color: var(--g-brand); color: var(--g-brand); text-decoration: none; }
.cm-prose .gx-hub .gx-hub-links { margin-top: .6rem; display: grid; gap: .1rem 2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.cm-prose .gx-hub .gx-hub-links li { display: grid; gap: .1rem; padding: .55rem 0; border-bottom: 1px solid var(--g-line); }
.cm-prose .gx-hub .gx-hub-links a { color: var(--g-ink); font-weight: 650; }
.cm-prose .gx-hub .gx-hub-links a:hover { color: var(--g-brand); }
.cm-prose .gx-hub .gx-hub-links span { font-size: .9rem; line-height: 1.45; color: var(--g-graphite); }
.cm-prose .gx-hub .gx-hub-points { margin-top: .5rem; display: grid; gap: .45rem; }
.cm-prose .gx-hub .gx-hub-points li { position: relative; padding-left: 1.15rem; line-height: 1.5; color: var(--g-ink-2); }
.cm-prose .gx-hub .gx-hub-points li::before { content: ""; position: absolute; left: 0; top: .68em; width: .45rem; height: 2px; border-radius: 1px; background: var(--g-graphite); }
.cm-prose .gx-hub .gx-hub-more { margin-top: .9rem; display: flex; flex-wrap: wrap; gap: .35rem 1.5rem; font-size: .95rem; font-weight: 650; }
.cm-prose .gx-hub .gx-hub-more a { color: var(--g-brand); }
.cm-prose .gx-hub .gx-faq { margin-top: .4rem; border-top: 0; }
.cm-prose .gx-hub .gx-faq details p { margin-top: -.2rem; padding-bottom: 1rem; }
.cm-prose .gx-hub .gx-hub-fine { margin-top: 1.25rem; font-size: .88rem; line-height: 1.55; color: var(--g-graphite); }
.gx-proj-import { display: inline-flex; align-items: center; cursor: pointer; }
.gx-proj-import:focus-within { outline: 2px solid var(--g-brand); outline-offset: 2px; }
.gx-learn-sec > .gx-section-h + .gx-learn-guides { margin-top: 1rem; }

/* Mortgage: the payment is the headline result, highlighted like an answer line. */
.gx-mg-head { padding: .15rem 0 .95rem; border-bottom: 1px solid var(--g-line); }
.gx-mg-head-label { font-size: .85rem; font-weight: 650; color: var(--g-graphite); }
.gx-mg-head-value { display: inline-block; margin-top: .3rem; padding: 0 .15em; font-family: var(--g-font-math); font-size: clamp(2rem, 1.6rem + 1.2vw, 2.5rem); line-height: 1.05; color: var(--g-ink); font-variant-numeric: tabular-nums;
  background: linear-gradient(transparent 58%, var(--g-highlight) 58%, var(--g-highlight) 94%, transparent 94%); }
html.dark .gx-mg-head-value { color: var(--g-highlight-ink); }
.gx-mg-head-sub { margin-top: .35rem; font-size: .86rem; line-height: 1.45; color: var(--g-ink-2); }

/* Admin money planner sub-headings */
.ga-h3 { font-size: .95rem; font-weight: 700; color: var(--g-ink); }

/* ----------------------------------------------------------------------
   Exam calculator rules (/learn/exam-calculators): checker, grid, exam notes
   ---------------------------------------------------------------------- */
.gx-xc-h2 { font-size: clamp(1.22rem, 1.1rem + .45vw, 1.45rem); line-height: 1.3; font-weight: 720; letter-spacing: -.015em; color: var(--g-ink); scroll-margin-top: 88px; text-wrap: balance; }
.gx-xc-h3 { margin-top: 1.4rem; font-size: 1rem; font-weight: 700; color: var(--g-ink); }
.gx-xc-sec, .gx-xc-exam { margin-top: clamp(2.25rem, 1.9rem + 1.2vw, 3rem); }
.gx-xc-exam { padding-top: clamp(1.6rem, 1.4rem + .8vw, 2.1rem); border-top: 1px solid var(--g-line); }
.gx-xc-sec > p, .gx-xc-exam > p { margin-top: .55rem; color: var(--g-ink-2); line-height: 1.6; }

/* Checker: the question on the left, the answer on the right. */
.gx-xc-check { display: grid; gap: 1rem 1.25rem; padding: clamp(1rem, .85rem + .7vw, 1.4rem); border: 1px solid var(--g-line); border-radius: var(--r-lg); background: var(--g-paper); box-shadow: var(--g-shadow-2); }
@media (min-width: 720px) { .gx-xc-check { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.gx-xc-form { display: grid; gap: .8rem; align-content: start; }
.gx-xc-field { display: grid; gap: .3rem; }
.gx-xc-field > span { font-size: .85rem; font-weight: 650; color: var(--g-graphite); }
.gx-xc-field select { width: 100%; min-height: 46px; padding: 0 .75rem; border: 1px solid var(--g-line-strong); border-radius: var(--r-sm); background: var(--g-paper); color: var(--g-ink); font: inherit; font-size: 1rem; }
.gx-xc-field select:focus-visible { outline: 2px solid var(--g-brand); outline-offset: 2px; }
.gx-xc-go { justify-self: start; }
.is-live .gx-xc-go { display: none; }
.gx-xc-verdict { display: grid; align-content: center; gap: .4rem; min-height: 9rem; padding: 1rem 1.2rem; border-radius: var(--r-md); border: 1px solid var(--g-line); background: var(--g-paper-2); }
.gx-xc-verdict[data-state="yes"] { border-color: color-mix(in srgb, var(--g-check) 40%, var(--g-line)); background: color-mix(in srgb, var(--g-check) 8%, var(--g-paper)); }
.gx-xc-verdict[data-state="no"] { border-color: color-mix(in srgb, var(--g-red) 40%, var(--g-line)); background: color-mix(in srgb, var(--g-red) 7%, var(--g-paper)); }
.gx-xc-word { font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.15rem); font-weight: 770; letter-spacing: -.025em; line-height: 1.05; color: var(--g-ink); }
.gx-xc-verdict[data-state="yes"] .gx-xc-word { color: var(--g-check); }
.gx-xc-verdict[data-state="no"] .gx-xc-word { color: var(--g-red); }
.gx-xc-reason { color: var(--g-ink-2); line-height: 1.55; }
.gx-xc-src { font-size: .86rem; color: var(--g-graphite); }
:is(.gx-xc-src, .gx-xc-links, .gx-xc-sources, .gx-xc-disclosure, .gx-xc-sec > p) a { color: var(--g-brand); text-underline-offset: 3px; }

/* Grid: calculators down, exams across, marked like an answer sheet. */
.gx-xc-lede { font-size: .92rem; }
.gx-xc-grid { position: relative; /* keeps the screen-reader labels inside the scroll box */ margin-top: .9rem; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--g-line); border-radius: var(--r-lg); background: var(--g-paper); }
.gx-xc-grid:focus-visible { outline: 2px solid var(--g-brand); outline-offset: 2px; }
.gx-xc-grid table { width: 100%; min-width: 560px; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.gx-xc-grid th, .gx-xc-grid td { padding: .5rem .65rem; border-bottom: 1px solid var(--g-grid); }
.gx-xc-grid tbody:last-child tr:last-child > * { border-bottom: 0; }
.gx-xc-grid thead th { background: var(--g-paper-2); font-size: .8rem; font-weight: 700; color: var(--g-ink-2); text-align: center; white-space: nowrap; border-bottom-color: var(--g-line); }
.gx-xc-grid thead th:first-child { text-align: left; }
.gx-xc-grid thead a { color: inherit; text-decoration: none; }
.gx-xc-grid thead a:hover { color: var(--g-brand); text-decoration: underline; text-underline-offset: 3px; }
.gx-xc-grid tbody th { text-align: left; font-weight: 600; color: var(--g-ink); white-space: nowrap; position: sticky; left: 0; z-index: 1; background: var(--g-paper); }
.gx-xc-grid .gx-xc-group th { position: static; padding-top: .85rem; font-size: .78rem; font-weight: 700; color: var(--g-graphite); border-bottom-color: var(--g-line); }
.gx-xc-grid td { text-align: center; font-family: var(--g-font-math); font-size: 1.12rem; line-height: 1; border-left: 1px solid var(--g-grid); }
.gx-xc-grid td.is-hit { background: var(--g-highlight); }
html.dark .gx-xc-grid td.is-hit { box-shadow: inset 0 0 0 1px var(--g-highlight-ink); }
.gx-xc-yes { color: var(--g-check); font-weight: 700; }
.gx-xc-no { color: var(--g-red); }
@media (max-width: 600px) {
  /* Phones: let names and exam headings wrap so most of the grid fits without scrolling. */
  .gx-xc-grid table { min-width: 0; font-size: .86rem; }
  .gx-xc-grid thead th { white-space: normal; padding: .45rem .3rem; line-height: 1.2; }
  .gx-xc-grid tbody th { white-space: normal; min-width: 7.5rem; padding: .45rem .5rem; line-height: 1.3; }
  .gx-xc-grid td { padding: .45rem .25rem; }
}
.gx-xc-cas { display: inline-block; margin-left: .45rem; padding: .05rem .38rem; border: 1px solid var(--g-line-strong); border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .03em; color: var(--g-graphite); vertical-align: .08em; }

/* Disclosure, exam notes and picks. */
.gx-xc-disclosure { margin-top: 2.25rem; padding: .9rem 1.1rem; border: 1px dashed var(--g-line-strong); border-radius: var(--r-md); font-size: .9rem; line-height: 1.55; color: var(--g-ink-2); display: grid; gap: .4rem; }
.gx-xc-disclosure b { color: var(--g-ink); }
.gx-xc-exam > .gx-xc-rule { font-size: 1.04rem; color: var(--g-ink); }
.gx-xc-built { font-size: .92rem; }
.gx-xc-built span { font-weight: 650; color: var(--g-graphite); }
.gx-xc-points { margin-top: .9rem; padding-left: 1.25rem; list-style: disc; display: grid; gap: .45rem; color: var(--g-ink-2); line-height: 1.6; }
.gx-xc-points li::marker { color: var(--g-graphite); }
.gx-xc-picks { margin-top: .6rem; display: grid; gap: .6rem; }
.gx-xc-picks li { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; padding: .8rem 1rem; border: 1px solid var(--g-line); border-radius: var(--r-md); background: var(--g-paper); }
.gx-xc-pick { display: grid; gap: .15rem; min-width: 0; flex: 1 1 18rem; }
.gx-xc-pick b { color: var(--g-ink); font-weight: 700; }
.gx-xc-pick span { color: var(--g-graphite); font-size: .92rem; line-height: 1.5; }
.gx-xc-buy { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 .95rem; border: 1px solid var(--g-line-strong); border-radius: var(--r-sm); background: var(--g-paper); color: var(--g-ink); font-weight: 650; font-size: .9rem; text-decoration: none; }
.gx-xc-buy:hover { border-color: var(--g-brand); color: var(--g-brand); }
.gx-xc-buy:focus-visible { outline: 2px solid var(--g-brand); outline-offset: 2px; }
.gx-xc-nobuy { padding: .75rem 1rem; border-left: 3px solid var(--g-highlight); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--g-paper-2); }
html.dark .gx-xc-nobuy { border-left-color: var(--g-highlight-ink); }
.gx-xc-foot { margin-top: 1.1rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .35rem 1rem; align-items: baseline; font-size: .9rem; }
.gx-xc-foot-h { font-weight: 650; color: var(--g-graphite); }
.gx-xc-links { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
@media (max-width: 560px) { .gx-xc-foot { grid-template-columns: minmax(0, 1fr); gap: .2rem; } .gx-xc-links + .gx-xc-foot-h { margin-top: .5rem; } }
.gx-xc-sources { margin-top: .7rem; padding-left: 1.25rem; list-style: disc; display: grid; gap: .35rem; color: var(--g-ink-2); }
.gx-xc-faq { margin-top: .8rem; }

/* ----------------------------------------------------------------------
   Ads: when Google has no ad for a unit it marks it data-ad-status="unfilled".
   Hide the unit and the labelled "Advertisements" card around it, so visitors
   (and AdSense reviewers) never see an empty box.
   ---------------------------------------------------------------------- */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.cm-monet:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none !important; }

/* Admin › Amazon links */
.ga-amz-table input[type="text"] { width: 100%; min-width: 11rem; text-align: left; }
.ga-amz-table th small { display: block; font-weight: 500; font-size: .78rem; color: var(--g-graphite); }
.ga-amz-show { text-align: center; }
.ga-amz-show input[type="checkbox"], .ga-amz-switch input[type="checkbox"] { width: 1.1rem; height: 1.1rem; min-height: 0; padding: 0; accent-color: var(--g-brand); }
.ga-amz-switch { display: inline-flex; align-items: center; gap: .55rem; font-weight: 650; color: var(--g-ink); cursor: pointer; }
.ga-amz-on { font-weight: 650; color: var(--g-check); }
.ga-amz-off { color: var(--g-graphite); }
.ga-amz-save { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
