/* /manitoba and /manitoba/science/grade-N, first paint and page (conversion B, 13 Nov 2026).
   ONE file, two readers: the server links it in the <head> of those pages so the HTML it sends (the hero, the whole-year
   bundles, a grade page) paints before any script runs; the React pages import the same file, so when React replaces
   the server's HTML the boxes are the same and nothing moves. Keep it small: it blocks the first paint. */

/* ------------------------------------------------------------ the bars above <main> before the site chrome mounts */
.mfp-bar { display: block; height: 121px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.mfp-bar::before { content: ""; display: block; height: 40px; background: #0b1531; }
.mfp-hidden { display: none; }

/* ------------------------------------------------------------ /manitoba hero (moved here from pages/manitoba.css) */
.mbh {
  --mbh-night: #060b1c;
  --mbh-night-2: #0b1531;
  --mbh-porcelain: #f6f2ea;
  --mbh-paper: #fbf8f2;
  --mbh-ink: #151a2d;
  --mbh-ink-2: #3d4360;
  --mbh-copper: #c8814f;
  --mbh-copper-deep: #8f4f2b;
  --mbh-copper-light: #f1b987;
  --mbh-line: rgba(143, 79, 43, 0.22);
  --mbh-serif: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --mbh-mono: var(--hv2-mono, ui-monospace, Menlo, Consolas, monospace);
  --mbh-sans: var(--hv2-sans, Inter, system-ui, sans-serif);
  min-height: 100vh;
  background: var(--mbh-porcelain);
  color: var(--mbh-ink);
  font-family: var(--mbh-sans);
}
.mbh *, .mbh *::before, .mbh *::after { box-sizing: border-box; }
.mbh a { color: inherit; text-underline-offset: 3px; }
.mbh a:focus-visible { outline: 3px solid var(--mbh-copper); outline-offset: 3px; border-radius: 6px; }
.mbh-wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .mbh-wrap { padding: 0 28px; } }

/* ------------------------------------------------------------ hero */
.mbh-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  color: var(--mbh-porcelain);
  background:
    radial-gradient(48rem 30rem at 82% 40%, rgba(200, 129, 79, 0.22), transparent 64%),
    radial-gradient(40rem 26rem at 0% 0%, rgba(27, 44, 99, 0.65), transparent 70%),
    linear-gradient(180deg, var(--mbh-night) 0%, var(--mbh-night-2) 100%);
  border-bottom: 1px solid rgba(200, 129, 79, 0.45);
}
.mbh-hero__grid { display: grid; gap: 24px; align-items: center; padding-top: 28px; padding-bottom: 40px; }
@media (min-width: 900px) { .mbh-hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 56px; padding-top: 36px; padding-bottom: 64px; } }
.mbh-crumbs ol { display: flex; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; font-size: 0.86rem; color: rgba(246, 242, 234, 0.72); }
.mbh-crumbs li + li::before { content: "/"; margin-right: 8px; color: rgba(241, 185, 135, 0.6); }
.mbh-kicker { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 0.74rem/1.3 var(--mbh-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--mbh-copper-light); }
.mbh-kicker__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mbh-copper); box-shadow: 0 0 12px rgba(241, 185, 135, 0.9); }
.mbh-h1 { margin: 14px 0 0; max-width: 18ch; font-family: var(--mbh-serif); font-weight: 340; font-variation-settings: "opsz" 144, "SOFT" 40; font-size: clamp(2.15rem, 4.4vw, 3.6rem); line-height: 1.04; letter-spacing: -0.024em; text-wrap: balance; color: #fffaf2; }
.mbh-lead { margin: 18px 0 0; max-width: 38rem; font-size: 1.06rem; line-height: 1.6; color: rgba(246, 242, 234, 0.84); }
.mbh-jumps { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.mbh-jumps a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(241, 185, 135, 0.45); font-size: 0.95rem; font-weight: 600; text-decoration: none; color: #fffaf2; background: rgba(255, 255, 255, 0.04); transition: background 0.18s ease, border-color 0.18s ease; }
.mbh-jumps a:hover { background: rgba(200, 129, 79, 0.18); border-color: var(--mbh-copper-light); }
.mbh-jumps li:first-child a { color: var(--mbh-night); border-color: transparent; background: linear-gradient(135deg, #f1b987 0%, #d98f58 52%, #c8814f 100%); box-shadow: 0 10px 28px -10px rgba(200, 129, 79, 0.85); }
@media (max-width: 639px) {
  /* Phone: a short hero, so the whole-year bundles are on the second screen. One swipeable row of jump links. */
  .mbh-hero__grid { gap: 12px; padding-top: 22px; padding-bottom: 22px; }
  .mbh-crumbs ol { margin-bottom: 18px; }
  .mbh-jumps { flex-wrap: nowrap; overflow-x: auto; margin-top: 18px; padding-bottom: 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .mbh-jumps li { flex: 0 0 auto; scroll-snap-align: start; }
  .mbh-hero__copy { min-width: 0; }
  .mbh-plate { display: none; }
}

/* ------------------------------------------------------------ whole-year bundles (from #942, merged with the live band) */
.yb { background: #0b1626; color: #f6f2ea; border-bottom: 1px solid rgba(241, 185, 135, 0.22); font-family: Inter, system-ui, sans-serif; }
.yb__inner { max-width: 1180px; margin: 0 auto; padding: 1.4rem 16px 1.6rem; }
@media (min-width: 640px) { .yb__inner { padding-left: 28px; padding-right: 28px; } }
.yb__kicker { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.35rem; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #f1b987; }
.yb__dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #c8814f; box-shadow: 0 0 0 4px rgba(200, 129, 79, 0.22); }
.yb__h { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; font-weight: 600; color: #fffaf2; }
.yb__lead { margin: 0.4rem 0 0.9rem; font-size: 0.95rem; line-height: 1.5; color: #d7dcea; max-width: 46rem; }
.yb__note { display: block; opacity: 0.85; }
.yb__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.yb__row { display: grid; gap: 0.35rem; }
.yb__grade { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #f1b987; }
.yb__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.yb a.yb__chip { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 1rem; border-radius: 999px; border: 1px solid rgba(241, 185, 135, 0.5); background: rgba(255, 255, 255, 0.05); color: #fffaf2; font-weight: 600; font-size: 0.95rem; text-decoration: none; }
.yb a.yb__chip::after { content: "\2197"; margin-left: 0.4rem; opacity: 0.8; }
.yb a.yb__chip:hover { background: rgba(200, 129, 79, 0.22); border-color: #f1b987; }
.yb a.yb__chip--both { color: #0b1626; border-color: transparent; background: linear-gradient(135deg, #f1b987 0%, #d98f58 52%, #c8814f 100%); }
.yb a.yb__chip:focus-visible, .yb a.yb__units:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.yb a.yb__units { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; font-size: 0.9rem; font-weight: 600; color: #f6f2ea; text-decoration: underline; text-underline-offset: 3px; }
.yb__sub { margin: 1.1rem 0 0.5rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #f1b987; }
@media (min-width: 900px) {
  .yb__inner { padding-top: 2rem; padding-bottom: 2.2rem; }
  .yb__list { gap: 0.5rem; }
  .yb__row { grid-template-columns: 9rem auto 1fr; align-items: center; column-gap: 1rem; }
  .yb a.yb__units { justify-self: end; }
}

/* ------------------------------------------------------------ /manitoba/science/grade-N */
.mgp { background: #f6f2ea; color: #151a2d; font-family: Inter, system-ui, sans-serif; min-height: 100vh; }
.mgp *, .mgp *::before, .mgp *::after { box-sizing: border-box; }
.mgp a { color: inherit; text-underline-offset: 3px; }
.mgp a:focus-visible { outline: 3px solid #c8814f; outline-offset: 3px; border-radius: 4px; }
.mgp-wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .mgp-wrap { padding: 0 28px; } }
.mgp-hero { background: linear-gradient(180deg, #060b1c 0%, #0b1531 100%); color: #f6f2ea; padding: 22px 0 26px; border-bottom: 1px solid rgba(200, 129, 79, 0.45); }
.mgp-crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 0.86rem; color: rgba(246, 242, 234, 0.75); }
.mgp-crumbs li + li::before { content: "/"; margin-right: 8px; color: rgba(241, 185, 135, 0.6); }
.mgp-kicker { margin: 0; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #f1b987; }
.mgp-bundle .mgp-kicker { color: #8f4f2b; }
.mgp-h1 { margin: 10px 0 0; max-width: 24ch; font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.9rem); line-height: 1.08; letter-spacing: -0.015em; color: #fffaf2; }
.mgp-lead { margin: 12px 0 0; max-width: 42rem; font-size: 1rem; line-height: 1.55; color: rgba(246, 242, 234, 0.86); }
.mgp-body { padding-top: 20px; padding-bottom: 48px; }
.mgp-bundle { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: start; padding: 16px; background: #fff; border: 1px solid rgba(143, 79, 43, 0.25); border-radius: 16px; box-shadow: 0 16px 34px -26px rgba(11, 21, 49, 0.6); }
@media (min-width: 900px) { .mgp-bundle { grid-template-columns: 200px minmax(0, 1fr); gap: 28px; padding: 24px; } }
.mgp-cover { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; background: #eae4d8; box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.45); }
.mgp-bundle__h { margin: 6px 0 0; font-size: 1.25rem; line-height: 1.25; font-weight: 800; }
.mgp-bundle__line { margin: 6px 0 0; font-size: 0.95rem; line-height: 1.5; color: #3d4360; }
.mgp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 12px 0 0; }
.mgp a.mgp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 10px; background: #0f766e; color: #fff; font-weight: 800; text-decoration: none; }
.mgp a.mgp-btn::after { content: "\2197"; margin-left: 6px; }
.mgp a.mgp-btn:hover { background: #115e59; }
.mgp a.mgp-btn--small { padding: 0 16px; font-size: 0.95rem; }
.mgp a.mgp-more { font-size: 0.92rem; font-weight: 650; display: inline-flex; align-items: center; min-height: 44px; }
.mgp-also { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid rgba(143, 79, 43, 0.2); display: grid; gap: 6px; font-size: 0.92rem; color: #3d4360; }
.mgp a.mgp-also__link { font-weight: 700; color: #0f5f58; }
.mgp-section { margin-top: 36px; }
.mgp-h2 { margin: 0 0 12px; font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-weight: 450; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.15; color: #0b1531; }
.mgp-units { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 900px) { .mgp-units { grid-template-columns: 1fr 1fr; } }
.mgp-unit { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 14px; background: #fff; border: 1px solid #e3ddd0; border-radius: 14px; }
.mgp-unit__h { margin: 0; font-size: 1.02rem; line-height: 1.3; font-weight: 800; }
.mgp-unit__codes { margin: 4px 0 0; font: 600 0.82rem/1.4 ui-monospace, Menlo, Consolas, monospace; color: #8f4f2b; }
.mgp-inside { margin: 8px 0 0; padding-left: 1.1rem; font-size: 0.92rem; line-height: 1.5; color: #3d4360; }
.mgp-strands { margin: 0 0 14px; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.mgp-strands strong { display: inline-block; min-width: 1.6rem; color: #8f4f2b; }
.mgp-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e3ddd0; font-size: 0.92rem; }
.mgp-table caption { text-align: left; font-weight: 700; padding: 0 0 8px; }
.mgp-table th, .mgp-table td { text-align: left; padding: 10px 12px; border-top: 1px solid #eee7da; vertical-align: top; }
.mgp-table thead th { border-top: 0; background: #fbf8f2; }
.mgp-free { margin: 0; padding-left: 1.1rem; display: grid; gap: 8px; line-height: 1.5; }
.mgp-free a { font-weight: 700; }
.mgp-grades p { margin: 0 0 8px; }
.mgp-grades a { font-weight: 700; display: inline-block; padding: 10px 0; }
