/* Topic guides: a reading-width guide post. Scoped to .g-page so the shared header and footer are untouched. */
.g-page {
  max-width: 1040px; margin: 0 auto; padding: 28px 20px 72px;
  font-family: var(--font, Inter, system-ui, sans-serif); color: #1c2a40; font-size: 17px; line-height: 1.75; letter-spacing: -.005em;
}
.g-page h1, .g-page h2, .g-page h3 { color: #0f1d33; letter-spacing: -.02em; }
.g-crumbs { font-size: 13px; color: #60748e; margin-bottom: 18px; }
.g-crumbs a { color: inherit; text-decoration: none; }
.g-crumbs a:hover { text-decoration: underline; }
.g-crumbs span[aria-hidden="true"] { padding: 0 6px; color: #a3afbd; }
.g-head { max-width: 720px; border-bottom: 1px solid #e3eaf2; padding-bottom: 22px; margin-bottom: 8px; }
.g-kicker { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #078c49; }
.g-page h1 { margin: 0 0 14px; font-size: clamp(30px, 4vw, 42px); line-height: 1.12; font-weight: 800; }
.g-intro { font-size: 18px; color: #334862; margin: 0 0 12px; }
.g-body { max-width: 720px; }
.g-section { margin-top: 36px; }
.g-page h2 { margin: 0 0 12px; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; font-weight: 800; }
.g-page h3 { margin: 26px 0 8px; font-size: 19px; line-height: 1.3; font-weight: 750; }
.g-page p { margin: 0 0 14px; }
.g-list { margin: 0 0 16px; padding-left: 22px; }
.g-list li { margin-bottom: 8px; }
.g-page a { color: #078c49; font-weight: 600; }
.g-example { margin: 22px 0 26px; padding: 20px 22px; border: 1px solid #dbe6f0; border-left: 4px solid #078c49; border-radius: 12px; background: #fbfdff; }
.g-example h3 { margin-top: 0; }
.g-question { color: #334862; }
.g-label { display: inline-block; margin-right: 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #078c49; }
.g-steps { margin: 12px 0 14px; padding: 0; list-style: none; counter-reset: step; }
.g-steps li { counter-increment: step; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 8px 0 8px 40px; position: relative; border-top: 1px solid #edf2f7; }
.g-steps li::before { content: counter(step); position: absolute; left: 0; top: 9px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #078c49; color: #078c49; font-size: 13px; font-weight: 800; display: grid; place-items: center; }
.g-step-title { font-weight: 700; }
.g-eq { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; background: #e9f9ef; color: #104b32; padding: 3px 10px; border-radius: 8px; }
.g-step-check { font-size: 12px; font-weight: 800; color: #6b5a00; background: #fff3c4; padding: 1px 8px; border-radius: 999px; margin-right: 6px; }
.g-answer { margin: 4px 0 8px; font-size: 18px; }
.g-answer strong { color: #078c49; font-size: 20px; }
.g-remember { margin: 0; padding-top: 10px; border-top: 1px dashed #c9dbe9; }
.g-related ul { padding-left: 0; }
.g-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
.g-card { border: 1px solid #dbe6f0; border-radius: 14px; padding: 18px 20px; background: #fff; }
.g-card h2 { font-size: 20px; margin: 0 0 6px; }
.g-card a { text-decoration: none; color: inherit; }
.g-cta { display: inline-block; padding: 11px 18px; border-radius: 12px; background: #078c49; color: #fff !important; text-decoration: none; font-weight: 700; }
.g-cta:hover { background: #076e3a; }

html.dark .g-page { color: #d9e2ee; }
html.dark .g-page h1, html.dark .g-page h2, html.dark .g-page h3 { color: #f4f4ef; }
html.dark .g-head, html.dark .g-steps li { border-color: #26262e; }
html.dark .g-intro, html.dark .g-question { color: #aab4c3; }
html.dark .g-crumbs { color: #9aa6b8; }
html.dark .g-kicker, html.dark .g-label, html.dark .g-answer strong { color: #7fe0a0; }
html.dark .g-page a { color: #7fe0a0; }
html.dark .g-example, html.dark .g-card { background: #141418; border-color: #2a2a33; }
html.dark .g-eq { background: #15382a; color: #c9f5dc; }
html.dark .g-steps li::before { border-color: #3fd08a; color: #7fe0a0; }
html.dark .g-remember { border-color: #2a2a33; }
html.dark .g-step-check { background: #4a3f10; color: #fde68a; }

@media (max-width: 700px) {
  .g-page { padding: 20px 16px 56px; font-size: 16px; }
  .g-page h3 { font-size: 17px; }
  .g-example { padding: 16px 14px; }
}

/* Solved questions on a guide: a card grid, the full question on each card. */
.g-qcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
/* Each row matches the solved-questions list elsewhere on the site. The selectors are scoped to .g-page a
   so the general link colour does not override the row's text colour. */
.g-page a.g-qcard { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; border: 1px solid #cfe9dc; border-radius: 12px; background: #fff; color: #1c2a40; font-weight: 400; text-decoration: none; }
.g-page a.g-qcard:hover, .g-page a.g-qcard:focus-visible { border-color: #078c49; }
.g-qcard-topic { align-self: center; padding: 3px 10px; border-radius: 999px; background: #dcfce7; color: #14532d; font-size: 12px; font-weight: 700; text-transform: capitalize; white-space: nowrap; }
.g-qcard-q { flex: 1 1 280px; min-width: 0; font-size: 15px; line-height: 1.5; color: #1c2a40; }
.g-qcard-go { margin-left: auto; font-size: 14px; font-weight: 700; color: #078c49; white-space: nowrap; }
html.dark .g-page a.g-qcard { background: #141418; border-color: #2a3a33; color: #d9e2ee; }
html.dark .g-qcard-topic { background: #15382a; color: #bfe8cf; }
html.dark .g-qcard-q { color: #d9e2ee; }
html.dark .g-qcard-go { color: #7fe0a0; }

/* The formulas: each name sits above its equation, one per row. */
.g-formulas { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.g-formulas li { display: grid; gap: 4px; padding: 12px 16px; border: 1px solid #dbe6f0; border-radius: 12px; background: #fbfdff; }
.g-formula-name { font-size: 14px; font-weight: 700; color: #334862; }
.g-formulas .g-eq { justify-self: start; }
html.dark .g-formulas li { background: #141418; border-color: #2a2a33; }
html.dark .g-formula-name { color: #aab4c3; }

/* Sidebar: the solved questions, the solver and the related calculators, each in its own card.
   Two columns from 900px; below that the sidebar follows the article. */
.g-layout { display: block; max-width: none; }
.g-main { min-width: 0; }
.g-aside { display: grid; gap: 16px; align-content: start; margin-top: 36px; }
.g-card-block { margin: 0; padding: 20px; border: 1px solid #dbe6f0; border-radius: 14px; background: #fbfdff; }
.g-aside h2 { margin: 0 0 14px; font-size: 13px; line-height: 1.3; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #078c49; }
html.dark .g-aside h2 { color: #7fe0a0; }
/* The solved questions are a plain list under its heading; each row is already a card. */
.g-aside .g-related { padding: 0; border: 0; background: none; }
.g-aside .g-related .g-qcards { gap: 0; border-top: 1px solid #dbe6f0; }
/* List view: one question per row, divided by a rule, with no box around each row. */
.g-page .g-aside a.g-qcard { display: grid; gap: 4px; padding: 12px 0; border: 0; border-bottom: 1px solid #dbe6f0; border-radius: 0; background: none; }
.g-page .g-aside a.g-qcard:hover, .g-page .g-aside a.g-qcard:focus-visible { border-color: #dbe6f0; color: #078c49; }
.g-aside .g-qcard-topic { justify-self: start; padding: 2px 8px; font-size: 11px; }
.g-aside .g-qcard-q { flex: none; font-size: 14px; line-height: 1.45; }
.g-aside .g-qcard-go { display: none; }
html.dark .g-page .g-aside a.g-qcard { background: none; border-bottom-color: #2a2a33; }
.g-aside .g-qcards { grid-template-columns: minmax(0, 1fr); }
.g-aside .g-qcard { gap: 6px 10px; }
.g-aside .g-qcard-q { flex-basis: 100%; }
.g-aside .g-qcard-go { margin-left: 0; }
html.dark .g-card-block { background: #141418; border-color: #2a2a33; }
@media (min-width: 900px) {
  .g-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
  .g-aside { position: sticky; top: 16px; margin-top: 36px; }
}
/* The title and the practice card share the top row on desktop. */
.g-top { display: block; }
.g-practice { margin-top: 20px; }
/* The practice card: an uppercase label like the sidebar titles, a full-width button, then the tools. */
.g-practice h2 { margin: 0 0 14px; font-size: 13px; line-height: 1.3; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #078c49; }
.g-practice .g-cta { display: block; width: 100%; box-sizing: border-box; padding: 13px 18px; text-align: center; }
.g-practice .g-next-sub { margin: 22px 0 10px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #334862; }
html.dark .g-practice h2 { color: #7fe0a0; }
html.dark .g-practice .g-next-sub { color: #aab4c3; }
@media (min-width: 900px) {
  .g-top { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
  .g-practice { margin-top: 0; }
}
.g-next-card h2 { margin-top: 0; }
.g-next-text { color: #334862; }
.g-next-sub { margin: 18px 0 8px; font-size: 15px; font-weight: 800; letter-spacing: .02em; color: #0f1d33; }
.g-tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.g-page a.g-tool { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; border: 1px solid #cfe9dc; border-radius: 12px; background: #fff; text-decoration: none; color: #078c49; }
.g-page a.g-tool:hover, .g-page a.g-tool:focus-visible { border-color: #078c49; }
html.dark .g-next-card { background: #141418; border-color: #2a2a33; }
html.dark .g-next-text { color: #aab4c3; }
html.dark .g-next-sub { color: #f4f4ef; }
html.dark .g-page a.g-tool { background: #141418; border-color: #2a3a33; color: #7fe0a0; }
@media (max-width: 700px) { .g-qcard-go { margin-left: 0; } }
