/* Shared by the grade calculator and the GPA calculator (moved out of grade-calculator.html 2026-11-22). */
.gc { max-width: 760px; margin: 0 auto; padding: clamp(32px, 6vw, 64px) var(--pad) clamp(56px, 8vw, 96px); }
.gc-eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--red); }
.gc h1 { max-width: none; margin: 0 0 12px; font-size: clamp(32px, 5.6vw, 46px); line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.gc-lede { margin: 0 0 26px; font-size: 17.5px; line-height: 1.55; color: var(--text-dim); max-width: 60ch; }

.gc-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 26px); box-shadow: 0 12px 36px var(--shadow-md); }
.gc-mode { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--bg-raised); border: 1px solid var(--line); margin-bottom: 20px; }
.gc-mode button { font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 0; background: transparent; color: var(--text-dim); cursor: pointer; }
.gc-mode button[aria-pressed="true"] { background: var(--bg-card); color: var(--text); box-shadow: 0 1px 3px var(--shadow-md); }
.gc-mode button:focus-visible, .gc-chip:focus-visible, .gc-link:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.gc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gc-label { font-size: 13px; font-weight: 700; color: var(--text-dim); }
.gc-hint { font-size: 12.5px; color: var(--text-faint); }
.gc-num { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 12px; background: var(--bg); min-width: 0; }
.gc-num:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(29,177,0,.18); }
.gc-num input { flex: 1; width: 100%; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 20px; font-weight: 700; padding: 10px 0; font-variant-numeric: tabular-nums; outline: none; }
.gc-num span { font-size: 16px; font-weight: 700; color: var(--text-faint); white-space: nowrap; }

/* Categories mode */
.gc-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.gc-sub h2 { margin: 0; font-size: 17px; letter-spacing: -0.01em; }
.gc-x { font: inherit; font-size: 13px; border: 0; background: none; color: var(--text-faint); cursor: pointer; padding: 2px 4px; }
.gc-x:hover { color: var(--red); }
.gc-add { font: inherit; font-size: 14px; font-weight: 600; margin-top: 10px; padding: 10px; width: 100%; border-radius: 12px; border: 1.5px dashed var(--line-strong); background: transparent; color: var(--text-dim); cursor: pointer; }
.gc-add:hover { border-color: var(--green); color: var(--text); }
.gc-final { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.gc-note { margin: 10px 0 0; font-size: 13.5px; color: var(--text-faint); }
.gc-note.is-warn { color: #a5420a; }
:root[data-theme="dark"] .gc-note.is-warn { color: #ffb38a; }



.gc-ico { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(29,177,0,.12); color: var(--green-deep); flex: none; }
.gc-ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gc-eyebrow { display: flex; align-items: center; gap: 8px; }

/* Tiers */
.gc-mode button { white-space: nowrap; }
.gc-scale { margin: 0; }
.gc-scale summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.gc-scale summary::-webkit-details-marker { display: none; }
.gc-scale-step { font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.gc-scale-sum { flex: 1; min-width: 0; font-size: 13.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-scale-edit { font-size: 13.5px; font-weight: 700; color: var(--green-deep); }
.gc-scale[open] .gc-scale-edit { visibility: hidden; }
.gc-scale-body { padding: 4px 14px 14px; }
.gc-scale-opts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.gc-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.gc-toggle input { width: 18px; height: 18px; accent-color: var(--green-deep); }
.gc-cuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.gc-cut { display: flex; flex-direction: column; gap: 4px; }
.gc-cut .gc-label { font-size: 13px; color: var(--text); }
.gc-cut .gc-num input { font-size: 16px; padding: 7px 0; }
.gc-cut .gc-num span { font-size: 13px; }


.gc-foot #gc-reset { white-space: nowrap; }


.gc-ico.amber { background: rgba(232,150,15,.14); color: #B86E00; }
.gc-ico.blue { background: rgba(47,111,219,.12); color: #2F6FDB; }



/* Categories: one table */
.gc-table { display: grid; gap: 6px; }
.gc-tr { display: grid; grid-template-columns: minmax(0, 1fr) 92px 92px 112px 30px; gap: 8px; align-items: center; }
.gc-th { font-size: 12.5px; font-weight: 700; color: var(--text-faint); padding: 8px 2px 6px; position: sticky; top: var(--gc-hdr, 0px); z-index: 5; background: var(--bg-card); box-shadow: 0 6px 6px -6px rgba(20,20,40,.18); margin-top: -8px; }
.gc-th span { white-space: nowrap; }
.gc-th span:nth-child(4) { text-align: center; }
.gc-cell-in { font: inherit; font-size: 16px; font-weight: 600; width: 100%; min-width: 0; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font-variant-numeric: tabular-nums; }
.gc-cell-in:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(29,177,0,.18); }
.gc-cell-name { background: var(--bg-card); }
.gc { --est: #2B62D9; --est-bg: rgba(43,98,217,.07); --est-line: rgba(43,98,217,.24); }
:root[data-theme="dark"] .gc { --est: #9DBBFF; --est-bg: rgba(120,160,255,.10); --est-line: rgba(120,160,255,.30); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gc { --est: #9DBBFF; --est-bg: rgba(120,160,255,.10); --est-line: rgba(120,160,255,.30); } }
/* Anything not set in stone (not graded yet, or partly graded) shares one blue. */
.gc-tr.is-todo:not(.is-final) { padding: 8px; margin: 0 -8px; border-radius: 14px; background: var(--est-bg); border: 1px solid var(--est-line); }
.gc-tr.is-todo:not(.is-final) .gc-cell-in { background: var(--bg-card); }
.gc-tr.is-todo .gc-cell-score, .gc-group .gc-cell-score { border-style: dashed; border-color: var(--est-line); color: var(--est); font-style: italic; font-weight: 700; }
.gc-gsel { font-size: 14px; padding: 9px 6px 9px 10px; cursor: pointer; }
.gc-gsel.is-some, .gc-gsel.is-none { border-color: var(--est-line); color: var(--est); }
.gc-group { display: grid; gap: 8px; padding: 8px; margin: 0 -8px; border-radius: 14px; background: var(--est-bg); border: 1px solid var(--est-line); }
.gc-group .gc-cell-in { background: var(--bg-card); }
.gc-sub-line { padding: 0 2px 2px; }
.gc-sub-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--text-dim); }
.gc-sub-fields { flex-direction: column; align-items: flex-start; gap: 8px; }
.gc-pair { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gc-small { width: 64px; padding: 6px 8px; text-align: center; font-size: 15px; }
.gc-dot { color: var(--text-faint); }
.gc-tr.is-fixed { padding: 2px 0; }
.gc-tr.is-final { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.gc-cell-fixed { font-size: 17.5px; font-weight: 800; letter-spacing: -0.01em; padding: 0 2px; }
.gc-cell-blank { text-align: center; color: var(--text-faint); font-weight: 700; }
.gc-rm { font: inherit; font-size: 20px; line-height: 1; border: 0; background: none; color: var(--text-faint); cursor: pointer; padding: 4px; }
.gc-rm:hover { color: var(--red); }
.gc-adds { display: flex; justify-content: flex-end; gap: 16px; margin: -2px 0 0; }
.gc-replace { margin-top: 6px; font-size: 14px; color: var(--text-dim); justify-self: start; }
.gc-replace-note { margin: -2px 0 0 26px; font-size: 13px; color: var(--text-faint); }
.gc-replace-note:empty { display: none; }
.gc-adds .gc-add { margin: 0; width: auto; padding: 2px 0; font-size: 13px; font-weight: 700; border: 0; background: none; color: var(--green-deep); border-radius: 0; }
.gc-adds .gc-add:hover { color: var(--text); text-decoration: underline; }
.gc-tr.is-extra .gc-cell-name { background: rgba(29,177,0,.05); }
.gc-ec { font-size: 13px; color: var(--green-deep); }
.gc-calcbox.is-wide { grid-column: span 3; font-size: 13px; }
.gc-calcbox { display: grid; place-items: center; align-self: stretch; min-height: 42px; padding: 4px 6px; border-radius: 10px; background: rgba(29,177,0,.12); border: 1px solid rgba(29,177,0,.35); color: var(--green-deep); font-size: 12px; font-weight: 700; line-height: 1.15; text-align: center; }
@media (max-width: 640px) {
  /* Phones and narrow windows: name on its own line, then weight · score · graded under the pinned
     headers. Switches at 640px so the name box never gets squeezed beside the number boxes. */
  .gc-tr { grid-template-columns: minmax(0, .85fr) minmax(0, .85fr) minmax(0, 1.6fr) 20px; grid-template-areas: "n n n x" "a b c ."; gap: 6px; }
  .gc-tr > :nth-child(1) { grid-area: n; } .gc-tr > :nth-child(2) { grid-area: a; } .gc-tr > :nth-child(3) { grid-area: b; }
  .gc-tr > :nth-child(4) { grid-area: c; } .gc-tr > :nth-child(5) { grid-area: x; }
  .gc-th { grid-template-areas: "a b c x"; }
  .gc-th > :nth-child(1) { display: none; }
  .gc-tr:not(.gc-th) + .gc-tr:not(.gc-th), .gc-group + .gc-tr { border-top: 1px solid var(--line); padding-top: 8px; }
  .gc-tr.is-final { grid-template-areas: "n n n x" "a b c ."; }
  .gc-tr.is-final:has(.is-wide) { grid-template-areas: "n n n n" "a b b b"; }
  .gc-tr.is-final .gc-calcbox.is-wide { font-size: 12.5px; }
  .gc-tr.is-final .gc-calcbox:not(.is-wide) { font-size: 11px; line-height: 1.15; padding: 3px 2px; text-align: center; }
  .gc-sub-fields { font-size: 13.5px; }
  .gc-th { font-size: 11px; }
  .gc-dot { display: none; }
  .gc-pair { flex-wrap: nowrap; max-width: 100%; font-size: 13.5px; line-height: 1.25; }
  .gc-pair > span { white-space: nowrap; }
  /* The long label wraps inside its tinted box on the narrowest phones instead of running out of it. */
  .gc-pair > span:last-child { white-space: normal; min-width: 0; }
  /* 16px on every box: iPhones zoom the page when a smaller field is tapped. */
  .gc-small { width: 50px; padding: 6px 4px; font-size: 16px; }
  .gc-cell-in { font-size: 16px; padding: 8px 7px; }
  .gc-cell-in[type="number"] { text-align: left; padding: 8px 8px; }
  .gc-rm { padding: 0; font-size: 18px; }
}
@media (max-width: 350px) {
  /* The very smallest phones: the number row runs to the edge so "Partially" and 3-digit numbers fit. */
  .gc-tr:not(.is-final) { grid-template-areas: "n n n x" "a b c c"; }
  .gc-th { grid-template-areas: "a b c c"; font-size: 10px; }
  .gc-cell-in[type="number"] { padding: 8px 6px; }
}


/* Advanced mode: same page, same layout. The card picks up a soft green wash so it reads as
   a different mode without the page changing. Works on light and dark grounds. */
.gc-card { position: relative; transition: background-color .3s ease, border-color .3s ease; }
.gc-card.is-advanced { background-image: linear-gradient(180deg, rgba(29,177,0,.10), rgba(29,177,0,.04)); border-color: rgba(29,177,0,.32); }
.gc-adv-tag { display: none; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--green-deep); background: rgba(29,177,0,.10); border: 1px solid rgba(29,177,0,.30); }
.gc-card.is-advanced .gc-adv-tag { display: inline-flex; align-items: center; gap: 5px; position: relative; }
.gc-adv-tag svg { width: 13px; height: 13px; fill: #F5B301; stroke: none; flex: none; }
/* Switching to Advanced: the bolt strikes, a ring pops off the tag, and a few equations drift out and fade. About a second. */
.gc-adv-tag.is-strike svg { animation: gc-bolt .7s ease-out; }
.gc-adv-tag.is-strike::after { content: ""; position: absolute; inset: 0; border-radius: 999px; border: 2px solid #F5B301; animation: gc-ring .7s ease-out forwards; pointer-events: none; }
@keyframes gc-bolt { 0% { transform: scale(.2) rotate(-25deg); opacity: 0; } 35% { transform: scale(1.9) rotate(8deg); opacity: 1; filter: drop-shadow(0 0 6px #F5B301); } 55% { opacity: .4; } 70% { opacity: 1; } 100% { transform: none; filter: none; } }
@keyframes gc-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.7, 2.4); opacity: 0; } }
.gc-eq { position: absolute; left: 50%; top: 50%; font-family: "Iowan Old Style", Georgia, serif; font-style: italic; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap; color: var(--green-deep); opacity: 0; pointer-events: none; animation: gc-eq 1.3s ease-out forwards; }
@keyframes gc-eq { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 25% { opacity: .9; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1); } }
@media (prefers-reduced-motion: reduce) { .gc-card { transition: none; } }

/* Results: one card per grade */
.gc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.gc-cards { container-type: inline-size; }
.gc-cards.is-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gc-cards.is-five .gc-card-g .v { font-size: clamp(16px, 4cqi, 26px); }
.gc-cards.is-five .gc-card-g.is-out .v, .gc-cards.is-five .gc-card-g.is-locked .v, .gc-cards.is-five .gc-card-g.is-f .v { font-size: clamp(11px, 2.2cqi, 15px); line-height: 1.2; letter-spacing: -0.01em; }
.gc-cards.is-five .gc-card-g { padding: 12px; }
.gc-card-g { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); font-variant-numeric: tabular-nums; }
.gc-card-g .l { font-size: 21px; font-weight: 800; line-height: 1; color: var(--text); letter-spacing: -0.01em; }
.gc-card-g.is-out .l { color: #C25A4C; }
.gc-card-g .v { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--text); }
.gc-card-g .v { white-space: nowrap; }
.gc-card-g.is-out .v, .gc-card-g.is-locked .v, .gc-card-g.is-f .v { white-space: normal; }
.gc-card-g.is-f .v { font-size: 17px; color: var(--text-dim); }
.gc-card-g .v small { font-size: 14px; font-weight: 700; color: var(--text-dim); letter-spacing: 0; }
.gc-card-g .s { font-size: 13.5px; font-weight: 700; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.gc-card-g.is-bump { animation: gc-bump .5s ease-out; }
@keyframes gc-bump { 0% { box-shadow: 0 0 0 0 rgba(29,177,0,.32); border-color: rgba(29,177,0,.55); } 100% { box-shadow: 0 0 0 7px rgba(29,177,0,0); } }
@media (prefers-reduced-motion: reduce) { .gc-card-g.is-bump { animation: none; } }
.gc-card-g.is-locked { background: rgba(29,177,0,.08); border-color: rgba(29,177,0,.3); }
.gc-card-g.is-locked .v { color: var(--green-deep); font-size: 16px; }
.gc-card-g.is-out { background: rgba(238,34,12,.05); border: 1px dashed rgba(238,34,12,.35); }
.gc-card-g.is-out .v { color: #C25A4C; font-size: 15px; }
:root[data-theme="dark"] .gc-card-g.is-out .l, :root[data-theme="dark"] .gc-card-g.is-out .v { color: #FF9A8A; }
.gc-empty { margin: 0; color: var(--text-faint); }
@media (max-width: 640px) {
  .gc-cards.is-five .gc-card-g.is-out .v, .gc-cards.is-five .gc-card-g.is-locked .v, .gc-cards.is-five .gc-card-g.is-f .v { font-size: 16px; }
  .gc-cards, .gc-cards.is-five { grid-template-columns: 1fr; gap: 8px; }
  .gc-cards.is-five .gc-card-g { padding: 12px 16px; }
  .gc-cards.is-five .gc-card-g:not(.is-out):not(.is-locked):not(.is-f) .v { font-size: 24px; }
  .gc-card-g { flex-direction: row; align-items: baseline; justify-content: space-between; padding: 12px 16px; }
  .gc-card-g .l { font-size: 21px; }
}


/* Three steps, each its own box */
.gc-card { display: grid; gap: 12px; }
.gc-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.gc-head { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin: 2px 2px 4px; }
.gc-head .gc-mode { margin: 0 0 0 auto; }
.gc-step-h { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); flex: 1 1 200px; min-width: 0; text-wrap: balance; }
.gc-title { white-space: nowrap; }
@media (max-width: 520px) { .gc-head .gc-title { flex-basis: 100%; } .gc-head .gc-mode button { padding: 6px 10px; font-size: 13.5px; } .gc-adv-word { display: none; } .gc-stephead { flex-wrap: wrap; } .gc-tr.is-todo:not(.is-final), .gc-group { border-top: 1px solid var(--est-line) !important; margin-top: 6px; } }
.gc-title .gc-ico { width: 32px; height: 32px; border-radius: 10px; }
.gc-title .gc-ico svg { width: 18px; height: 18px; }
.gc-stepbox { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 16px; background: var(--bg-card); min-width: 0; }
.gc-stephead { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.gc-stepnum { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green-deep); color: #fff; font-size: 13.5px; font-weight: 800; flex: none; }
.gc-stephead .gc-mode { margin: 0; }
#gc-quick:empty { display: none; }
.gc-res-h { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); flex: 1; min-width: 0; }
.gc-stepbox .gc-scale { margin: 0; border: 0; background: none; }
.gc-stepbox .gc-scale summary { padding: 0; gap: 12px; }
.gc-stepbox .gc-scale-step { font-size: 16px; }
.gc-stepbox .gc-scale-body { padding: 14px 0 0; }
.gc-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 0; border: 0; }
.gc-printbtn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 700; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-card); color: var(--text); cursor: pointer; }
.gc-printbtn { margin-top: 14px; padding: 12px 22px; font-size: 15.5px; border-color: transparent; background: var(--green-deep); color: #fff; box-shadow: 0 6px 16px rgba(0,144,74,.25); }
.gc-printbtn:hover { filter: brightness(1.06); }
.gc-follow { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 26px auto 0; text-align: center; }
.gc-follow img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 3.5px #D62976; }
.gc-follow p { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; color: var(--text-dim); }
.gc-follow strong { font-size: 16px; color: var(--text); }
.gc-follow-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; font-size: 14.5px; font-weight: 700; color: #fff; text-decoration: none; background: linear-gradient(45deg, #F58529, #DD2A7B 50%, #8134AF); box-shadow: 0 6px 16px rgba(221,42,123,.25); }
.gc-follow-pill:hover { filter: brightness(1.07); }
.gc-follow-pill:focus-visible { outline: 2px solid #DD2A7B; outline-offset: 3px; }
.gc-follow-pill svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.gc-card-g.is-here { position: relative; border: 1px solid var(--text); box-shadow: 0 0 0 1.5px var(--text); }
.gc-here { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); padding: 3px 9px; border-radius: 999px; background: var(--text); color: var(--bg-card); font-size: 11px; font-weight: 800; line-height: 1.2; white-space: nowrap; letter-spacing: 0; }
/* Step 3 shows the printout's grade bar, sized for the screen. */
.gc-ruler { --u: 1.3px; --ink: var(--text); --faint: var(--text-faint); }
.gc-ruler .ps-ruler { margin: 0; }
.gc-ruler .ps-rbar { height: auto; min-height: 60px; border-radius: 12px; }
.gc-ruler .ps-rbar span { padding: 9px 2px; gap: 4px; }
.gc-ruler .ps-rbar span i { white-space: normal; text-align: center; line-height: 1.15; }
.gc-ruler .ps-rtag { color: var(--bg-card); font-size: 11.5px; padding: 4px 10px; }
.gc-ruler .ps-rcap { font-size: 12.5px; margin-top: 10px; }
.ps-ruler.is-bare { padding-top: 0; }
@media (max-width: 520px) {
  .gc-ruler { --u: 1.15px; }
  /* Twelve grades: two rows of six, and the outlined block alone marks where the score lands. */
  .gc-ruler .ps-rbar.is-many { flex-wrap: wrap; }
  .gc-ruler .ps-rbar.is-many span { flex: 0 0 16.666%; border-bottom: 1.5px solid var(--bg); }
  .gc-ruler .ps-rbar.is-many span b { font-size: 14px; }
  .gc-ruler .ps-rbar.is-many span i { font-size: 10.5px; }
  .gc-ruler .ps-ruler:has(.is-many) { padding-top: 0; }
  .gc-ruler .ps-ruler:has(.is-many) .ps-rpin { display: none; }
  .gc-ruler .ps-rbar span i[data-short] { font-size: 0; }
  .gc-ruler .ps-rbar span i[data-short]::after { content: attr(data-short); font-size: calc(9 * var(--u)); }
}
/* Try a score: what the class grade becomes with a given final. */
.gc-try { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 600; color: var(--text-dim); }
.gc-try.gc-goalrow { margin-top: 0; padding-top: 0; border-top: 0; }
.gc-pfields .gc-num { background: var(--bg-card); }
.gc-step { display: inline-flex; align-items: center; gap: 6px; }
.gc-step button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--bg-card); color: var(--text); font: inherit; font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; }
.gc-step button:hover { border-color: var(--green-deep); }
.gc-step button:focus-visible { outline: 2px solid var(--green-deep); outline-offset: 2px; }
.gc-pgoal-row output { display: inline-flex; align-items: baseline; gap: 6px; font-size: 14.5px; font-weight: 600; color: var(--text-dim); }
.gc-pgoal-row output b { font-size: 18px; font-weight: 800; color: var(--text); }
.gc-pgoal-row output small { font-size: 14.5px; font-weight: 700; }
.gc-try .gc-mode { margin: 0; padding: 3px; }
.gc-try .gc-mode button { padding: 6px 9px; font-size: 13px; }
.gc-try .gc-cell-in { width: 72px; flex: none; height: 40px; padding: 6px 8px; }
.gc-try { gap: 8px; }
.gc-try .gc-num { width: 96px; }
.gc-try .gc-cell-in[hidden] { display: none; }
.gc-try output small { font-size: 15px; font-weight: 700; color: var(--text-dim); }
.gc-try .gc-num { width: 108px; flex: none; }
.gc-try .gc-num input { font-size: 17px; padding: 7px 0; }
.gc-try output { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gc-try output b { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.gc-try output i { font-style: normal; display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 9px; border-radius: 11px; background: var(--green-deep); color: #fff; font-size: 19px; font-weight: 800; }
.gc-try output i.is-f { background: #C25A4C; }
.gc-try output.is-ghost { color: var(--text-faint); }
.gc-try output.is-ghost b { color: var(--text-faint); }
.gc-try output.is-ghost i { background: var(--tint-3); color: var(--text-faint); }
@media (max-width: 520px) { .gc-try output { margin-left: 0; flex-basis: 100%; } }
.gc-pbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.gc-pbtns .gc-printbtn { padding: 8px 15px; font-size: 14px; gap: 7px; box-shadow: none; }
.gc-pbtns .gc-printbtn svg { width: 15px; height: 15px; }
.gc-pbtns .gc-printbtn { margin-top: 0; }
.gc-pbtns #gc-preview { order: 3; }
/* Preview: the printout on a sheet of paper, with Print and Download under it. */
.gc-pv { width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 18px; background: var(--bg-raised); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden; }
.gc-pv[open] { display: flex; flex-direction: column; }
.gc-pv::backdrop { background: rgba(10,12,20,.55); }
.gc-pv-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; font-weight: 800; font-size: 16px; }
.gc-pv-x { font: inherit; font-size: 22px; line-height: 1; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--tint-2); color: var(--text); cursor: pointer; }
.gc-pv-scroll { overflow: auto; padding: 4px 18px 18px; min-height: 0; }
.gc-pv-paper { background: #fff; aspect-ratio: 8.5 / 11; padding: 5.9% 7.06%; box-shadow: 0 2px 14px rgba(0,0,0,.18); border-radius: 4px; }
.gc-pv-paper { display: flex; flex-direction: column; }
.gc-pv-paper .gc-sheet { display: flex; flex-direction: column; flex: 1; }
.gc-pv-paper .ps-page { min-height: 0; flex: 1; }
.gc-pv-paper .ps-page > div { flex: 1; }
.gc-pv-bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); }
.gc-pv-bar .gc-printbtn { margin-top: 0; flex: 1; justify-content: center; white-space: nowrap; padding: 11px 12px; width: auto; }
@media print { .gc-pv { display: none !important; } }
.gc-printbtn.is-alt { background: var(--bg-card); color: var(--text); border-color: var(--line-strong); box-shadow: none; }
.gc-printbtn.is-alt:hover { filter: none; border-color: var(--green-deep); }
.gc-printbtn[disabled] { opacity: .6; cursor: default; }
.gc-pfields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gc-pgoal { grid-column: 1 / -1; }
.gc-pgoal-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gc-pgoal-row .gc-mode { margin: 0; }
.gc-pgoal-row .gc-cell-in { width: 130px; flex: none; }
.gc-pgoal-row .gc-cell-in[hidden] { display: none; }
.gc-pfields .gc-label i { font-style: normal; font-weight: 500; color: var(--text-faint); }
.gc-pfields .gc-cell-in { height: 42px; background: var(--bg-card); }
@media (max-width: 640px) { .gc-pfields { grid-template-columns: 1fr; } .gc-printbtn { width: 100%; justify-content: center; } }
.gc-foot { justify-content: space-between !important; }
.gc-share { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13.5px; font-weight: 700; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-card); color: var(--text); cursor: pointer; }
.gc-share:hover { border-color: var(--green-deep); }
.gc-share:focus-visible { outline: 2px solid var(--green-deep); outline-offset: 2px; }
.gc-share svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* The steps sit on a soft grey so each one reads as its own block on the white card; fields stay white. */
.gc-card .gc-stepbox { background: var(--bg); }
.gc-card .gc-stepbox .gc-cell-in, .gc-card .gc-stepbox .gc-card-g:not(.is-out):not(.is-locked), .gc-card .gc-stepbox .gc-num { background: var(--bg-card); }
.gc-printbtn:focus-visible { outline: 2px solid var(--green-deep); outline-offset: 2px; }
.gc-printbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Printout: laid out like the calculator itself. Built by buildSheet() in grade-calculator.js.
   Hidden on screen. Every size is in --u, a "point" that is a fixed fraction of the sheet's width
   (1pt when the sheet is 7.3in wide), so the page keeps the same proportions in every browser:
   Safari and Chrome scale print differently. buildSheet sets --z to shrink a long list onto one page. */
.gc-sheet { display: none; container-type: inline-size; --u: calc(100cqw / 525.6 * var(--z, 1));
  --ink: #15151B; --dim: #4E4E5A; --faint: #6B6B76; --ln: #E4E4EA; --ln2: #CFCFD8; --g: #00904A;
  color: var(--ink); font-family: Inter, -apple-system, "Helvetica Neue", Arial, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.gc-sheet.is-measuring { display: block; position: absolute; left: -10000px; top: 0; width: 7.3in; visibility: hidden; }
/* The footer sits at the foot of the page: 130% of the width is safely inside a letter page. */
.ps-page { display: flex; flex-direction: column; min-height: 130cqw; }
.gc-sheet.is-measuring .ps-page { min-height: 0; }
@media print {
  @page { size: letter portrait; margin: 0.5in 0.6in; }
  :root { color-scheme: light !important; --bg: #fff; background: #fff !important; }
  body { background: #fff !important; }
  body > *:not(.gc-sheet) { display: none !important; }
  .gc-sheet { display: block; }
}
.ps-top { display: flex; align-items: baseline; justify-content: space-between; gap: calc(16 * var(--u)); }
.ps-date { font-size: calc(9.5 * var(--u)); color: var(--faint); }
#ps-body { flex: 1; }
.ps-title { margin: calc(18 * var(--u)) 0 0; font-size: calc(24 * var(--u)); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.ps-class { display: flex; align-items: baseline; gap: calc(8 * var(--u)); width: calc(259.2 * var(--u)); font-size: calc(10 * var(--u)); color: var(--faint); }
.ps-class.is-set { width: auto; font-size: calc(13 * var(--u)); font-weight: 800; color: var(--ink); }
.ps-class.is-set::after { display: none; }
.ps-meta { display: flex; flex-wrap: wrap; gap: calc(4 * var(--u)) calc(18 * var(--u)); margin: calc(6 * var(--u)) 0 0; font-size: calc(10.5 * var(--u)); color: var(--dim); }
.ps-meta b { color: var(--ink); }
.ps-g-card.is-goal { border: calc(1.6 * var(--u)) solid var(--g); position: relative; }
.ps-g-card.is-goal::after { content: "My goal"; position: absolute; top: calc(-6 * var(--u)); right: calc(8 * var(--u)); padding: calc(1.5 * var(--u)) calc(6 * var(--u)); border-radius: calc(99 * var(--u)); background: var(--g); color: #fff; font-size: calc(7.5 * var(--u)); font-weight: 800; }
.ps-class::after { content: ""; flex: 1; border-bottom: calc(0.75 * var(--u)) solid var(--ln2); }
.ps-top { align-items: flex-end; }
.ps-class, .ps-class.is-set { width: calc(300 * var(--u)); font-size: calc(24 * var(--u)); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; color: var(--ink); }
.ps-class.is-set { width: auto; }
.ps-meta { margin-top: calc(9 * var(--u)); }
.ps-cell.is-strong { font-size: calc(12 * var(--u)); font-weight: 800; }
.ps-ruler { position: relative; padding-top: calc(28 * var(--u)); margin: 0 calc(2 * var(--u)); }
.ps-rbar { display: flex; height: calc(44 * var(--u)); border-radius: calc(8 * var(--u)); overflow: hidden; }
.ps-rbar span { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(2 * var(--u)); }
.ps-rbar span b { font-size: calc(14 * var(--u)); font-weight: 800; line-height: 1; }
.ps-rbar span i { font-style: normal; font-size: calc(9 * var(--u)); font-weight: 700; line-height: 1; white-space: nowrap; }
.ps-rbar.is-many span b { font-size: calc(11 * var(--u)); }
.ps-rbar.is-many span i { font-size: calc(7.5 * var(--u)); }
.ps-rbar span + span { border-left: calc(1.2 * var(--u)) solid #fff; }
.ps-rpin { position: absolute; top: calc(21 * var(--u)); width: 0; height: calc(7 * var(--u)); }
.ps-rpin::after { content: ""; position: absolute; left: calc(-4.5 * var(--u)); bottom: calc(-1 * var(--u)); border-left: calc(4.5 * var(--u)) solid transparent; border-right: calc(4.5 * var(--u)) solid transparent; border-top: calc(6 * var(--u)) solid var(--ink); }
.ps-rbar span.is-goal { box-shadow: inset 0 0 0 calc(1.8 * var(--u)) var(--ink); }
.ps-rtag { position: absolute; bottom: 100%; left: 0; transform: translateX(-50%); padding: calc(3 * var(--u)) calc(8 * var(--u)); border-radius: calc(99 * var(--u)); background: var(--ink); color: #fff; font-size: calc(9 * var(--u)); font-weight: 800; white-space: nowrap; }
.ps-rtag.is-right { transform: translateX(-88%); }
.ps-rtag.is-left { transform: translateX(-12%); }
.ps-rticks { position: relative; height: calc(13 * var(--u)); margin-top: calc(8 * var(--u)); font-size: calc(8.5 * var(--u)); font-weight: 700; color: var(--dim); font-variant-numeric: tabular-nums; }
.ps-rticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.ps-rticks span.is-start { transform: none; }
.ps-rticks span.is-end { transform: translateX(-100%); }
.ps-rcap { margin: calc(12 * var(--u)) 0 0; font-size: calc(8.5 * var(--u)); color: var(--faint); }
.ps-hero { margin-top: calc(14 * var(--u)); padding: calc(16 * var(--u)) calc(16 * var(--u)) calc(12 * var(--u)); border: calc(1 * var(--u)) solid rgba(0,144,74,.4); border-radius: calc(14 * var(--u)); background: rgba(29,177,0,.06); break-inside: avoid; }
.ps-hero-l { display: block; text-align: center; font-size: calc(11.5 * var(--u)); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--g); }
.ps-hero-row { display: grid; grid-template-columns: 1fr 1fr; margin: calc(14 * var(--u)) 0 calc(22 * var(--u)); }
.ps-hero-row div { display: flex; flex-direction: column; align-items: center; gap: calc(5 * var(--u)); text-align: center; }
.ps-hero-row div + div { border-left: calc(0.75 * var(--u)) solid rgba(0,144,74,.3); }
.ps-hero-row b { display: flex; align-items: baseline; gap: calc(10 * var(--u)); font-size: calc(36 * var(--u)); font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.ps-hero-row b i { font-style: normal; letter-spacing: 0; }
.ps-hero-row span { font-size: calc(10.5 * var(--u)); color: var(--dim); }
.ps-hero + .ps-card { margin-top: calc(10 * var(--u)); }
.ps-try { margin: calc(9 * var(--u)) calc(2 * var(--u)) 0; font-size: calc(10.5 * var(--u)); color: var(--dim); }
.ps-try b { color: var(--ink); }

.ps-card { margin-top: calc(14 * var(--u)); display: grid; gap: calc(8 * var(--u)); }
.ps-ctitle { display: flex; align-items: center; gap: calc(8 * var(--u)); margin: 0 calc(1 * var(--u)) calc(1 * var(--u)); font-size: calc(15 * var(--u)); font-weight: 800; letter-spacing: -0.02em; }
.ps-ico { display: inline-grid; place-items: center; width: calc(22 * var(--u)); height: calc(22 * var(--u)); border-radius: calc(7 * var(--u)); background: rgba(29,177,0,.12); color: var(--g); }
.ps-ico svg { width: calc(13 * var(--u)); height: calc(13 * var(--u)); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ps-box { border: calc(0.75 * var(--u)) solid var(--ln); border-radius: calc(12 * var(--u)); padding: calc(9 * var(--u)) calc(11 * var(--u)) calc(10 * var(--u)); break-inside: avoid; }
.ps-head { display: flex; align-items: center; gap: calc(8 * var(--u)); margin-bottom: calc(7 * var(--u)); }
.ps-num { display: inline-grid; place-items: center; width: calc(18 * var(--u)); height: calc(18 * var(--u)); border-radius: 50%; background: var(--g); color: #fff; font-size: calc(9.5 * var(--u)); font-weight: 800; flex: none; }
.ps-head h3 { margin: 0; font-size: calc(11.5 * var(--u)); font-weight: 700; }
.ps-tag { margin-left: auto; padding: calc(2.5 * var(--u)) calc(9 * var(--u)); border-radius: calc(99 * var(--u)); background: #F1F1F4; font-size: calc(8.5 * var(--u)); font-weight: 700; color: var(--dim); }

.ps-fields { display: grid; grid-template-columns: 1fr 1fr; gap: calc(10 * var(--u)); }
.ps-field { display: flex; flex-direction: column; gap: calc(1 * var(--u)); }
.ps-label { font-size: calc(9 * var(--u)); font-weight: 700; color: var(--dim); }
.ps-val { font-size: calc(17 * var(--u)); font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.ps-val i { font-style: normal; }

.ps-table { display: grid; }
.ps-tr { display: grid; grid-template-columns: minmax(0, 1fr) calc(70 * var(--u)) calc(70 * var(--u)) calc(66 * var(--u)); gap: calc(6 * var(--u)); align-items: center; padding: calc(3.5 * var(--u)) calc(2 * var(--u)); border-top: calc(0.5 * var(--u)) solid #EDEDF1; }
.ps-th { font-size: calc(8.5 * var(--u)); font-weight: 700; color: var(--faint); border-top: 0; padding-top: 0; }
.ps-th span:nth-child(4) { text-align: center; }
.ps-cell { line-height: 1.25; font-size: calc(11 * var(--u)); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-cell.is-todo { color: #2B62D9; font-style: italic; }
.ps-g { line-height: 1.25; padding: calc(2 * var(--u)) calc(4 * var(--u)); border-radius: calc(99 * var(--u)); font-size: calc(8.5 * var(--u)); font-weight: 700; text-align: center; }
.ps-g.is-all { background: rgba(29,177,0,.10); color: var(--g); }
.ps-g.is-some, .ps-g.is-none { background: rgba(43,98,217,.10); color: #2B62D9; }
.ps-group { break-inside: avoid; }
.ps-sub { margin: calc(-1.5 * var(--u)) calc(2 * var(--u)) calc(4 * var(--u)); font-size: calc(9 * var(--u)); color: var(--faint); white-space: pre-wrap; }
.ps-replace { margin: calc(3 * var(--u)) calc(2 * var(--u)) 0; }
.ps-ec { grid-column: span 2; font-size: calc(9 * var(--u)); color: var(--g); }
.ps-tr.is-final { border-top: calc(0.75 * var(--u)) solid var(--ln2); padding-top: calc(6 * var(--u)); margin-top: calc(2 * var(--u)); }
.ps-fname { font-size: calc(12 * var(--u)); font-weight: 800; }
.ps-calc { justify-self: start; padding: calc(3.5 * var(--u)) calc(10 * var(--u)); border-radius: calc(99 * var(--u)); background: rgba(29,177,0,.12); color: var(--g); font-size: calc(8.5 * var(--u)); font-weight: 700; white-space: nowrap; }
.ps-calc.is-wide { grid-column: span 2; }

.ps-box:has(.ps-scale) .ps-head { margin-bottom: calc(6 * var(--u)); }
.ps-scale { display: flex; flex-wrap: wrap; gap: calc(3 * var(--u)) calc(12 * var(--u)); font-size: calc(10.5 * var(--u)); font-weight: 600; color: var(--dim); font-variant-numeric: tabular-nums; }
.ps-scale b { color: var(--ink); font-weight: 800; }

.ps-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: calc(6 * var(--u)); }
.ps-cards.is-many { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ps-g-card { display: flex; flex-direction: column; gap: calc(3 * var(--u)); padding: calc(9 * var(--u)) calc(10 * var(--u)); border-radius: calc(11 * var(--u)); border: calc(0.75 * var(--u)) solid var(--ln); background: #FAFAFB; font-variant-numeric: tabular-nums; break-inside: avoid; }
.ps-g-card .l { font-size: calc(15 * var(--u)); font-weight: 800; line-height: 1; letter-spacing: -0.01em; }
.ps-g-card .v { font-size: calc(19 * var(--u)); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap; }
.ps-g-card .s { font-size: calc(9.5 * var(--u)); font-weight: 700; color: var(--faint); }
.ps-g-card.is-locked { background: rgba(29,177,0,.08); border-color: rgba(29,177,0,.3); }
.ps-g-card.is-locked .v { color: var(--g); }
.ps-g-card.is-out { background: rgba(238,34,12,.05); border: calc(0.75 * var(--u)) dashed rgba(238,34,12,.35); }
.ps-g-card.is-out .l, .ps-g-card.is-out .v { color: #C25A4C; }
.ps-g-card.is-f .v { color: var(--dim); }
.ps-g-card.is-locked .v, .ps-g-card.is-out .v, .ps-g-card.is-f .v { font-size: calc(10.5 * var(--u)); font-weight: 700; letter-spacing: 0; line-height: 1.25; white-space: normal; padding-top: calc(3 * var(--u)); }
.ps-cards.is-many .ps-g-card { padding: calc(7 * var(--u)) calc(8 * var(--u)); }
.ps-cards.is-many .ps-g-card .l { font-size: calc(13 * var(--u)); }
.ps-cards.is-many .ps-g-card .v { font-size: calc(15 * var(--u)); }
.ps-cards.is-many .ps-g-card.is-locked .v, .ps-cards.is-many .ps-g-card.is-out .v, .ps-cards.is-many .ps-g-card.is-f .v { font-size: calc(9 * var(--u)); }
.ps-cards.is-many .ps-g-card .s { font-size: calc(8.5 * var(--u)); }
.ps-empty { margin: 0; font-size: calc(11 * var(--u)); color: var(--dim); }


.ps-foot { display: flex; flex-direction: column; align-items: center; gap: calc(5 * var(--u)); margin-top: calc(13 * var(--u)); padding-top: calc(8 * var(--u)); border-top: calc(0.75 * var(--u)) solid var(--ln); break-inside: avoid; }
.ps-qr { width: calc(47.52 * var(--u)); height: calc(47.52 * var(--u)); flex: none; }
.ps-foot-t { display: flex; flex-direction: column; gap: calc(2 * var(--u)); font-size: calc(9.5 * var(--u)); color: var(--dim); }
.ps-foot-t strong { font-size: calc(11 * var(--u)); color: var(--ink); }
.ps-src { font-size: calc(8 * var(--u)); color: var(--faint); }
.ps-logo { height: calc(18 * var(--u)); width: auto; flex: none; }

.gc-scale-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gc-stepbox .gc-scale summary { align-items: flex-start; }
.gc-stepbox .gc-scale summary .gc-stepnum { margin-top: 1px; }
.gc-scale-titles .gc-scale-sum { white-space: normal; font-size: 14.5px; font-weight: 600; color: var(--text-dim); }
.gc-scale-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.gc-scale-btns button { font: inherit; font-size: 14px; font-weight: 700; padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.gc-scale-reset { border: 1px solid var(--line-strong); background: var(--bg-card); color: var(--text-dim); }
.gc-scale-done { border: 0; background: var(--green-deep); color: #fff; }


/* The math in words: static text for search engines and AI that don't run the calculator (tools/gc_copy.py). */
.gc-learn { margin-top: clamp(48px, 7vw, 72px); }
.gc-learn h2 { margin: 0 0 12px; font-size: clamp(22px, 3vw, 26px); letter-spacing: -0.02em; }
.gc-learn h2 + p { margin-top: 0; }
.gc-learn #gc-faq-h { margin-top: clamp(36px, 5vw, 52px); }
.gc-learn h3 { margin: 26px 0 6px; font-size: 17.5px; letter-spacing: -0.01em; }
.gc-learn p { margin: 0 0 12px; font-size: 16px; line-height: 1.6; color: var(--text-dim); }
.gc-formula { padding: 14px 16px; border-radius: 14px; background: rgba(29,177,0,.08); border: 1px solid rgba(29,177,0,.25); color: var(--text) !important; font-variant-numeric: tabular-nums; }
.gc-tscroll { overflow-x: auto; margin: 14px 0 22px; }
.gc-lookup { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.gc-lookup caption { text-align: left; font-weight: 700; color: var(--text); padding-bottom: 8px; }
.gc-lookup th, .gc-lookup td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); }
.gc-lookup thead th { border-top: 0; font-size: 12.5px; color: var(--text-faint); white-space: nowrap; }
.gc-lookup tbody th { font-weight: 700; color: var(--text); }
.gc-lookup td { color: var(--text-dim); }
.gc-lookup td.no { color: #C25A4C; } .gc-lookup td.yes { color: var(--green-deep); }
.gc-q { border-top: 1px solid var(--line); padding: 14px 0 4px; }
.gc-q h3 { margin: 0 0 6px; font-size: 16.5px; }
.gc-by { margin-top: 22px !important; font-size: 14.5px !important; color: var(--text-faint) !important; }
.gc-by a, .gc-learn h3 + p a { color: var(--green-deep); font-weight: 600; }

/* More resources: its own band, apart from the calculator */
.gc-more { margin-top: clamp(56px, 8vw, 88px); padding: clamp(36px, 5vw, 56px) 0 clamp(48px, 7vw, 72px); background: var(--bg-raised); box-shadow: 0 0 0 100vmax var(--bg-raised); clip-path: inset(0 -100vmax); }
.gc-more > * { width: min(1040px, calc(100vw - 2 * var(--pad))); position: relative; left: 50%; transform: translateX(-50%); }
.gc-more h2 { margin: 0 0 18px; font-size: clamp(22px, 3vw, 26px); letter-spacing: -0.02em; }
.gc-res-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gc-rc { display: flex; flex-direction: column; gap: 8px; padding: 20px; overflow: hidden; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.gc-rc:hover { border-color: var(--green); }
.gc-rc .gc-ico { width: 40px; height: 40px; border-radius: 12px; }
.gc-rc .gc-ico svg { width: 20px; height: 20px; }
.gc-rc h3 { margin: 4px 0 0; font-size: 17px; letter-spacing: -0.01em; }
.gc-rc p { margin: 0; flex: 1; font-size: 14.5px; line-height: 1.55; color: var(--text-dim); }
.gc-rc-go { font-weight: 700; font-size: 14.5px; color: var(--green-deep); margin-top: 4px; }
@media (max-width: 760px) { .gc-res-cards { grid-template-columns: 1fr; } }


.gc-rc[hidden] { display: none !important; }
.gc-who { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.gc-leader { display: flex; align-items: center; gap: 12px; margin: 4px 0; }
.gc-face { width: 52px; height: 52px; flex: none; border-radius: 50%; overflow: hidden; }
.gc-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gc-leader div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.gc-leader strong { font-size: 15.5px; }
.gc-leader div span { font-size: 13.5px; line-height: 1.4; color: var(--text-faint); }
.gc-res-cards.is-solo .gc-rc-sh .gc-art { grid-row: 1 / span 5; }
.gc-res-cards.is-solo .gc-rc-ts .gc-art { grid-row: 1 / span 4; }
.gc-res-cards.is-solo .gc-rc-sh .gc-who, .gc-res-cards.is-solo .gc-rc-ts .gc-who { align-self: end; }
.gc-res-cards.is-solo .gc-rc-sh h3, .gc-res-cards.is-solo .gc-rc-ts h3 { align-self: auto; margin-top: 0; }
.gc-res-cards.is-solo .gc-rc-ts .gc-rc-go { align-self: start; }
/* One card (until the playbook and calendar launch): picture left, words right. */
.gc-res-cards.is-solo { grid-template-columns: 1fr; }
.is-solo .gc-rc { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); column-gap: 28px; align-content: center; padding: 20px 28px 20px 20px; }
.is-solo .gc-rc .gc-art { grid-row: 1 / span 3; height: auto; min-height: 260px; margin: -20px 0 -20px -20px; border-radius: var(--radius) 0 0 var(--radius); }
.is-solo .gc-rc h3 { align-self: end; font-size: 20px; }
.is-solo .gc-rc p { flex: none; font-size: 15.5px; }
@media (max-width: 760px) {
  .is-solo .gc-rc { display: flex; padding: 20px; }
  .is-solo .gc-rc h3 { align-self: auto; }
  .gc-res-cards.is-solo .gc-rc-sh .gc-who, .gc-res-cards.is-solo .gc-rc-ts .gc-who { align-self: auto; }
  .is-solo .gc-rc .gc-art { min-height: 0; height: 230px; margin: -20px -20px 10px; border-radius: var(--radius) var(--radius) 0 0; }
}
/* Card pictures */
.gc-art { position: relative; height: 200px; margin: -20px -20px 10px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: linear-gradient(160deg, rgba(29,177,0,.10), rgba(238,34,12,.06)); }
.gc-art img { position: absolute; display: block; height: auto; background: #fff; box-shadow: 0 10px 26px rgba(20,20,40,.22); }
.gc-art-pb img { width: 38%; top: 22px; border-radius: 4px; }
.gc-art-pb img:nth-child(1) { left: 48%; transform: rotate(7deg); }
.gc-art-pb img:nth-child(2) { left: 34%; transform: rotate(-1deg); }
.gc-art-pb img:nth-child(3) { left: 18%; transform: rotate(-8deg); }
.gc-art-cal img { width: 82%; border-radius: 8px; }
.gc-art-cal img:nth-child(1) { left: 4%; top: 18px; transform: rotate(-5deg); opacity: .9; }
.gc-art-cal img:nth-child(2) { left: 16%; top: 40px; transform: rotate(3deg); }
.gc-art-sh .ph { position: absolute; width: 31%; top: 18px; padding: 1.2%; background: #111116; border-radius: 13% / 6%; box-shadow: inset 0 0 0 1.5px #2a2a32, 0 12px 26px rgba(20,20,40,.3); }
.gc-art-sh .ph img { position: static; width: 100%; aspect-ratio: 430 / 934; object-fit: cover; border-radius: 12% / 5.5%; box-shadow: none; }
.gc-art-sh .ph:nth-child(1) { left: 8%; top: 34px; transform: rotate(-9deg); }
.gc-art-sh .ph:nth-child(2) { left: 61%; top: 34px; transform: rotate(9deg); }
.gc-art-sh .ph:nth-child(3) { left: 34.5%; z-index: 1; }
@media (max-width: 760px) { .gc-art { height: 230px; } }

/* Study Hall */


@media (max-width: 640px) {
  .gc-grid, .gc-final { grid-template-columns: 1fr; }
}

/* Links between the grade calculator and the GPA calculator (2026-11-22). */
.gc-crosslink { margin: 14px 0 0; font-size: 14.5px; color: var(--text-dim); }
.gc-crosslink a { font-weight: 700; color: var(--green-deep); text-decoration: none; }
.gc-crosslink a:hover { text-decoration: underline; }

/* Dropdowns match the text boxes beside them (Joe, 2026-11-22): stretch to the row's height. */
.gc-tr > select.gc-cell-in { align-self: stretch; height: auto; }

/* ---------- Free tool cards with a screenshot (Joe, 2026-11-22) ---------- */
.tool-more { margin-top: clamp(44px, 6vw, 64px); }
.tool-more h2 { margin: 0 0 16px; font-size: clamp(22px, 3vw, 26px); letter-spacing: -0.02em; }
.tool-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tool-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-card); color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .2s ease; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -20px var(--shadow-lg); }
.tool-card:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.tool-shot { position: relative; aspect-ratio: 16 / 10.4; padding: 16px 16px 0; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; background: linear-gradient(155deg, rgba(29,177,0,.16), rgba(29,177,0,.03)); }
.tool-card:nth-child(3n+2) .tool-shot { background: linear-gradient(155deg, rgba(232,150,15,.18), rgba(232,150,15,.03)); }
.tool-card:nth-child(3n) .tool-shot { background: linear-gradient(155deg, rgba(47,111,219,.16), rgba(47,111,219,.03)); }
.tool-shot img { display: block; width: 100%; height: auto; border-radius: 12px 12px 0 0; background: #fff; box-shadow: 0 -2px 22px -10px rgba(20,20,40,.4); }
.tool-shot-pb img { position: absolute; width: 38%; top: 18px; border-radius: 4px; box-shadow: 0 10px 24px -12px rgba(20,20,40,.45); }
.tool-shot-pb img:nth-child(1) { left: 50%; transform: rotate(7deg); }
.tool-shot-pb img:nth-child(2) { left: 31%; transform: rotate(-1deg); }
.tool-shot-pb img:nth-child(3) { left: 12%; transform: rotate(-8deg); }
.tool-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.tool-who { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); }
.tool-body h3 { margin: 2px 0 0; font-size: 18px; letter-spacing: -0.01em; }
.tool-body p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--text-dim); }
.tool-go { margin-top: auto; padding-top: 6px; font-size: 14.5px; font-weight: 700; color: var(--green-deep); }
@media (max-width: 760px) {
  .tool-cards { grid-template-columns: 1fr; }
  .tool-shot { aspect-ratio: auto; }
  .tool-shot img { max-width: 380px; }
  .tool-shot-pb { aspect-ratio: 2 / 1; }
  .tool-shot-pb img { width: 26%; }
  .tool-shot-pb img:nth-child(1) { left: 54%; } .tool-shot-pb img:nth-child(2) { left: 38%; } .tool-shot-pb img:nth-child(3) { left: 22%; }
}
@media (prefers-reduced-motion: reduce) { .tool-card, .tool-card:hover { transition: none; transform: none; } }

/* Result tiles (GPA and study hours calculators). */
.gpa-res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.gpa-res { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-card); font-variant-numeric: tabular-nums; }
.gpa-res-l { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.gpa-res-v { font-size: clamp(34px, 6vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: var(--text); }
.gpa-res-s { font-size: 13.5px; font-weight: 600; color: var(--text-faint); }
.gpa-res.is-main { background: rgba(29,177,0,.08); border-color: rgba(29,177,0,.3); }
.gpa-res.is-main .gpa-res-v { color: var(--green-deep); }
.gpa-res.is-empty .gpa-res-v { color: var(--text-faint); }
.gpa-res-line { margin: 12px 0 0; font-size: 15px; font-weight: 600; color: var(--text-dim); }
.gpa-res-v small { font-size: 15px; font-weight: 700; letter-spacing: 0; color: var(--text-faint); }
.gpa-res.is-amber { background: rgba(232,150,15,.08); border-color: rgba(232,150,15,.3); }
.gpa-res.is-amber .gpa-res-v { color: #A86400; }
:root[data-theme="dark"] .gpa-res.is-amber .gpa-res-v { color: #F2B54A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gpa-res.is-amber .gpa-res-v { color: #F2B54A; } }
/* Four tool cards: two by two. */
.tool-cards:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .tool-cards:has(> :nth-child(4)) { grid-template-columns: 1fr; } }
