/* The Good Grade — Practice Hub extras (Batch A). Uses the Hub's own colour variables from hub.css. */

/* ---------- New this week banner ---------- */
.gghx-news { border-left: 4px solid var(--gold, #F9AD35); }
.gghx-news-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gghx-news-top h3 { margin: 0; }
.gghx-hide { background: none; border: 0; padding: 6px 8px; color: var(--teal-text, #3d6b5f); text-decoration: underline; cursor: pointer; font: inherit; font-size: .9rem; }
.gghx-news-list { list-style: none; margin: 10px 0 0; padding: 0; }
.gghx-news-list li { margin: 0 0 8px; line-height: 1.45; }
.gghx-news-list li:last-child { margin-bottom: 0; }
.gghx-news-list .ggph-pill { margin-right: 6px; white-space: nowrap; }
.gghx-news-list[hidden] { display: none; }
.gghx-news.is-collapsed { padding-top: 10px; padding-bottom: 10px; }
.gghx-news.is-collapsed h3 { font-size: 1rem; }

/* ---------- Account → Appearance ---------- */
.ggph .gghx-theme, .gghx-theme { border: 0; margin: 6px 0 0; padding: 0; background: none; box-shadow: none; display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; }
.gghx-news-top .gghx-hide { flex: none; }
.gghx-theme label { color: var(--ink, #22313f); display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line, #d9e2ea); border-radius: 8px; cursor: pointer; }
.gghx-theme label:has(input:checked) { border-color: var(--teal, #599082); box-shadow: 0 0 0 1px var(--teal, #599082); }
.gghx-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gghx-note { color: var(--muted, #5a6b7b); margin: 10px 0 0; }

/* ---------- Google review prompt ---------- */
.gghx-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(22, 46, 70, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gghx-dialog { background: #fff; color: #22313f; max-width: 460px; width: 100%; border-radius: 12px; padding: 24px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.gghx-dialog h2 { margin: 0 0 10px; color: #162E46; font-size: 1.35rem; }
.gghx-dialog p { margin: 0 0 10px; }
.gghx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.gghx-actions .ggph-btn { margin: 0; }
.gghx-link { background: none; border: 0; padding: 6px 4px; color: #5a6b7b; text-decoration: underline; cursor: pointer; font: inherit; font-size: .9rem; }

/* =====================================================================
   Dark mode: only when the learner picks Dark in Account → Appearance.
   ===================================================================== */
html.gghx-dark { color-scheme: dark; }
html.gghx-dark body,
html.gghx-dark .ast-separate-container,
html.gghx-dark .ast-plain-container,
html.gghx-dark .ast-page-builder-template { background: #0F1720; }
html.gghx-dark .site-content,
html.gghx-dark #content,
html.gghx-dark .ast-container,
html.gghx-dark .ast-separate-container .ast-article-single,
html.gghx-dark .ast-separate-container .ast-article-post,
html.gghx-dark article.page,
html.gghx-dark .entry-content { background: transparent; }

html.gghx-dark .ggph {
  --navy: #DCE6EF;      /* headings and strong text become light */
  --ink: #E3EAF1;
  --muted: #A3B3C2;
  --teal-text: #8CC9B8;
  --line: #2E3D4C;
  --soft: #16212C;
  --ok: #7BD3A0;
  --okbg: #16301F;
  --bad: #F28B82;
  --badbg: #3A1D1B;
  --warnbg: #33290F;
  /* The site theme (Astra) colours labels, legends and body text with these; make them light inside the app. */
  --ast-global-color-2: #E3EAF1;
  --ast-global-color-3: #E3EAF1;
  color: var(--ink);
}
html.gghx-dark .ggph label,
html.gghx-dark .ggph legend,
html.gghx-dark .ggph th,
html.gghx-dark .ggph td,
html.gghx-dark .ggph dt,
html.gghx-dark .ggph dd,
html.gghx-dark .ggph strong,
html.gghx-dark .ggph b { color: var(--ink); }
/* Unticked checkboxes and radios: visible ring on the dark card instead of a black hole */
html.gghx-dark .ggph input[type="checkbox"]:not(:checked),
html.gghx-dark .ggph input[type="radio"]:not(:checked) { background: #0F1720; border: 2px solid #8696A6; }
html.gghx-dark .ggph input[type="checkbox"],
html.gghx-dark .ggph input[type="radio"] { accent-color: #7BC4B0; }

/* Surfaces that are white in light mode */
html.gghx-dark .ggph-card,
html.gghx-dark .ggph-btn-ghost,
html.gghx-dark .ggph input,
html.gghx-dark .ggph select,
html.gghx-dark .ggph textarea,
html.gghx-dark .ggph-topic,
html.gghx-dark .ggph-q,
html.gghx-dark .ggph-choice,
html.gghx-dark .ggph-testbar,
html.gghx-dark .ggph-dot,
html.gghx-dark .ggph-chip,
html.gghx-dark .ggph-chiplist li,
html.gghx-dark .ggph-tab > span { background: #17212B; color: var(--ink); border-color: var(--line); }
html.gghx-dark .ggph-cta { background: #17212B; border-color: var(--line); }
html.gghx-dark .ggph input::placeholder,
html.gghx-dark .ggph textarea::placeholder { color: #7D8E9E; }

/* Light tints become dark tints */
html.gghx-dark .ggph-topic:hover,
html.gghx-dark .ggph-offer { background: #1C2935; }
html.gghx-dark .ggph-choice:hover { border-color: #4F7D71; }
html.gghx-dark .ggph-choice.is-chosen,
html.gghx-dark .ggph-choice:has(input:checked),
html.gghx-dark .ggph-chip.is-on,
html.gghx-dark .ggph-tab input:checked + span,
html.gghx-dark .ggph-dot.is-done,
html.gghx-dark .ggph-chiplist li.is-live,
html.gghx-dark .ggph-unit.is-pre { background: #1B3230; border-color: #3E6B60; }

/* Things that use navy as a fill stay a deep blue, with white text */
html.gghx-dark .ggph .ggph-btn-navy,
html.gghx-dark .ggph a.ggph-btn-navy,
html.gghx-dark .ggph button.ggph-btn-navy,
html.gghx-dark .ggph .ggph-nav a[aria-current] { background: #2B4C6F; border-color: #2B4C6F; color: #fff; }
/* v1.5.3: selected results filter ("Show: All") in dark mode = bold white underline, no box, like light mode (Brandon, Nov 15, 2026) */
html.gghx-dark .ggph .ggph-filters a[aria-current] { background: transparent !important; border-color: transparent !important; box-shadow: none !important; color: #fff !important; font-weight: 700; text-decoration: underline; }
html.gghx-dark .ggph .ggph-btn-gold,
html.gghx-dark .ggph a.ggph-btn-gold,
html.gghx-dark .ggph button.ggph-btn-gold { color: #162E46 !important; } /* hub.css sets this colour with !important */

/* Messages, tags and pills */
html.gghx-dark .ggph-msg-ok { background: var(--okbg); border-color: #2E5E44; color: #A8E0BF; }
html.gghx-dark .ggph-msg-error { background: var(--badbg); border-color: #6B2B26; color: #F5B7B1; }
html.gghx-dark .ggph-msg-warn,
html.gghx-dark .ggph-testmode { background: var(--warnbg); border-color: #6B5320; color: #F3D58E; }
html.gghx-dark .ggph-tag.ok { background: #1F3D2C; color: #A8E0BF; }
html.gghx-dark .ggph-tag.bad { background: #44221F; color: #F5B7B1; }
html.gghx-dark .ggph-pill.ok { border-color: #2E5E44; }
html.gghx-dark .ggph-pill.bad { border-color: #6B2B26; }
html.gghx-dark .ggph-readaloud { background: var(--warnbg); border-color: #6B5320; }
html.gghx-dark .ggph-whylist li.is-wrong { border-left-color: #8C3A33; }
html.gghx-dark .ggph .ggph-ferr { color: #F28B82; }
html.gghx-dark .ggph [aria-invalid="true"] { border-color: #F28B82 !important; }
html.gghx-dark .ggph-resetnote,
html.gghx-dark .ggax-muted { color: var(--muted); }
html.gghx-dark .ggph-reset-warn { border-color: #6B2B26; }
html.gghx-dark .ggph-modal { background: rgba(0, 0, 0, .6); }

/* Account extras (gg-account-extras) */
html.gghx-dark .ggax-locked { background: #141D26; }

/* Review prompt in dark mode */
html.gghx-dark .gghx-modal { background: rgba(0, 0, 0, .6); }
html.gghx-dark .gghx-dialog { background: #17212B; color: #E3EAF1; }
html.gghx-dark .gghx-dialog h2 { color: #DCE6EF; }
html.gghx-dark .gghx-link { color: #A3B3C2; }
html.gghx-dark .ggph-count { background: #2B4C6F; }

/* ---------- Phones and small screens ---------- */
.gghx-dialog { max-height: calc(100vh - 32px); overflow-y: auto; }
.gghx-hide, .gghx-link { min-height: 44px; }
.gghx-theme label { min-height: 44px; }
@media (max-width: 600px) {
  .gghx-modal { align-items: flex-end; padding: 12px; }
  .gghx-dialog { padding: 18px; border-radius: 14px; }
  .gghx-dialog h2 { font-size: 1.2rem; }
  .gghx-actions { flex-direction: column; align-items: stretch; }
  .gghx-actions .ggph-btn { width: 100%; text-align: center; justify-content: center; box-sizing: border-box; }
  .gghx-link { align-self: center; }
  .gghx-theme label { flex: 1 1 0; justify-content: center; }
  .gghx-news-list li { font-size: .95rem; }
}

/* Keep the text-style buttons plain: the site theme colours every button blue on hover/focus. */
.ggph .gghx-hide, .ggph .gghx-hide:hover, .ggph .gghx-hide:focus,
.ggph .gghx-link, .ggph .gghx-link:hover, .ggph .gghx-link:focus { background: none; border: 0; box-shadow: none; }
.ggph .gghx-hide, .ggph .gghx-hide:hover, .ggph .gghx-hide:focus { color: var(--teal-text, #3d6b5f); }
.ggph .gghx-link, .ggph .gghx-link:hover, .ggph .gghx-link:focus { color: var(--muted, #5a6b7b); }
.ggph .gghx-hide:focus-visible, .ggph .gghx-link:focus-visible { outline: 2px solid var(--teal, #599082); outline-offset: 2px; }

/* =====================================================================
   v1.0.4 contrast pass (Nov 15, 2026)
   ===================================================================== */

/* Both modes: the site theme turns every <button> blue (#045cb4) on hover/focus, which put navy text on blue.
   Keep the Hub's own button colours, and show a clear focus ring instead. */
.ggph button.ggph-btn-gold:hover, .ggph button.ggph-btn-gold:focus { background: #f8a11a; border-color: #f8a11a; color: var(--navy, #162E46); }
.ggph button.ggph-btn-ghost:hover, .ggph button.ggph-btn-ghost:focus { background: #fff; color: var(--navy, #162E46); border-color: var(--teal, #599082); }
.ggph button.ggph-btn-navy:hover, .ggph button.ggph-btn-navy:focus { background: var(--navy, #162E46); border-color: var(--navy, #162E46); }
.ggph button.ggph-btn-danger:hover, .ggph button.ggph-btn-danger:focus { background: #fff; color: var(--bad, #b3261e); }
.ggph .ggph-btn:focus-visible { outline: 3px solid var(--teal, #599082); outline-offset: 2px; }

/* Dark: same buttons, dark-mode colours */
html.gghx-dark .ggph button.ggph-btn-gold:hover, html.gghx-dark .ggph button.ggph-btn-gold:focus { color: #162E46 !important; }
html.gghx-dark .ggph button.ggph-btn-ghost:hover, html.gghx-dark .ggph button.ggph-btn-ghost:focus { background: #1C2935; color: var(--ink); border-color: #7BC4B0; }
html.gghx-dark .ggph button.ggph-btn-navy:hover, html.gghx-dark .ggph button.ggph-btn-navy:focus { background: #345A82; border-color: #345A82; }
html.gghx-dark .ggph button.ggph-btn-danger, html.gghx-dark .ggph button.ggph-btn-danger:hover, html.gghx-dark .ggph button.ggph-btn-danger:focus { background: #17212B; color: #F28B82; border-color: #6B2B26; }
html.gghx-dark .ggph .ggph-btn:focus-visible { outline-color: #7BC4B0; }

/* Dark: links without their own Hub style use the theme blue (#046bd2): too dark on the dark cards */
html.gghx-dark .ggph a:not([class]), html.gghx-dark .ggph a:not([class]):visited { color: #8CC9B8; }
html.gghx-dark .ggph a:not([class]):hover, html.gghx-dark .ggph a:not([class]):focus { color: #B5E0D3; }

/* Dark: Account Extras pieces with fixed colours (Next session, upcoming sessions, status badges, notes) */
html.gghx-dark .ggax-next .ggax-big,
html.gghx-dark .ggax-s .ggax-when { color: var(--ink); }
html.gghx-dark .ggax-muted,
html.gghx-dark .ggax-s .ggax-meta,
html.gghx-dark .ggax-rule { color: var(--muted); }
html.gghx-dark .ggax-s { border-top-color: var(--line); }
html.gghx-dark .ggax-b-wait { background: #3A2A10; color: #F3C98B; }
html.gghx-dark .ggax-b-act { background: #17332B; color: #8FD3BE; }
html.gghx-dark .ggax-b-ok { background: #2B4C6F; color: #fff; }
html.gghx-dark .ggax-b-no { background: #3A1D1B; color: #F5B7B1; }

/* Dark: remaining Hub details with fixed colours */
html.gghx-dark .ggph-keep li::before { color: #7BD3A0; }
html.gghx-dark .ggph-dot.is-flag::after { color: #F3B544; }
html.gghx-dark .ggph-testbar { background: #1C2C3D; color: #fff; }

/* v1.0.6: tables (e.g. Tests history). The site theme lets words break anywhere, so "Review"/"Resume"
   split as "Revie/w". Keep action links on one line and let that last column size to its content. */
.ggph table td a, .ggph table th a { white-space: nowrap; word-break: normal; overflow-wrap: normal; }
.ggph table td:last-child, .ggph table th:last-child { white-space: nowrap; width: 1%; }
.ggph table td, .ggph table th { vertical-align: middle; word-break: normal; overflow-wrap: break-word; }

/* v1.0.7: Session Tracker panel on Tutoring sessions ("Your tutoring sessions", .gg-my). Its own CSS hard-codes a
   white box with navy text; match the Hub cards in both modes. */
.ggph .gg-my .k { border-color: var(--line, #d9e2ea); }
html.gghx-dark .ggph .gg-my .k { background: #17212B; border-color: var(--line); }
html.gghx-dark .ggph .gg-my .k b,
html.gghx-dark .ggph .gg-my .d { color: var(--ink); }
html.gghx-dark .ggph .gg-my .k small,
html.gghx-dark .ggph .gg-my .m { color: var(--muted); }
html.gghx-dark .ggph .gg-my .s { border-top-color: var(--line); }
html.gghx-dark .ggph .gg-my .t { background: #3A2A10; color: #F3C98B; }

/* v1.1.0: Account tab in sections (menu on the left on desktop, dropdown on phones) */
.gghx-acct { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 8px; }
.gghx-acct-nav { position: sticky; top: 90px; }
.gghx-acct-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ggph .gghx-acct-nav button { display: block; width: 100%; text-align: left; background: none; border: 0; border-left: 3px solid transparent; border-radius: 0 8px 8px 0; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--teal-text, #3d6b5f); cursor: pointer; box-shadow: none; }
.ggph .gghx-acct-nav button:hover, .ggph .gghx-acct-nav button:focus { background: var(--soft, #f4f6f8); color: var(--navy, #162E46); }
.ggph .gghx-acct-nav button[aria-current="true"] { background: var(--soft, #f4f6f8); border-left-color: var(--gold, #F9AD35); color: var(--navy, #162E46); }
.ggph .gghx-acct-nav button:focus-visible { outline: 2px solid var(--teal, #599082); outline-offset: 2px; }
.gghx-acct-pick { display: none; }
.gghx-acct-panel[hidden] { display: none; }
.gghx-acct-panel > .ggph-card { margin-top: 0; margin-bottom: 16px; }

/* Learners: one tidy row per learner, Edit opens that learner's form */
.ggph-learner.gghx-tidy { display: block; }
.ggph-learner .gghx-lrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.gghx-lname strong { display: block; font-size: 1.05rem; color: var(--navy, #162E46); }
.gghx-lname .ggph-small { color: var(--muted, #5a6b7b); }
.ggph .gghx-lrow .gghx-ledit { margin: 0; flex: none; }
.gghx-lname { min-width: 0; }
.gghx-lbody { padding: 8px 0 4px; display: grid; grid-template-columns: minmax(0, 1fr) 120px; column-gap: 16px; }
.gghx-lbody > :not(.ggph-field) { grid-column: 1 / -1; }
.gghx-lbody[hidden] { display: none; }

/* Billing: the Manage plan button */
.gghx-manage { margin: 12px 0 0; }

/* Danger zone (Help & privacy) */
.ggph-card.gghx-danger { border: 1px solid #f0c4c0; border-left: 4px solid var(--bad, #b3261e); }
.gghx-danger > h3 { color: var(--bad, #b3261e); }
.gghx-danger > .ggph-card h3 { font-size: 1.05rem; }
.gghx-danger > .ggph-card { border: 0; box-shadow: none; padding: 0; margin: 12px 0 0; background: none; }
.gghx-danger-item { border-top: 1px solid var(--line, #d9e2ea); margin-top: 12px; padding-top: 12px; }

/* Dark mode */
html.gghx-dark .ggph .gghx-acct-nav button { color: #8CC9B8; }
html.gghx-dark .ggph .gghx-acct-nav button:hover, html.gghx-dark .ggph .gghx-acct-nav button:focus,
html.gghx-dark .ggph .gghx-acct-nav button[aria-current="true"] { background: #17212B; color: var(--ink); }
html.gghx-dark .ggph-card.gghx-danger { border-color: #6B2B26; border-left-color: #F28B82; }
html.gghx-dark .gghx-danger > h3 { color: #F28B82; }
html.gghx-dark .gghx-danger > .ggph-card { background: none; }

/* Phones and narrow screens: dropdown instead of the side menu */
@media (max-width: 760px) {
  .gghx-acct { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .gghx-acct-nav { display: none; }
  .gghx-acct-pick { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
  .gghx-acct-pick select { width: 100%; min-height: 44px; font: inherit; }
}

/* Dark: the small app footer under the Hub (Privacy Policy · Terms · …, from Site Extras) */
html.gghx-dark .gg-sf-appfoot { color: var(--muted, #A3B3C2); border-color: #2E3D4C; }
html.gghx-dark .gg-sf-appfoot a { color: #A3B3C2; }
html.gghx-dark .gg-sf-appfoot a:hover, html.gghx-dark .gg-sf-appfoot a:focus { color: #E3EAF1; }

/* ======================================================================== Batch B (v1.2.0) */
/* Going to Badges: the Hub draws the Dashboard first; hide it for that moment (JS removes this within 2s). */
html.gghx-to-badges .ggph-wrap:has(> .ggph-nav) > :not(.ggph-nav) { visibility: hidden; }

/* Shared: tier colours. Text colours pass 4.5:1 on their own fills in both themes. */
.gghx-medal { --mb: #f4f6f8; --mr: #d9e2ea; --mi: #5a6b7b; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--mb); box-shadow: inset 0 0 0 3px var(--mr); color: var(--mi); }
.gghx-medal svg { width: 24px; height: 24px; display: block; }
.gghx-medal.tier-b { --mb: #F7E9DC; --mr: #C68A5B; --mi: #7A4520; }
.gghx-medal.tier-s { --mb: #EDF1F5; --mr: #9AA7B4; --mi: #3F4C59; }
.gghx-medal.tier-g { --mb: #FDF0D2; --mr: #E3A21E; --mi: #6B4800; }
.gghx-medal.tier-p { --mb: #E2F0F3; --mr: #5FA0B0; --mi: #1D5160; }
.gghx-medal.is-locked { --mb: var(--soft, #f4f6f8); --mr: var(--line, #d9e2ea); --mi: var(--muted, #5a6b7b); box-shadow: inset 0 0 0 2px var(--mr); }
html.gghx-dark .gghx-medal.tier-b { --mb: #3A2A1F; --mr: #C68A5B; --mi: #F1CBA8; }
html.gghx-dark .gghx-medal.tier-s { --mb: #2B3440; --mr: #A6B2BE; --mi: #DDE4EB; }
html.gghx-dark .gghx-medal.tier-g { --mb: #3A2F16; --mr: #E3A21E; --mi: #F8D78E; }
html.gghx-dark .gghx-medal.tier-p { --mb: #1C3740; --mr: #6FB0C0; --mi: #BFE4EC; }

/* Dashboard: today's goal + streak */
.gghx-st-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gghx-st-top h3 { margin: 0 0 8px; }
.ggph a.gghx-st-change { white-space: nowrap; }
.gghx-st-body { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.gghx-st-goal { flex: 1 1 260px; min-width: 0; }
.gghx-st-count { margin: 0 0 8px; color: var(--ink, #22313f); }
.gghx-st-count strong { font-size: 1.6rem; color: var(--navy, #162E46); margin-right: 2px; }
.ggph .gghx-st-bar { height: 10px; border-radius: 10px; margin: 0 0 8px; }
.gghx-streak.is-met .gghx-st-bar span { background: var(--ok, #2f7d4f); }
.gghx-st-note { margin: 0; }
.gghx-st-stats { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex: 0 0 auto; }
.gghx-st-stats li { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line, #d9e2ea); border-radius: 12px; background: var(--soft, #f4f6f8); min-width: 112px; }
.gghx-st-stats li > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.gghx-st-stats strong { font-size: 1.35rem; color: var(--navy, #162E46); }
.gghx-st-stats .ggph-small { white-space: nowrap; }
.gghx-st-flame { display: inline-flex; flex: none; width: 30px; height: 30px; color: var(--muted, #5a6b7b); }
.gghx-st-flame.is-best { color: #B7791F; }
html.gghx-dark .gghx-st-flame.is-best { color: #F2C14E; }
.gghx-st-flame svg { width: 100%; height: 100%; }
.gghx-st-stats li.is-lit .gghx-st-flame { color: #D2691E; }
html.gghx-dark .gghx-st-stats li { background: #1C2935; }
html.gghx-dark .gghx-st-stats li.is-lit .gghx-st-flame { color: #F2A65A; }
@media (max-width: 600px) {
  .gghx-st-stats { width: 100%; }
  .gghx-st-stats li { flex: 1 1 0; min-width: 0; }
}

/* Account → Settings: Daily goal */
.ggph .gghx-goal-row { margin: 14px 0 0; }
.gghx-goal-row label { font-weight: 600; color: var(--navy, #162E46); }
.ggph .gghx-goal-row select { min-height: 44px; width: 100%; max-width: 320px; }
.gghx-goal .gghx-note { margin: 4px 0 0; min-height: 1.2em; }

/* Badges tab */
.gghx-b-who { margin: 0 0 6px; }
.gghx-bsum-n { margin: 0 0 8px; color: var(--ink, #22313f); }
.gghx-bsum-n strong { font-size: 1.6rem; color: var(--navy, #162E46); }
.ggph .gghx-bsum .ggph-progress { height: 10px; border-radius: 10px; margin: 0 0 14px; }
.gghx-tiers { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.gghx-tiers li { display: flex; align-items: center; gap: 8px; }
.gghx-tiers .gghx-medal { width: 30px; height: 30px; box-shadow: inset 0 0 0 2px var(--mr); }
.gghx-tiers .gghx-medal svg { width: 16px; height: 16px; }
.gghx-tiers strong { color: var(--navy, #162E46); }
.gghx-bsum > p.ggph-small:last-child { margin: 0; }
.gghx-bcat { margin: 22px 0 6px; }
.gghx-bcat h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 4px; }
.gghx-bcat h3 .ggph-small { font-weight: 400; }
.gghx-bcat > p.ggph-small { margin: 0 0 8px; }
.gghx-bgrid { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gghx-badge { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line, #d9e2ea); border-radius: 14px; min-width: 0; }
.gghx-badge.is-locked { background: var(--soft, #f4f6f8); border-style: dashed; }
.gghx-badge.is-earned.tier-b { border-color: #E3C2A6; }
.gghx-badge.is-earned.tier-s { border-color: #C6CFD8; }
.gghx-badge.is-earned.tier-g { border-color: #F0CF84; }
.gghx-badge.is-earned.tier-p { border-color: #A9CFD9; }
.gghx-b-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.gghx-b-txt strong { color: var(--navy, #162E46); font-size: 1rem; line-height: 1.3; }
.gghx-b-how { font-size: .9rem; color: var(--ink, #22313f); line-height: 1.4; }
.gghx-b-when { font-size: .8rem; font-weight: 700; color: var(--muted, #5a6b7b); letter-spacing: .01em; }
.gghx-badge.tier-b .gghx-b-when { color: #7A4520; }
.gghx-badge.tier-s .gghx-b-when { color: #3F4C59; }
.gghx-badge.tier-g .gghx-b-when { color: #6B4800; }
.gghx-badge.tier-p .gghx-b-when { color: #1D5160; }
.gghx-b-prog { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.ggph .gghx-b-prog .ggph-progress { flex: 1; height: 6px; margin: 0; background: #e3e9ef; }
.gghx-b-prog .ggph-small { white-space: nowrap; font-size: .8rem; }
html.gghx-dark .gghx-badge { background: #17212B; }
html.gghx-dark .gghx-badge.is-locked { background: #131B24; }
html.gghx-dark .gghx-badge.is-earned.tier-b { border-color: #6E4A30; }
html.gghx-dark .gghx-badge.is-earned.tier-s { border-color: #4E5B68; }
html.gghx-dark .gghx-badge.is-earned.tier-g { border-color: #7A5E1C; }
html.gghx-dark .gghx-badge.is-earned.tier-p { border-color: #2F6473; }
html.gghx-dark .gghx-badge.tier-b .gghx-b-when { color: #F1CBA8; }
html.gghx-dark .gghx-badge.tier-s .gghx-b-when { color: #DDE4EB; }
html.gghx-dark .gghx-badge.tier-g .gghx-b-when { color: #F8D78E; }
html.gghx-dark .gghx-badge.tier-p .gghx-b-when { color: #BFE4EC; }
html.gghx-dark .ggph .gghx-b-prog .ggph-progress { background: #2A3846; }
@media (max-width: 600px) {
  .gghx-bgrid { grid-template-columns: 1fr; }
  .gghx-badge { padding: 10px 12px; }
}

/* "Badge earned" pop-up */
.gghx-toast { position: fixed; right: 20px; bottom: 20px; z-index: 100000; width: min(380px, calc(100vw - 24px)); display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 16px; background: #fff; color: var(--ink, #22313f); border: 1px solid var(--line, #d9e2ea); border-left: 4px solid var(--gold, #F9AD35); border-radius: 14px; box-shadow: 0 10px 30px rgba(22, 46, 70, .18); animation: gghx-in .25s ease-out; transition: opacity .25s, transform .25s; }
.gghx-toast.is-out { opacity: 0; transform: translateY(8px); }
.gghx-toast-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.gghx-toast-eye { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--teal-text, #3d6b5f); }
.gghx-toast-txt strong { color: var(--navy, #162E46); font-size: 1.05rem; }
.gghx-toast-txt a { margin-top: 4px; font-weight: 600; }
.ggph button.gghx-toast-x { flex: none; width: 36px; height: 36px; margin: -6px -6px 0 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted, #5a6b7b); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.ggph button.gghx-toast-x:hover, .ggph button.gghx-toast-x:focus { background: var(--soft, #f4f6f8); color: var(--navy, #162E46); }
html.gghx-dark .gghx-toast { background: #17212B; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
@keyframes gghx-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .gghx-toast { left: 12px; right: 12px; bottom: 12px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .gghx-toast { animation: none; transition: none; } }

/* "% who chose each answer" (sits under the answer text, like the Hub's own tags) */
.gghx-pct { grid-column: 3; display: flex; align-items: center; gap: 8px; margin-top: 2px; max-width: 320px; }
.gghx-pct-bar { flex: 1; height: 6px; border-radius: 6px; background: rgba(22, 46, 70, .1); overflow: hidden; min-width: 60px; }
.gghx-pct-bar > span { display: block; height: 100%; background: var(--teal, #599082); border-radius: 6px; }
.ggph-choice.is-correct .gghx-pct-bar > span { background: var(--ok, #2f7d4f); }
.ggph-choice.is-wrong .gghx-pct-bar > span { background: var(--bad, #b3261e); }
.gghx-pct-t { font-size: .82rem; font-weight: 600; color: var(--muted, #5a6b7b); white-space: nowrap; }
.gghx-pct-note { margin: -2px 0 10px; }
html.gghx-dark .gghx-pct-bar { background: rgba(255, 255, 255, .12); }

/* ======================================================================== Batch C (v1.3.0) */
/* Dashboard: Exam countdown */
.ggph .gghx-ex-add { min-height: 40px; padding: 6px 14px; }
.gghx-exams .gghx-st-top { align-items: center; margin-bottom: 4px; }
.gghx-exams .gghx-st-top h3 { margin: 0; }
.gghx-exam { border-top: 1px solid var(--line, #d9e2ea); padding: 14px 0 4px; margin-top: 10px; }
.gghx-exams .gghx-st-top + .gghx-exam, .gghx-exams .gghx-st-top + p + .gghx-exam { border-top: 0; padding-top: 6px; }
.gghx-ex-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gghx-ex-title { display: flex; flex-direction: column; min-width: 0; }
.gghx-ex-title strong { color: var(--navy, #162E46); font-size: 1.1rem; line-height: 1.3; }
.gghx-ex-days { flex: none; display: inline-flex; align-items: baseline; gap: 4px; padding: 6px 12px; border-radius: 999px; background: #EAF3F0; color: #2F5F53; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.gghx-ex-days strong { font-size: 1.25rem; }
.gghx-ex-days.is-today { background: #FEF1D6; color: #6B4800; }
.gghx-ex-plan { margin: 10px 0 8px; color: var(--ink, #22313f); }
.gghx-ex-plan strong { color: var(--navy, #162E46); }
.gghx-ex-today { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.ggph .gghx-ex-today .ggph-progress { flex: 1; height: 8px; margin: 0; max-width: 360px; }
.gghx-ex-today .ggph-small { white-space: nowrap; }
.gghx-ex-focus { margin: 0 0 10px; }
.gghx-ex-focus strong { color: var(--ink, #22313f); font-weight: 600; }
.gghx-ex-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; }
.gghx-ex-isgoal { font-weight: 600; color: var(--teal-text, #3d6b5f); }
.gghx-ex-msg { margin: 6px 0 0; min-height: 0; }
.gghx-ex-msg:empty { display: none; }
.gghx-ex-tools { display: flex; gap: 16px; margin: 4px 0 0; }
.ggph .gghx-ex-tools .ggph-link { min-height: 36px; font-size: .9rem; }
.gghx-ex-max { margin: 10px 0 0; }
.gghx-ex-form { margin-top: 8px; }
.gghx-ex-form .ggph-field { margin: 0 0 12px; }
.gghx-ex-form input, .gghx-ex-form select { width: 100%; min-height: 44px; }
.gghx-ex-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.gghx-ex-err { color: var(--bad, #b3261e); font-weight: 600; margin: 0 0 10px; }
.gghx-ex-err:empty { display: none; }
.gghx-ex-confirm { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--badbg, #fdecea); }
.gghx-ex-confirm p { margin: 0 0 8px; }
.gghx-exam.is-new { border-top: 0; padding-top: 0; }
html.gghx-dark .gghx-ex-days { background: #17332B; color: #8FD3BE; }
html.gghx-dark .gghx-ex-days.is-today { background: #3A2F16; color: #F8D78E; }
@media (max-width: 600px) {
  .gghx-ex-2 { grid-template-columns: 1fr; }
  .gghx-ex-acts .ggph-btn, .gghx-ex-acts button { flex: 1 1 100%; justify-content: center; }
  .gghx-exams .gghx-st-top { flex-wrap: wrap; }
}

/* Tutoring sessions: Add to calendar */
.gghx-cal { position: relative; display: inline-block; }
.ggph .gghx-cal > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--navy, #162E46); }
.ggph .gghx-cal > summary::-webkit-details-marker { display: none; }
.ggph .gghx-cal > summary::after { content: ""; width: 7px; height: 7px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.ggph .gghx-cal[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.gghx-cal-menu { position: absolute; z-index: 50; left: 0; top: calc(100% + 6px); width: 260px; padding: 6px; background: #fff; border: 1px solid var(--line, #d9e2ea); border-radius: 12px; box-shadow: 0 10px 28px rgba(22, 46, 70, .16); }
.ggph .gghx-cal-menu a, .ggph .gghx-cal-menu button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 8px; background: none; color: var(--navy, #162E46); font: inherit; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer; }
.ggph .gghx-cal-menu a:hover, .ggph .gghx-cal-menu a:focus, .ggph .gghx-cal-menu button:hover, .ggph .gghx-cal-menu button:focus { background: var(--soft, #f4f6f8); color: var(--navy, #162E46); }
.gghx-cal-menu .ggph-small { margin: 4px 12px 6px; }
html.gghx-dark .gghx-cal-menu { background: #17212B; box-shadow: 0 10px 28px rgba(0, 0, 0, .5); }
html.gghx-dark .ggph .gghx-cal-menu a:hover, html.gghx-dark .ggph .gghx-cal-menu a:focus, html.gghx-dark .ggph .gghx-cal-menu button:hover, html.gghx-dark .ggph .gghx-cal-menu button:focus { background: #1C2935; }
@media (max-width: 600px) {
  .gghx-cal-menu { left: auto; right: 0; width: min(280px, calc(100vw - 48px)); }
}
/* The booking cards colour their links with a fixed navy; keep the calendar menu readable in both themes. */
.ggph .gghx-cal-menu a, .ggph .gghx-cal-menu a:visited { color: #162E46 !important; }
html.gghx-dark .ggph .gghx-cal-menu a, html.gghx-dark .ggph .gghx-cal-menu a:visited { color: #DCE6EF !important; }
html.gghx-dark .gghx-ex-form input[type="date"] { color-scheme: dark; }
/* v1.3.2: date field matches the other fields; calendar menu opens toward the left on desktop and inline on phones */
.ggph .gghx-ex-form input[type="date"] { background: #fff; }
html.gghx-dark .ggph .gghx-ex-form input[type="date"] { background: #17212B; }
.gghx-cal-menu { left: auto; right: 0; }
@media (max-width: 600px) {
  .gghx-cal[open] { display: block; width: 100%; }
  .gghx-cal-menu { position: static; width: auto; margin-top: 6px; box-shadow: none; }
}
/* v1.3.4: Exam name box matches the Subject box (rounded, lighter border) */
.ggph .gghx-ex-form input[name="name"] { border: 1px solid #B8C6D3; border-radius: 10px; padding: 10px 14px; height: 48px; box-sizing: border-box; box-shadow: none; }
html.gghx-dark .ggph .gghx-ex-form input[name="name"] { border-color: #2E3D4C; }
/* v1.3.5: Date box matches the Subject box too */
.ggph .gghx-ex-form input[type="date"] { border: 1px solid #B8C6D3; border-radius: 10px; padding: 10px 14px; height: 48px; box-sizing: border-box; box-shadow: none; }
html.gghx-dark .ggph .gghx-ex-form input[type="date"] { border-color: #2E3D4C; }
/* v1.4.0: "What's on the exam?" chapter checklist */
.ggph fieldset.gghx-ex-chaps { border: 1px solid var(--line, #d9e2ea); border-radius: 12px; padding: 12px 14px 6px; margin: 0 0 12px; min-width: 0; }
.gghx-ex-chaps legend { font-weight: 700; color: var(--navy, #162E46); padding: 0 6px; }
.gghx-ex-chaps > .ggph-small { margin: 0 0 8px; }
.gghx-ex-chlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; margin-top: 4px; }
.gghx-ex-chaps .ggph-check { margin: 0 0 8px; }
.gghx-ex-all { font-weight: 600; }
.ggph .gghx-ex-chaps .ggph-check { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.ggph .gghx-ex-chaps .ggph-check input { margin: 0; flex: none; }
.ggph .gghx-ex-chaps > p.ggph-small { margin-top: 0; }
/* v1.4.2: Dashboard Quick actions card removed (Brandon, Nov 15, 2026); email line under Next session */
.ggph .ggax-actions { display: none !important; }
.gghx-ask { margin: 12px 0 0; }

/* ======================================================================== Batch D (v1.5.0) */
/* Dashboard: Homework */
.gghx-hw { border-left: 4px solid var(--teal, #599082); }
.gghx-hw[hidden] { display: none; }
.gghx-hw .gghx-st-top h3 { margin: 0 0 4px; }
.gghx-hw-list { list-style: none; margin: 0; padding: 0; }
.gghx-hw-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; padding: 12px 0; border-top: 1px solid var(--line, #d9e2ea); }
.gghx-hw-item:first-child { border-top: 0; padding-top: 6px; }
.gghx-hw-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.gghx-hw-main strong { color: var(--navy, #162E46); font-size: 1.05rem; }
.gghx-hw-note { margin: 6px 0 0; padding: 8px 12px; background: var(--soft, #f4f6f8); border-radius: 8px; color: var(--ink, #22313f); font-size: .95rem; }
.gghx-hw-note span { font-weight: 700; color: var(--navy, #162E46); }
.gghx-hw-msg { margin: 4px 0 0; color: var(--bad, #b3261e); }
.gghx-hw-msg:empty { display: none; }
.gghx-hw-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.gghx-hw-due { font-size: .85rem; font-weight: 700; color: #2F5F53; background: #EAF3F0; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.gghx-hw-due.is-over { color: #8c1d16; background: #f9d9d5; }
.gghx-hw-done { font-size: .9rem; font-weight: 700; color: #1f5a37; background: #d6efdf; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.ggph .gghx-hw-side .ggph-btn { margin: 0; }
html.gghx-dark .gghx-hw-due { background: #17332B; color: #8FD3BE; }
html.gghx-dark .gghx-hw-due.is-over { background: #44221F; color: #F5B7B1; }
html.gghx-dark .gghx-hw-done { background: #1F3D2C; color: #A8E0BF; }
html.gghx-dark .gghx-hw-note { background: #1C2935; }
@media (max-width: 600px) {
  .gghx-hw-item { flex-direction: column; }
  .gghx-hw-side { flex-direction: row; flex-wrap: wrap; align-items: center; width: 100%; justify-content: space-between; }
  .gghx-hw-side .ggph-btn { flex: 1 1 100%; justify-content: center; text-align: center; }
}

/* Account → Settings: Practice Hub emails */
.gghx-mails-list { margin: 10px 0 0; }
.ggph .gghx-mail-row { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 12px; cursor: pointer; }
.ggph .gghx-mail-row input { margin: 3px 0 0; flex: none; }
.gghx-mail-row > span { display: flex; flex-direction: column; gap: 2px; }
.gghx-mail-row strong { color: var(--navy, #162E46); }
.gghx-mails .gghx-note { margin: 4px 0 0; min-height: 1.2em; }

/* v1.5.2: Results screen buttons, "New test" + "Back to dashboard" at the top and after the last question (Brandon, Nov 15, 2026, option C) */
.ggph .gghx-res-nav { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ggph .gghx-res-nav .ggph-btn { margin: 0; }
.ggph .gghx-res-bottom { margin-top: 18px; }
@media (max-width: 600px) {
  .ggph .gghx-res-nav .ggph-btn { flex: 1 1 100%; width: 100%; text-align: center; justify-content: center; box-sizing: border-box; }
}


/* ======================================================================== v1.5.4 */
/* "New this week" banner, option A (approved Nov 15, 2026): gold pill, big new-question number, topic chips,
   "Practice the new questions" button, and an "Also new" column for the owners' updates. */
.ggph .gghx-news.gghx-a { border-left-width: 1px; border-left-color: var(--line, #d9e2ea); }
.ggph .gghx-news h3.gghx-a-pill, .ggph .gghx-news.is-collapsed h3.gghx-a-pill { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-radius: 999px; background: #F9AD35; color: #162E46; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; }
.gghx-a-pill svg { width: 16px; height: 16px; flex: none; }
.ggph .gghx-a-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 16px; }
.ggph .gghx-a.has-two .gghx-a-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ggph .gghx-a-body[hidden], .ggph .gghx-news.gghx-a.is-collapsed .gghx-a-body { display: none !important; }
.gghx-a-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ggph p.gghx-a-big { display: flex; align-items: baseline; gap: 14px; margin: 0; }
.gghx-a-num { font-size: 3.6rem; line-height: 1; font-weight: 800; color: #B7791F; }
html.gghx-dark .gghx-a-num { color: #F9AD35; }
.gghx-a-lbl { font-size: 1.1rem; font-weight: 600; line-height: 1.3; color: var(--navy, #162E46); }
.ggph p.gghx-a-qtext { margin: 0; font-size: 1.05rem; color: var(--ink, #22313f); }
.ggph ul.gghx-a-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ggph .gghx-a-chips li.gghx-a-chip { margin: 0; padding: 6px 12px; border-radius: 999px; background: #EAF3F0; border: 1px solid #CFE3DC; color: #2F5F53; font-size: .9rem; font-weight: 600; line-height: 1.3; }
.ggph .gghx-a-chips li.gghx-a-more { background: var(--soft, #f4f6f8); border-color: var(--line, #d9e2ea); color: var(--muted, #5a6b7b); }
html.gghx-dark .ggph .gghx-a-chips li.gghx-a-chip { background: #1B3230; border-color: #3E6B60; color: #A8DCCB; }
html.gghx-dark .ggph .gghx-a-chips li.gghx-a-more { background: #1C2935; border-color: #2E3D4C; color: #A3B3C2; }
.ggph a.gghx-a-go { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; text-decoration: none; box-sizing: border-box; }
.ggph a.gghx-a-go svg { width: 18px; height: 18px; flex: none; }
.ggph .gghx-a.has-two .gghx-a-also { padding-left: 28px; border-left: 1px solid var(--line, #d9e2ea); }
.ggph p.gghx-a-eyebrow { margin: 0 0 10px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #5a6b7b); }
.ggph ul.gghx-a-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ggph .gghx-a-list li { display: flex; gap: 14px; align-items: flex-start; margin: 0; }
.gghx-a-ico { flex: none; width: 44px; height: 44px; border-radius: 50%; background: #599082; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.gghx-a-ico svg { width: 22px; height: 22px; }
.gghx-a-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gghx-a-txt strong { color: var(--navy, #162E46); font-size: 1rem; }
.gghx-a-txt span { color: var(--muted, #5a6b7b); font-size: .95rem; line-height: 1.45; }
@media (max-width: 700px) {
  .ggph .gghx-a.has-two .gghx-a-body { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ggph .gghx-a.has-two .gghx-a-also { padding-left: 0; border-left: 0; padding-top: 18px; border-top: 1px solid var(--line, #d9e2ea); }
  .gghx-a-num { font-size: 2.8rem; }
  .ggph a.gghx-a-go { align-self: stretch; justify-content: center; }
}


/* ======================================================================== v1.5.5 */
/* "New this week", light mode only (option 2, approved Nov 15, 2026): the number is navy on a bright gold block,
   so the same gold as dark mode pops on the white card. Dark mode is unchanged (gold number, no block). */
html:not(.gghx-dark) .gghx-a-num { color: #162E46; background: #F9AD35; border-radius: 14px; padding: 8px 18px; font-size: 3.2rem; }
html:not(.gghx-dark) .ggph p.gghx-a-big { align-items: center; }
@media (max-width: 700px) { html:not(.gghx-dark) .gghx-a-num { font-size: 2.5rem; padding: 6px 14px; } }
