/* BrainBit Teaching - shared chrome: fonts, tokens, top bar, header, footer,
   buttons, WhatsApp float and the navy page band. Linked before site.css. */

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/SourceSans3-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/SourceSans3-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/SourceSans3-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #0d3b73;
  --blue: #1677d2;
  --sky: #29a3e0;
  --sky-surface: #e5f3fc;
  --surface: #e5f3fc;
  --orange: #f28c28;
  --orange-hover: #f7a14b;
  --orange-edge: #c9691a;
  --gold: #e9b10e;
  --gold-ink: #8a6514;
  --gold-surface: #fbf3dc;
  --paper: #ffffff;
  --ink: #132238;
  --ink-soft: #33465c;
  --muted: #5a6b80;
  --line: #dbe4ee;
  /* One family since the homepage redesign (M2); the display name stays for the rules that use it. */
  --font-display: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 20;
  background: var(--navy);
  color: #fff;
  padding: 0.4rem 0.8rem;
  text-decoration: none;
}
.skip-link:focus { top: 12px }

/* Visible keyboard focus everywhere; white on the navy bars. */
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px }
.topbar :focus-visible, .site-foot :focus-visible { outline-color: #fff }

/* ---- header: flat nav >= 1024px, Menu button below ---- */
.site-head {
  position: relative;
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.site-head-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  text-decoration: none;
  color: var(--navy);
}
.site-brand b {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
}
.site-nav { display: flex; align-items: center; gap: 1.3rem; margin-left: auto }
.site-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--blue) }
.site-nav a[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--orange);
}
.site-nav .nav-signin { color: var(--navy); padding-left: 1.3rem; border-left: 1px solid var(--line); border-bottom: 0 }
.site-nav .nav-student { display: none }
.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--orange);
  color: var(--ink);
  box-shadow: 0 2px 0 var(--orange-edge);
}
.nav-cta:hover { background: var(--orange-hover); color: var(--ink) }
.menu-btn {
  display: none;
  min-height: 44px;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.menu-btn::before { content: "☰"; margin-right: 0.4rem; font-weight: 400 }
html.menu-open .menu-btn::before { content: "✕" }
.topbar-student { color: #fff; font-weight: 600; text-decoration: none }
.topbar-student:hover { text-decoration: underline; color: #fff }

@media (max-width: 1023px) {
  .menu-btn { display: inline-flex; align-items: center }
  .nav-cta { margin-left: auto }
  html:not(.js-menu) .menu-btn { display: none }
  /* Without JS the links stay visible as a scrolling row. */
  html:not(.js-menu) .site-head-inner { flex-wrap: wrap }
  html:not(.js-menu) .site-nav {
    order: 3; flex: 1 1 100%; margin-left: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none;
  }
  html.js-menu .site-nav { display: none }
  html.js-menu.menu-open .site-nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
    max-height: calc(100vh - 100%); overflow-y: auto;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 18px rgb(19 34 56 / 14%);
    padding: 0.25rem 24px 1rem;
  }
  html.js-menu.menu-open body { overflow: hidden }
  html.js-menu .site-nav a {
    display: flex; align-items: center; min-height: 48px;
    font-size: 1.05rem; border-bottom: 1px solid var(--line);
  }
  html.js-menu .site-nav a[aria-current="page"] { border-bottom-color: var(--line); box-shadow: inset 4px 0 0 var(--orange); padding-left: 0.8rem }
  html.js-menu .site-nav .nav-signin { padding-left: 0; border-left: 0 }
  html.js-menu .site-nav .nav-student { display: flex; color: var(--blue) }
}

/* ---- footer: brand block + 4 columns; columns fold on phones (chrome.js) ---- */
.site-foot {
  background: var(--navy);
  margin-top: 3rem;
  color: #cfe0ff;
  font-size: 0.92rem;
}
.site-foot-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 24px 2rem;
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 2rem 1.5rem;
  align-items: start;
}
.foot-brand-block { display: grid; gap: 0.6rem }
.foot-about { margin: 0; color: #cfe0ff }
.foot-brand-block .contact-links { flex-direction: column; color: #fff; font-size: 0.95rem }
.foot-col summary {
  list-style: none; cursor: default;
  color: #fff; font-weight: 700; font-size: 1rem; margin-bottom: 0.7rem;
}
.foot-col summary::-webkit-details-marker { display: none }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem }
.foot-col a { color: #cfe0ff; text-decoration: none }
.foot-col a:hover { color: #fff; text-decoration: underline }
.foot-legal {
  grid-column: 1 / -1; margin: 0; padding-top: 1rem; max-width: none;
  border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 0.82rem;
}
@media (max-width: 1279px) {
  .site-foot-inner { grid-template-columns: repeat(4, 1fr) }
  .foot-brand-block { grid-column: 1 / -1 }
  .foot-brand-block .contact-links { flex-direction: row }
}
@media (max-width: 767px) {
  /* bottom room so the WhatsApp button never covers the legal line */
  .site-foot-inner { grid-template-columns: 1fr; gap: 0; padding: 2rem 16px 5rem }
  .foot-brand-block { padding-bottom: 1rem }
  .foot-col { border-top: 1px solid rgba(255, 255, 255, 0.18) }
  .foot-col summary {
    cursor: pointer; margin: 0; min-height: 48px;
    display: flex; align-items: center; justify-content: space-between;
  }
  .foot-col summary::after { content: "+"; font-size: 1.3rem; font-weight: 400 }
  .foot-col[open] summary::after { content: "−" }
  .foot-col ul { padding-bottom: 1rem }
  .foot-col a { display: inline-block; padding: 0.35rem 0 }
  .foot-legal { margin-top: 0.5rem }
}

/* ---- CTAs ---- */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.7rem 1.25rem;
  background: var(--orange);
  color: var(--navy);
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: 0 3px 0 var(--orange-edge);
}
.cta:hover { background: var(--orange-hover); color: var(--navy) }
.cta:active { box-shadow: 0 1px 0 var(--orange-edge); transform: translateY(2px) }

.cta-quiet {
  background: #fff;
  color: var(--blue);
  border: 1px solid var(--blue);
  box-shadow: none;
}
.cta-quiet:hover { background: var(--sky-surface); color: var(--navy) }

.cta-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: none;
}
.cta-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- contact: top strip, footer block, WhatsApp button ---- */
.ic { width: 1.05em; height: 1.05em; flex: none; vertical-align: -0.15em }
.contact-links { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0; padding: 0 }
.contact-links a {
  display: inline-flex; align-items: center; gap: 0.4em;
  color: inherit; text-decoration: none; font-weight: 600;
}
.contact-links a:hover span { text-decoration: underline }
/* site.css loads after this file and its a:hover (0,1,1) would turn these navy */
.topbar .topbar-links a:hover { color: #fff }
.site-foot .contact-links a:hover { color: #fff }
.contact-links .short { display: none }

/* ---- top bar: announcement left, student + contact links right ----
   >= 1280 everything; 1024-1279 short contact labels; 768-1023 the full
   announcement only; < 768 the short announcement link only. */
.topbar { background: var(--navy); color: #cfe0ff; font-size: 0.88rem }
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 4px 24px; min-height: 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 0.4rem 1.2rem;
}
.topbar-note { opacity: 0.85 }
.topbar-right { display: flex; align-items: center; gap: 1.2rem; margin-left: auto }
.topbar-links a { color: #fff }
.announce { display: flex; align-items: center; gap: 0.5rem; margin: 0; color: #fff; max-width: none }
.announce-link, .announce-short { color: var(--gold); font-weight: 700; text-decoration: underline; text-underline-offset: 2px }
.topbar .announce a:hover { color: #fff }
.announce-short { display: none }
.announce-x {
  display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: #cfe0ff; font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.announce-x:hover { background: rgba(255, 255, 255, 0.12); color: #fff }
html.ann-off .announce { display: none }
@media (max-width: 1279px) {
  .topbar-links .full { display: none }
  .topbar-links .short { display: inline }
}
@media (max-width: 1023px) {
  .topbar-right { display: none }
  .topbar-inner { justify-content: center }
  html.ann-off .topbar { display: none }
}
@media (max-width: 767px) {
  .topbar-inner { padding: 2px 8px 2px 16px }
  .announce { width: 100%; justify-content: space-between }
  .announce-full { display: none }
  .announce-short { display: inline; padding: 0.6rem 0 }
  .announce-x { width: 44px; height: 44px }
}
.foot-brand { display: flex; align-items: center; gap: 0.6rem; margin: 0; color: #fff; font-family: var(--font-display); font-size: 1.15rem }
.foot-brand img { border-radius: 6px; background: #fff; box-shadow: none }
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.wa-float .ic { width: 30px; height: 30px }
.wa-float:hover { background: #1fb457; color: #fff }
.wa-float:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px }
@media (max-width: 767px) {
  .site-head-inner { padding: 10px 16px; gap: 0.5rem }
  html.js-menu.menu-open .site-nav { padding: 0.25rem 16px 1rem }
  .site-brand { gap: 0.45em }
  .site-brand b { font-size: 1.05rem; letter-spacing: 0 }
  .brand-mark { width: 28px; height: 28px }
  .nav-cta { font-size: 0.95rem; padding: 0 0.9rem }
  .wa-float { width: 50px; height: 50px; right: 14px; bottom: 14px }
}
/* Narrow phones show the mark alone: the full name never fits beside Start free
   and Menu, and the brand is never shortened. The link's aria-label names it. */
@media (max-width: 479px) {
  .site-brand .brand-name { display: none }
  .brand-mark { width: 36px; height: 36px }
}

.cta-gold { background: var(--gold); color: var(--navy); box-shadow: 0 3px 0 #b88a08 }
.cta-gold:hover { background: #f2c232; color: var(--navy) }

@media (max-width: 400px) {
  .site-head-inner, .site-foot-inner { padding-left: 16px; padding-right: 16px }
}

/* ---- navy page band (inner pages) ---- */
.page-band {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff;
  padding: 2.6rem 0 2.4rem;
}
.page-band-inner { max-width: 1080px; margin: 0 auto; padding: 0 22px }
.page-band h1, .page-band h2 { color: #fff }
.page-band .band-card h1, .page-band .band-card h2, .page-band .band-card h3 { color: var(--ink) }
.band-lead { color: #fff }
.page-band .crumbs, .page-band .crumbs a, .page-band .crumbs [aria-current="page"] { color: #fff }
.page-band .crumbs a:hover { color: #fff; text-decoration: underline }
.band-tag {
  display: inline-block; margin: 0 0 0.9rem; padding: 0.2rem 0.75rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  background: var(--gold); color: var(--navy); border-radius: 999px;
}
.band-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1.2rem }
.band-chips li {
  font-size: 0.9rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.3); color: #fff;
}
.page-band.split .page-band-inner { display: grid; gap: 2rem; align-items: center }
@media (min-width: 900px) {
  .page-band.split .page-band-inner { grid-template-columns: 1.1fr minmax(300px, 420px) }
}
.band-card {
  background: #fff; color: var(--ink); border-radius: 12px; padding: 1.4rem;
  box-shadow: 0 18px 40px rgba(5, 25, 60, 0.35);
}
@media (max-width: 400px) {
  .page-band-inner { padding-left: 16px; padding-right: 16px }
}
/* ---- Premium Plus branded links (test-entry, result; tests/assets/brand.js) ----
   bb-pending is added only by the page's inline head script and drops after
   1500 ms at most; bb-branded swaps the full chrome for the school's slim one.
   The navy band stays in both modes. */
.branded-head, .branded-foot { display: none }
html.bb-pending .topbar, html.bb-pending .site-head, html.bb-pending .site-foot, html.bb-pending .wa-float { visibility: hidden }
html.bb-branded .topbar, html.bb-branded .site-head, html.bb-branded .site-foot, html.bb-branded .wa-float { display: none }
html.bb-branded .branded-head { display: block; background: #fff; color: var(--ink); border-bottom: 1px solid var(--line) }
.branded-head-inner {
  max-width: 1080px; margin: 0 auto; padding: 8px 22px; min-height: 56px; box-sizing: border-box;
  display: flex; align-items: center; gap: 0.75rem;
}
.branded-head .bb-name {
  min-width: 0; color: var(--navy); font-family: var(--font-display); font-weight: 700;
  font-size: 1.25rem; letter-spacing: 0.02em; overflow-wrap: anywhere;
}
html.bb-branded .branded-foot {
  display: block; margin: 0; padding: 0.75rem 16px; text-align: center;
  background: var(--navy); color: #cfe0ff; font-size: 0.85rem;
}
.branded-foot .bb-made { color: #fff; opacity: 1; font-size: 0.85rem; font-weight: 600 }
.branded-foot .bb-made:hover { color: #fff; text-decoration: underline }
@media (max-width: 400px) {
  .branded-head-inner { padding-left: 16px; padding-right: 16px }
  .branded-head .bb-name { font-size: 1.1rem }
}

/* ---- cookie notice: in the page flow above the top bar, so it never covers
   the page (or the try card). Shown while html.consent-ask, which the head
   script sets before the first paint; track.js removes it on Accept/Decline. ---- */
.consent { display: none; background: var(--gold-surface); border-bottom: 1px solid #ecd48a; color: var(--ink) }
html.consent-ask .consent { display: block }
.consent-inner {
  max-width: 1200px; margin: 0 auto; padding: 10px 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
}
.consent p { margin: 0; max-width: none; font-size: 0.95rem }
.consent a { color: var(--navy); font-weight: 700 }
.consent-actions { display: flex; gap: 8px }
.consent button {
  min-height: 44px; padding: 0 18px; border-radius: 8px; cursor: pointer;
  font: inherit; font-weight: 700; border: 1px solid var(--navy);
}
.consent-yes { background: var(--navy); color: #fff }
.consent-no { background: #fff; color: var(--navy) }
.consent button:focus-visible, .consent a:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px }
.consent-reset {
  min-height: 44px; padding: 0 14px; margin-left: 4px; cursor: pointer; font: inherit; font-weight: 700;
  background: #fff; color: var(--navy); border: 1px solid var(--navy); border-radius: 8px;
}
@media (max-width: 767px) {
  .consent-inner { padding: 10px 16px }
  .consent-actions { width: 100% }
  .consent button { flex: 1 }
}

@media print {
  .topbar, .site-head, .site-foot, .wa-float, .consent { display: none }
  .page-band { background: #fff; color: var(--ink) }
  .page-band h1, .page-band h2, .band-lead, .page-band .crumbs, .page-band .crumbs a { color: var(--ink) }
}
