/* /ib-grade-calculator/ : IB Diploma points calculator, 21 Nov 2026. This page only (body.gc).
   Generated markup: tools/grade_calculator_page.py. Loaded after css/site-2026.css. Light mode only.
   Tokens come from site-2026.css: --ink --ink2 --navy --gold --goldt --line --chalk --fu --fd --s26-max --s26-gut. */

body.gc { background: #fff; color: var(--ink); font-family: var(--fu); }
body.gc .gc-main { display: block; overflow-x: clip; }
body.gc .gc-wrap { max-width: calc(var(--s26-max) + var(--s26-gut) * 2); margin-inline: auto; padding-inline: var(--s26-gut); }
body.gc .gc-main a { color: var(--navy); text-underline-offset: 3px; }
body.gc .gc-main a:hover { color: var(--ink); }
body.gc .gc-main a.s26-btn { text-decoration: none; }
body.gc .gc-main a.s26-btn--gold { color: var(--ink); }
body.gc .gc-main a:focus-visible, body.gc .gc-main summary:focus-visible, body.gc .gc-main button:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 3px;
}
body.gc .gc-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* type */
body.gc .gc-main h2 { font: 500 clamp(26px, 3vw, 38px) / 1.15 var(--fd); letter-spacing: -0.01em; color: var(--ink); margin: 6px 0 12px; text-wrap: balance; }
body.gc .gc-label, body.gc .gc-eyebrow { font: 600 12px / 1.3 var(--fu); letter-spacing: 0.14em; text-transform: uppercase; color: var(--goldt); margin: 0; }
body.gc .gc-note { font: 400 15.5px / 1.6 var(--fu); color: var(--ink2); margin: 0 0 12px; max-width: 680px; }
body.gc .gc-sec { padding: clamp(40px, 5.5vw, 76px) 0; scroll-margin-top: 90px; }
body.gc .gc-sec--chalk { background: var(--chalk); }

/* hero */
body.gc .gc-hero { padding: clamp(18px, 3vw, 40px) 0 clamp(18px, 2.4vw, 28px); }
body.gc .gc-crumb { font: 400 14px / 1.4 var(--fu); color: var(--ink2); margin: 0 0 clamp(14px, 2.4vw, 24px); }
body.gc .gc-crumb a { color: var(--ink2); }
body.gc .gc-eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
body.gc .gc-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--gold); flex: none; }
body.gc .gc-hero h1 { font: 500 clamp(32px, 4.6vw, 56px) / 1.07 var(--fd); letter-spacing: -0.015em; margin: 0 0 16px; max-width: 20ch; text-wrap: balance; }
body.gc .gc-hero h1 span { font-style: italic; color: var(--goldt); }
body.gc .gc-lede { font: 400 clamp(16px, 1.5vw, 18.5px) / 1.6 var(--fu); color: var(--ink2); margin: 0; max-width: 680px; }
body.gc .gc-pills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; }
body.gc .gc-pills li { font: 600 13px / 1 var(--fu); color: var(--navy); background: var(--chalk); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }

/* calculator */
body.gc .gc-tool { padding: 8px 0 clamp(40px, 5vw, 64px); }
body.gc .gc-grid { display: grid; gap: 22px; align-items: start; }
@media (min-width: 960px) {
  body.gc .gc-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); }
  body.gc .gc-out { position: sticky; top: 96px; }
}
body.gc .gc-form { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 8px; padding: clamp(20px, 3vw, 30px); min-width: 0; box-shadow: 0 22px 44px -34px rgba(13, 31, 60, 0.45); }
body.gc .gc-rows { display: grid; margin: 14px 0 22px; border-top: 1px solid var(--line); }
body.gc .gc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
body.gc .gc-name { font: 600 15.5px / 1.3 var(--fu); min-width: 0; }
body.gc .gc-lvl { display: inline-flex; border: 1.5px solid var(--navy); border-radius: 999px; overflow: hidden; }
body.gc .gc-lvl label { position: relative; cursor: pointer; }
body.gc .gc-lvl input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
body.gc .gc-lvl span { display: block; font: 600 14px / 1 var(--fu); padding: 12px 16px; min-width: 54px; text-align: center; color: var(--navy); }
body.gc .gc-lvl input:checked + span { background: var(--navy); color: #fff; }
body.gc .gc-lvl input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: -3px; border-radius: 999px; }
body.gc .gc-sel { display: grid; gap: 6px; font: 500 14px / 1.3 var(--fu); color: var(--ink2); }
body.gc .gc-sel select {
  appearance: none; -webkit-appearance: none; font: 700 18px / 1 var(--fu); color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a5a00' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 34px 10px 14px; min-height: 46px; min-width: 78px;
}
body.gc .gc-sel select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
body.gc .gc-core-h { margin-top: 4px; }
body.gc .gc-core { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; align-items: end; margin-top: 10px; }
body.gc .gc-cas { display: flex; gap: 10px; align-items: center; min-height: 46px; font: 600 15px / 1.3 var(--fu); cursor: pointer; }
body.gc .gc-cas input { width: 22px; height: 22px; accent-color: var(--navy); margin: 0; }
body.gc .gc-actions { margin-top: 22px; }
@media (max-width: 560px) {
  body.gc .gc-row { grid-template-columns: 1fr auto; row-gap: 8px; }
  body.gc .gc-name { grid-column: 1 / -1; }
  body.gc .gc-lvl { justify-self: start; }
  body.gc .gc-cas { grid-column: 1 / -1; }
}

/* result */
body.gc .gc-out { background: var(--ink); color: #fff; border-radius: 8px; border-left: 6px solid #8a97ad; padding: clamp(22px, 3vw, 30px); min-width: 0; }
body.gc .gc-out.pass { border-left-color: #3fb27f; }
body.gc .gc-out.fail { border-left-color: #e2604f; }
body.gc .gc-out .gc-label { color: var(--gold); }
body.gc .gc-big { margin: 6px 0 0; display: flex; align-items: baseline; gap: 10px; }
body.gc .gc-big b { font: 500 clamp(64px, 9vw, 96px) / 1 var(--fd); letter-spacing: -0.03em; color: #fff; }
body.gc .gc-big span { font: 500 20px / 1 var(--fu); color: #b8c3d6; }
body.gc .gc-status { font: 600 20px / 1.3 var(--fu); margin: 14px 0 8px; }
body.gc .gc-out.pass .gc-status { color: #7fdcae; }
body.gc .gc-out.fail .gc-status { color: #ffaa9e; }
body.gc .gc-why { margin: 0 0 18px; padding-left: 18px; color: #d4dbe7; font: 400 15px / 1.55 var(--fu); }
body.gc .gc-why li { margin-bottom: 6px; }
body.gc .gc-break { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.16); display: grid; gap: 8px; }
body.gc .gc-break li { display: flex; justify-content: space-between; gap: 12px; font: 400 15px / 1.4 var(--fu); color: #d4dbe7; }
body.gc .gc-break b { font-weight: 700; color: #fff; }

/* phone: result bar at the bottom of the screen */
body.gc .gc-bar { display: none; }
@media (max-width: 959px) {
  body.gc .gc-bar {
    display: flex; align-items: baseline; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 12px max(16px, env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--ink); color: #fff; text-decoration: none; box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.18);
  }
  body.gc .gc-main a.gc-bar, body.gc .gc-main a.gc-bar:hover { color: #fff; text-decoration: none; }
  body.gc .gc-bar b { font: 500 26px / 1 var(--fd); }
  body.gc .gc-bar span { font: 600 14px / 1 var(--fu); opacity: 0.8; }
  body.gc .gc-bar em { font: 600 14px / 1.2 var(--fu); font-style: normal; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.gc .gc-bar i { font: 600 13px / 1 var(--fu); font-style: normal; opacity: 0.85; }
  body.gc .gc-bar.pass em::before { content: "\2713  "; }
  body.gc .gc-bar.fail { background: #7a2330; }
  body.gc .gc-bar.off { display: none; }
  body.gc .s26-ftr { padding-bottom: 72px; }
}
/* Under 600px the site's own bottom bar (.s26-bar: WhatsApp, Call, Book a free trial, 65px) is there too:
   sit just above it, and drop to the edge when it slides away. */
@media (max-width: 599px) {
  body.gc .gc-bar { bottom: calc(65px + env(safe-area-inset-bottom, 0px)); padding-bottom: 12px; transition: bottom 0.25s; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.14); }
  body.gc:has(.s26-bar.is-away) .gc-bar { bottom: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}

/* rules */
body.gc .gc-two { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); }
@media (min-width: 900px) { body.gc .gc-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
body.gc .gc-matrix { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; max-width: 520px; }
body.gc .gc-matrix table { width: 100%; border-collapse: collapse; table-layout: fixed; }
body.gc .gc-matrix th, body.gc .gc-matrix td { text-align: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
body.gc .gc-matrix th { font: 600 12px / 1.2 var(--fu); color: var(--ink2); }
body.gc .gc-matrix tbody th { text-align: left; padding-left: 8px; }
body.gc .gc-matrix td { font: 700 18px / 1 var(--fu); color: var(--ink); }
body.gc .gc-matrix td.x { font: 600 12px / 1 var(--fu); color: #a23a2c; }
body.gc .gc-matrix td.on { background: #fff1cc; outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 6px; }
body.gc .gc-matrix tbody tr:last-child > * { border-bottom: 0; }
body.gc .gc-list { margin: 0 0 18px; padding-left: 20px; display: grid; gap: 10px; font: 400 15.5px / 1.5 var(--fu); color: var(--ink2); }
body.gc .gc-list b { display: block; font-weight: 600; color: var(--ink); }

/* maths grade 7 + trial */
body.gc .gc-maths { list-style: none; margin: 6px 0 16px; padding: 0; border-top: 1px solid var(--line); max-width: 520px; }
body.gc .gc-maths li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font: 600 16px / 1.3 var(--fu); }
body.gc .gc-maths span { font-weight: 700; color: var(--ink); }
body.gc .gc-cta { background: var(--chalk); border-top: 4px solid var(--gold); border-radius: 8px; padding: clamp(22px, 3vw, 32px); align-self: start; }

/* faq */
body.gc .gc-faq { max-width: calc(900px + var(--s26-gut) * 2); }
body.gc .gc-faq__list { margin-top: 18px; border-top: 1px solid var(--line); }
body.gc .gc-q { border-bottom: 1px solid var(--line); }
body.gc .gc-q summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; font: 600 17px / 1.4 var(--fu); color: var(--ink); }
body.gc .gc-q summary::-webkit-details-marker { display: none; }
body.gc .gc-q summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 400 26px / 1 var(--fu); color: var(--goldt); }
body.gc .gc-q[open] summary::after { content: "−"; }
body.gc .gc-q p { margin: 0 0 18px; font: 400 16px / 1.65 var(--fu); color: var(--ink2); max-width: 760px; }

/* link to this */
body.gc .gc-snip { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
body.gc .gc-snip code { flex: 1 1 320px; min-width: 0; overflow-wrap: anywhere; font: 500 13.5px / 1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--chalk); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; color: var(--ink); }

/* related */
body.gc .gc-end { padding-bottom: 36px; }
body.gc .gc-related ul { list-style: none; margin: 0; padding: 22px 0; display: flex; flex-wrap: wrap; gap: 10px 28px; border-top: 1px solid var(--line); font: 600 15.5px / 1.4 var(--fu); }

/* where you stand (IB statistical bulletin bands) */
body.gc .gc-rank { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
body.gc .gc-rank__t { font: 500 15.5px / 1.55 var(--fu); color: #fff; margin: 6px 0 12px; }
body.gc .gc-bands { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
body.gc .gc-bands li { display: grid; grid-template-columns: 52px minmax(0, 1fr) 48px; gap: 8px; align-items: center; font: 500 13px / 1 var(--fu); color: #b8c3d6; }
body.gc .gc-bands i { display: block; height: 10px; border-radius: 3px; background: rgba(255, 255, 255, 0.22); }
body.gc .gc-bands b { text-align: right; font-weight: 600; }
body.gc .gc-bands li.on { color: #fff; }
body.gc .gc-bands li.on i { background: var(--gold); }
body.gc .gc-rank__s { margin: 10px 0 0; font: 400 12.5px / 1.4 var(--fu); color: #8a97ad; }
body.gc .gc-tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin: 4px 0 10px; }
body.gc .gc-table { width: 100%; border-collapse: collapse; font: 400 15px / 1.3 var(--fu); font-variant-numeric: tabular-nums; }
body.gc .gc-table th, body.gc .gc-table td { padding: 10px 10px; text-align: center; border-top: 1px solid var(--line); white-space: nowrap; }
body.gc .gc-table thead th { border-top: 0; background: var(--chalk); font: 600 13px / 1.2 var(--fu); color: var(--ink2); }
body.gc .gc-table tbody th, body.gc .gc-table tfoot th { text-align: left; font-weight: 600; }
body.gc .gc-table tfoot td, body.gc .gc-table tfoot th { font-weight: 700; background: #fff8e6; }
body.gc .gc-src { font-size: 13.5px; }
body.gc .gc-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-self: start; }
body.gc .gc-facts p { margin: 0; background: var(--chalk); border-top: 3px solid var(--gold); border-radius: 8px; padding: 16px; }
body.gc .gc-facts b { display: block; font: 500 clamp(30px, 3.4vw, 40px) / 1 var(--fd); color: var(--ink); }
body.gc .gc-facts span { display: block; margin-top: 8px; font: 400 14.5px / 1.4 var(--fu); color: var(--ink2); }
