/* Generated verbatim from html/internal.html */
:root {
      /* ---- Brand colours (unchanged) ---- */
      --dark-blue: #223368;
      --lutheran-blue: #004580;
      --option-blue: #1A9EDC;
      --light-light-blue: #F0FAFF;
      --vic-light-blue: #D5F2FF;
      --gum-mid-green: #324437;
      --gum-tree-green: #3D5E46;
      --bark-brown: #D7D5C9;
      --bark-light: #EEEDE7;
      --wattle: #F0E477;
      --wattle-soft: #EDD889;
      --edu-orange: #F09577;
      --hero-blue: #A5E6FF;

      /* ---- Layout ---- */
      --container: 1280px;
      --page-pad: clamp(24px, 5vw, 64px);
      /* fluid horizontal gutter */
      --section-y: clamp(56px, 8vw, 104px);
      /* consistent vertical rhythm */
      --content-measure: 68ch;
      /* readable line length */

      /* ---- Spacing scale (8px base) ---- */
      --space-1: 4px;
      --space-2: 8px;
      --space-3: 12px;
      --space-4: 16px;
      --space-5: 20px;
      --space-6: 24px;
      --space-8: 32px;
      --space-10: 40px;
      --space-12: 48px;
      --space-16: 64px;

      /* ---- Radius / elevation ---- */
      --radius: 5px;
      /* brand radius (unchanged) */
      --radius-lg: 8px;
      --shadow-sm: 0 1px 3px rgba(34, 51, 104, .08), 0 1px 2px rgba(34, 51, 104, .06);
      --shadow-md: 0 10px 30px rgba(34, 51, 104, .14);

      --header-height: 96px;
      /* Approx height of sticky bar */
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
      color-scheme: light;
    }

    body {
      font-family: 'Sarabun', system-ui, sans-serif;
      color: var(--dark-blue);
      background: #fff;
    }

    a {
      text-decoration: none;
      color: inherit;
    }

    img {
      display: block;
      max-width: 100%;
    }

    .page {
      margin: 0 auto;
      overflow: clip;
    }

    /* Accessible focus ring — adaptive white+blue works on light and dark backgrounds */
    a:focus-visible,
    .btn:focus-visible,
    button:focus-visible,
    .nav-input:focus-visible,
    .link-teal:focus-visible,
    .slider-btn:focus-visible,
    .dropdown-toggle:focus-visible {
      outline: none;
      border-radius: var(--radius);
      box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--option-blue);
    }

    .skip-link {
      position: absolute;
      left: var(--space-4);
      top: -56px;
      z-index: 100;
      background: var(--dark-blue);
      color: #fff;
      padding: 12px 20px;
      border-radius: var(--radius);
      font-weight: 700;
    }

    .skip-link:focus {
      top: var(--space-4);
    }

    /* ---------- shared ---------- */
    .container {
      max-width: var(--container);
      margin: 0 auto;
      width: 100%;
    }

    h1,
    h2,
    h3 {
      font-family: 'Livvic', system-ui, sans-serif;
      font-weight: 500;
    }

    .h1 {
      font-family: 'Livvic', system-ui, sans-serif;
      font-weight: 400;
      font-size: clamp(52px, 8vw, 100px);
      line-height: 1.02;
      letter-spacing: -0.02em;
      text-wrap: balance;
    }

    .h2 {
      font-family: 'Livvic', system-ui, sans-serif;
      font-weight: 500;
      font-size: clamp(34px, 4.5vw, 55px);
      line-height: 1.15;
      letter-spacing: -0.01em;
      text-wrap: balance;
    }

    .card-title {
      font-family: 'Sarabun', sans-serif;
      font-weight: 600;
      font-size: clamp(22px, 2.4vw, 28px);
      line-height: 1.25;
      letter-spacing: -0.28px;
    }

    .body {
      font-size: 20px;
      line-height: 1.5;
      font-weight: 400;
    }

    .body-sm {
      font-size: 16px;
      line-height: 1.55;
      font-weight: 400;
    }

    /* buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      min-height: 51px;
      padding: 0 40px;
      border-radius: var(--radius);
      font-weight: 700;
      font-size: 18px;
      line-height: 1.5;
      cursor: pointer;
      border: none;
      white-space: nowrap;
      text-align: center;
    }

    .btn:hover {
      filter: brightness(.95);
    }

    .btn-yellow {
      background: var(--wattle);
      color: var(--dark-blue);
    }

    .btn-blue {
      background: var(--option-blue);
      color: #fff;
    }

    .btn-white {
      background: #fff;
      color: var(--lutheran-blue);
    }

    .btn-outline-white {
      background: transparent;
      color: #fff;
      border: 3px solid #fff;
    }

    .btn-outline-white:hover {
      background: #fff;
      color: var(--lutheran-blue);
      filter: none;
    }

    .btn-bark {
      background: var(--bark-brown);
      color: var(--gum-mid-green);
    }

    .link-teal {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: var(--option-blue);
      font-weight: 700;
      font-size: 18px;
      line-height: 1.5;
      cursor: pointer;
    }

    .link-teal img {
      width: 24px;
      height: 24px;
      flex: none;
    }

    .link-teal:hover {
      color: var(--lutheran-blue);
    }

    /* brand-tinted image placeholder — reads as an intentional media slot, not a dead grey slab */
    .img-ph {
      background: var(--bark-light);
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }

    .img-ph img {
      width: 120px;
      height: 103px;
      opacity: .85;
      flex: none;
    }

    /* ---------- Navbar (reused from home-updated-v3) ---------- */
    /* Fixed header — pinned to the top of the viewport at all times */
    header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 90;
    }

    /* Offset the page content by the header height so nothing hides underneath */
    main {
      padding-top: 150px;
    }

    .nav-top {
      background: var(--light-light-blue);
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: clamp(12px, 2vw, 30px);
      padding: 6px var(--space-5);
      flex-wrap: wrap;
    }

    .nav-top .call {
      color: var(--lutheran-blue);
      font-weight: 700;
      font-size: 18px;
      padding: 8px 12px;
    }

    .nav-portal-btn {
      background: var(--option-blue);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 40px;
      padding: 0 18px;
      border-radius: var(--radius);
      color: #fff;
      font-weight: 700;
      font-size: 18px;
      transition: filter 0.2s;
    }

    .nav-portal-btn:hover {
      filter: brightness(.93);
    }

    /* Sarabun reserves tall ascender space for Thai marks, so its Latin text sits low in the line box — lift the label back to the optical centre (the icon already centres correctly) */
    .nav-portal-btn .label {
      position: relative;
      top: -2px;
    }

    .nav-portal-btn img {
      width: 11px;
      height: 22px;
      flex: none;
    }

    .nav-ec {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 40px;
      color: var(--gum-tree-green);
      font-weight: 700;
      font-size: 18px;
      transition: color 0.2s;
    }

    .nav-ec:hover {
      color: var(--gum-mid-green);
    }

    .nav-ec img {
      width: 34px;
      height: 36px;
      flex: none;
    }

    .nav-main {
      background: #fff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: var(--space-6);
      padding: 8px var(--space-5);
      box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
      position: relative;
      z-index: 51;
    }

    .nav-logo {
      padding: 0;
      flex: none;
      z-index: 51;
    }

    .nav-logo img {
      height: 80px;
      width: auto;
      mix-blend-mode: multiply;
    }

    .nav-right {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 16px;
      flex: 1;
    }

    /* School Portal button that drops into the mobile drawer on the smallest screens */
    .drawer-portal {
      display: none;
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: clamp(14px, 1.8vw, 26px);
      flex-wrap: nowrap;
      justify-content: flex-end;
      width: 100%;
    }

    .nav-links a {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--dark-blue);
      font-weight: 700;
      font-size: 18px;
      padding: 6px 2px;
      border-radius: var(--radius);
      transition: color 0.2s;
    }

    .nav-links a:hover,
    .nav-links a[aria-current="page"] {
      color: var(--option-blue);
    }

    .nav-links img {
      width: 22px;
      height: 22px;
      flex: none;
    }

    /* Desktop Dropdown logic */
    .dropdown {
      position: relative;
      display: flex;
      align-items: center;
    }

    /* Hidden checkbox drives the mobile accordion state (CSS-only, no JS); ignored on desktop where hover/focus rules take over */
    .dropdown-toggle-cb {
      position: absolute;
      width: 1px;
      height: 1px;
      opacity: 0;
      pointer-events: none;
    }

    .dropdown-toggle {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--dark-blue);
      font-weight: 700;
      font-size: 18px;
      padding: 6px 2px;
      border-radius: var(--radius);
      background: none;
      border: none;
      cursor: pointer;
      font-family: inherit;
      transition: color 0.2s;
    }

    .dropdown-toggle img {
      width: 22px;
      height: 22px;
      flex: none;
      transition: transform 0.2s ease;
    }

    .dropdown-toggle:hover {
      color: var(--option-blue);
    }

    .dropdown-menu {
      position: absolute;
      top: 100%;
      left: 0;
      min-width: 240px;
      background: #fff;
      box-shadow: var(--shadow-md);
      border-radius: var(--radius-lg);
      padding: 12px 0;
      opacity: 0;
      visibility: hidden;
      transform: translateY(10px);
      transition: all 0.2s ease;
      z-index: 100;
      display: flex;
      flex-direction: column;
    }

    .dropdown-menu a {
      padding: 8px 20px;
      font-size: 16px;
      border-radius: 0;
      width: 100%;
    }

    .dropdown-menu a:hover {
      background: var(--light-light-blue);
      color: var(--lutheran-blue);
    }

    @media (min-width: 1151px) {

      /* Nudge the chevron down so it sits optically centred with the nav text (it reads a touch high otherwise) */
      .dropdown-toggle img {
        position: relative;
        top: 2px;
      }

      .dropdown:hover .dropdown-menu,
      .dropdown:focus-within .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
      }

      .dropdown:hover .dropdown-toggle img,
      .dropdown:focus-within .dropdown-toggle img {
        transform: rotate(180deg);
      }
    }

    .mobile-nav-controls {
      display: none;
      align-items: center;
      gap: 12px;
      z-index: 51;
    }

    .mobile-icon-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 44px;
      height: 44px;
      background: transparent;
      border: none;
      border-radius: var(--radius);
      cursor: pointer;
      color: var(--lutheran-blue);
    }

    .mobile-icon-btn:hover {
      background: var(--light-light-blue);
    }

    .mobile-icon-btn svg {
      width: 24px;
      height: 24px;
      fill: currentColor;
    }

    /* compact School Portal button sitting in the mobile control cluster */
    .mobile-nav-controls .nav-portal-btn {
      min-height: 44px;
      font-size: 16px;
      padding: 0 14px;
    }

    .mobile-nav-controls .nav-portal-btn .label {
      white-space: nowrap;
    }

    /* CSS-only burger (no JS) — a hidden checkbox holds the open/closed state */
    .nav-toggle {
      position: absolute;
      width: 1px;
      height: 1px;
      opacity: 0;
      pointer-events: none;
    }

    .nav-burger {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 6px;
      width: 44px;
      height: 44px;
      padding: 10px;
      cursor: pointer;
      border-radius: var(--radius);
      border: none;
      background: transparent;
      flex: none;
    }

    .nav-burger span {
      display: block;
      height: 2px;
      width: 100%;
      background: var(--dark-blue);
      border-radius: 2px;
      transition: transform 0.3s ease, background-color 0.2s ease;
      transform-origin: center;
    }

    .nav-burger:hover span {
      background: var(--option-blue);
    }

    .nav-toggle:checked~.mobile-nav-controls .nav-burger span:first-child {
      transform: translateY(4px) rotate(45deg);
      background: var(--option-blue);
    }

    .nav-toggle:checked~.mobile-nav-controls .nav-burger span:last-child {
      transform: translateY(-4px) rotate(-45deg);
      background: var(--option-blue);
    }

    .nav-toggle:focus-visible~.mobile-nav-controls .nav-burger {
      outline: none;
      box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--option-blue);
    }

    /* Specific containers hidden on desktop */
    .mobile-utility-links {
      display: none;
    }

    /* ---------- Sub page header ---------- */
    /* page gutter keeps the text aligned with every other section; the image still bleeds to the right edge */
    .subheader {
      background: var(--option-blue);
      padding: 0 var(--page-pad);
    }

    .subheader-inner {
      max-width: var(--container);
      margin: 0 auto;
      display: flex;
      align-items: stretch;
      gap: var(--space-8);
    }

    .subheader-text {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: var(--space-5);
      width: 640px;
      max-width: 100%;
      padding: var(--space-16) 0;
      flex: none;
    }

    .breadcrumbs {
      font-weight: 700;
      font-size: 14px;
      line-height: 1.2;
      letter-spacing: .03em;
      color: #fff;
    }

    .breadcrumbs .current {
      color: var(--wattle);
    }

    .subheader-text .h2 {
      color: #fff;
    }

    /* image column fills the header height and bleeds to the right viewport edge */
    .subheader-img {
      align-self: stretch;
      flex: 1;
      min-height: clamp(280px, 30vw, 380px);
      margin-right: calc((100% - 100vw) / 2);
    }

    /* ---------- Spotlight strip ---------- */
    .spotlight {
      background: var(--vic-light-blue);
      padding: clamp(32px, 4vw, 48px) var(--page-pad);
      display: flex;
      justify-content: center;
    }

    .spotlight-inner {
      max-width: var(--container);
      width: 100%;
    }

    .spotlight .label {
      color: var(--lutheran-blue);
      font-size: 14px;
      line-height: 1.2;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .08em;
    }

    .spotlight .h2 {
      color: var(--dark-blue);
      margin-top: var(--space-3);
    }

    /* ---------- Internal article rows ---------- */
    .internal {
      background: #fff;
      padding: var(--section-y) var(--page-pad);
      display: flex;
      justify-content: center;
    }

    .internal + .internal {
      padding-top: 0;
    }

    .internal-inner {
      max-width: var(--container);
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: clamp(48px, 6vw, 80px);
    }

    .article-row {
      display: flex;
      align-items: center;
      gap: var(--space-8);
      padding: var(--space-5) 0;
    }

    .article-row.reverse {
      flex-direction: row-reverse;
    }

    .article-media {
      width: 586px;
      flex: none;
      display: flex;
      flex-direction: column;
      gap: var(--space-5);
    }

    .article-media .img-ph {
      border-radius: var(--radius);
    }

    .article-media.single .img-ph {
      height: 475px;
    }

    .article-media.stacked .img-ph {
      height: 239px;
    }

    .article-media.grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: var(--space-5);
    }

    .article-media.grid .img-ph {
      height: 239px;
    }

    .article-content {
      flex: 1;
      min-width: 0;
      padding: 0 var(--space-12);
      display: flex;
      flex-direction: column;
      gap: var(--space-6);
    }

    .article-content h2 {
      font-family: 'Livvic', sans-serif;
      font-weight: 400;
      font-size: clamp(28px, 3.4vw, 36px);
      line-height: 1.15;
      letter-spacing: -0.72px;
      color: var(--lutheran-blue);
    }

    /* Text-only row — a single readable column with no media */
    .article-row.text-only .article-content {
      padding: 0;
      max-width: 900px;
      margin: 0 auto;
    }

    .article-content .lead {
      color: var(--lutheran-blue);
      font-size: 20px;
      line-height: 1.3;
      font-weight: 400;
    }

    .article-content p {
      color: #000;
      font-size: 16px;
      line-height: 1.3;
      font-weight: 400;
    }

    /* ---------- Useful documents ---------- */
    .docs {
      background: var(--light-light-blue);
      padding: var(--section-y) var(--page-pad);
      display: flex;
      justify-content: center;
    }

    .docs-inner {
      max-width: var(--container);
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: var(--space-5);
      align-items: center;
    }

    .docs .h2 {
      color: var(--lutheran-blue);
      width: 100%;
    }

    .docs-carousel {
      width: 100%;
      padding-block: var(--space-10);
      margin-block: calc(var(--space-10) * -1);
      overflow: hidden;
    }

    .docs-cards {
      display: flex;
      gap: 0;
      width: 100%;
    }

    .doc-card {
      background: #fff;
      border-radius: var(--radius);
      padding: var(--space-6);
      min-height: 300px;
      display: flex;
      flex-direction: column;
      gap: var(--space-3);
      box-shadow: var(--shadow-sm);
    }

    .doc-card:hover {
      box-shadow: var(--shadow-md);
    }

    .doc-card .doc-title {
      font-family: 'Sarabun', sans-serif;
      font-weight: 600;
      font-size: 22px;
      line-height: 1.25;
      color: var(--lutheran-blue);
    }

    .doc-card .doc-desc {
      font-size: 16px;
      line-height: 1.5;
      color: var(--dark-blue);
    }

    .doc-card .doc-dl {
      margin-top: auto;
      padding-top: var(--space-5);
      display: inline-flex;
      align-self: flex-start;
    }

    .doc-card .doc-dl img {
      width: 54px;
      height: 67px;
      flex: none;
    }

    .doc-card .doc-dl:hover {
      filter: brightness(.92);
    }

    .docs-slider {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      padding: var(--space-4) 0;
    }

    .slider-btn {
      background: #fff;
      border: none;
      width: 56px;
      min-width: 56px;
      height: 56px;
      border-radius: 50px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: var(--shadow-sm);
    }

    .slider-btn:hover {
      filter: brightness(.95);
    }

    .slider-btn img {
      width: 24px;
      height: 24px;
    }

    .slider-btn.prev img {
      transform: scaleX(-1);
    }

    .slider-dots {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .slider-dots span {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: rgba(0, 69, 128, .3);
    }

    .slider-dots span.swiper-pagination-bullet-active {
      background: var(--lutheran-blue);
      width: 10px;
      height: 10px;
    }

    /* ---------- School portal (reused from home-updated-v2) ---------- */
    .portal {
      background: var(--option-blue);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: clamp(24px, 5vw, 60px);
      padding: var(--section-y) var(--page-pad);
    }

    .portal-icon {
      position: relative;
      width: 80px;
      height: 130px;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      flex: none;
    }

    .portal-icon .door {
      width: 60px;
      height: 120px;
      flex: none;
    }

    .portal-icon .arrow {
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      width: 34px;
      height: 24px;
      filter: brightness(0) invert(1);
    }

    .portal-content {
      display: flex;
      flex-direction: column;
      gap: var(--space-5);
    }

    .portal-content .h2 {
      color: #fff;
    }

    .portal-content .sub {
      color: #fff;
      font-size: 20px;
      line-height: 1.5;
    }

    .portal-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 15px;
    }

    /* ---------- Footer (reused from home-updated-v2) ---------- */
    .footer {
      background: var(--light-light-blue);
      padding: var(--section-y) var(--page-pad);
      display: flex;
      flex-direction: column;
      gap: var(--space-8);
      align-items: center;
    }

    .footer>* {
      width: 100%;
      max-width: var(--container);
    }

    .footer-logos {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: var(--space-6);
      flex-wrap: wrap;
    }

    .footer-logos .levnt img {
      height: 89px;
      width: auto;
      mix-blend-mode: multiply;
    }

    .footer-logos .right {
      display: flex;
      align-items: center;
      gap: var(--space-5);
    }

    .footer-logos .right img {
      height: 88px;
      width: auto;
      mix-blend-mode: multiply;
    }

    .footer-main {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: var(--space-10);
    }

    .foot-contact {
      width: 227px;
      flex: none;
      display: flex;
      flex-direction: column;
      gap: var(--space-6);
    }

    .foot-contact .head {
      font-weight: 700;
      font-size: 1rem;
      color: var(--dark-blue);
      margin-bottom: var(--space-1);
    }

    .foot-contact .lines {
      display: flex;
      flex-direction: column;
      gap: 12px;
      color: var(--dark-blue);
      font-size: 1rem;
      line-height: 1.5;
    }

    .foot-social {
      display: flex;
      gap: var(--space-3);
    }

    .foot-social a {
      display: inline-flex;
      padding: 8px;
      border-radius: var(--radius);
    }

    .foot-social img {
      width: 24px;
      height: 24px;
      flex: none;
    }

    .foot-links {
      display: flex;
      gap: var(--space-8);
      flex-wrap: wrap;
    }

    .foot-links .list {
      display: flex;
      flex-direction: column;
    }

    .foot-links a {
      padding: 8px 0;
      color: var(--dark-blue);
      font-weight: 700;
      font-size: 1rem;
    }

    .foot-links a:hover {
      color: var(--option-blue);
    }

    .foot-ack {
      width: 339px;
      flex: none;
      color: var(--dark-blue);
    }

    .foot-ack .head {
      font-weight: 700;
      font-size: 1rem;
    }

    .foot-ack p {
      font-size: 1rem;
      line-height: 1.55;
      font-weight: 400;
      margin-top: var(--space-2);
    }

    .footer-credits {
      display: flex;
      flex-direction: column;
      gap: var(--space-8);
    }

    .footer-credits .divider {
      height: 1px;
      background: var(--dark-blue);
      opacity: .25;
    }

    .credits-row {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: var(--space-6);
      flex-wrap: wrap;
      color: var(--dark-blue);
    }

    .credits-row .copy {
      font-weight: 300;
      font-size: 16px;
      line-height: 1.5;
    }

    .credits-links {
      display: flex;
      gap: var(--space-6);
      font-size: 14px;
      flex-wrap: wrap;
    }

    .credits-links a {
      text-decoration: underline;
    }

    .credits-links a:hover {
      color: var(--option-blue);
    }

    /* ---------- responsive ---------- */
    @media (max-width:1200px) {
      .docs-cards {
        grid-template-columns: repeat(2, 1fr);
      }

      .subheader-inner,
      .article-row,
      .article-row.reverse {
        flex-wrap: wrap;
      }

      /* stacked: drop the section gutter so the image runs full-bleed; the text carries the gutter instead */
      .subheader {
        padding: 0;
      }

      .subheader-text {
        width: 100%;
        padding: var(--space-12) var(--page-pad);
      }

      .article-row,
      .article-row.reverse {
        flex-direction: column;
      }

      .article-media {
        width: 100%;
      }

      .article-media.single .img-ph {
        height: auto;
        aspect-ratio: 16/11;
      }

      .article-content {
        padding: 0;
      }

      .subheader-img {
        width: 100%;
        flex: 0 0 100%;
        min-height: 0;
        aspect-ratio: 16/9;
        align-self: auto;
        margin-right: 0;
      }

      .footer-main {
        flex-wrap: wrap;
      }
    }

    @media (max-width:820px) {
      .portal {
        flex-direction: column;
        text-align: center;
      }

      .portal-content {
        align-items: center;
      }

      .subheader-text {
        gap: var(--space-8);
      }
    }

    @media (max-width:640px) {
      .docs-cards {
        grid-template-columns: 1fr;
      }

      .article-media.grid {
        grid-template-columns: 1fr;
      }
    }

    /* ---------- Navbar responsive (from home-updated-v3) ---------- */
    @media (max-width: 1150px) {

      /* Hide top utility bar entirely to save space */
      .nav-top {
        display: none;
      }

      /* Top bar is gone, so the fixed header is just the main bar — shrink the content offset to match */
      main {
        padding-top: 84px;
      }

      /* Show mobile-specific icons (Phone, Search, Burger) */
      .mobile-nav-controls {
        display: flex;
      }

      /* Reduced vertical padding balances the larger logo so the bar height stays the same */
      .nav-main {
        flex-wrap: wrap;
        row-gap: 0;
        padding: 6px var(--space-5);
        border-bottom: 1px solid rgba(34, 51, 104, .1);
      }

      .nav-logo img {
        height: 72px;
      }

      /* The Mobile Drawer - hidden by default, toggled via the hidden checkbox (no JS) */
      .nav-right {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        height: calc(100vh - 84px);
        height: calc(100dvh - 84px);
        overflow-y: auto;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
        z-index: 40;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
      }

      .nav-toggle:checked~.nav-right {
        opacity: 1;
        visibility: visible;
        transform: none;
      }

      /* Reveal mobile-specific utility links inside the drawer */
      .mobile-utility-links {
        display: flex;
        flex-direction: column;
        background: var(--light-light-blue);
        padding: var(--space-4) var(--page-pad);
        gap: 16px;
        border-top: 1px solid rgba(34, 51, 104, .1);
        border-bottom: 1px solid rgba(34, 51, 104, .1);
      }

      /* Convert Desktop Nav Links to Mobile Accordions */
      .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
      }

      .nav-links>a,
      .dropdown-toggle {
        width: 100%;
        padding: 18px var(--page-pad);
        border-bottom: 1px solid rgba(34, 51, 104, .06);
        font-size: 18px;
        justify-content: space-between;
      }

      .nav-links>a:hover,
      .dropdown-toggle:hover {
        background: var(--light-light-blue);
      }

      /* Accordion behavior for dropdowns */
      .dropdown {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
      }

      /* Base state: dropdown menu is hidden/collapsed on mobile */
      .dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background: var(--light-light-blue);
        padding: 0;
      }

      /* Expanded state toggled by the hidden checkbox (label acts as the toggle) */
      .dropdown-toggle-cb:checked~.dropdown-menu {
        display: flex;
      }

      .dropdown-toggle-cb:checked~.dropdown-toggle img {
        transform: rotate(180deg);
      }

      .dropdown-menu a {
        padding: 14px var(--page-pad);
        padding-left: calc(var(--page-pad) + 12px);
        border-bottom: 1px solid rgba(34, 51, 104, .04);
      }
    }

    /* very small phones: the School Portal button can't fit beside the burger, so move it into the drawer instead of trimming it to an icon */
    @media (max-width: 560px) {
      .mobile-nav-controls .nav-portal-btn {
        display: none;
      }

      .drawer-portal {
        display: flex;
        padding: var(--space-4) var(--page-pad);
        border-bottom: 1px solid rgba(34, 51, 104, .1);
      }

      .drawer-portal .nav-portal-btn {
        width: 100%;
        min-height: 48px;
      }
    }

    /* honour reduced-motion: menu still opens/closes, just without the slide/icon animation */
    @media (prefers-reduced-motion: reduce) {

      .nav-right,
      .nav-burger span,
      .acc-panel,
      .acc-panel p,
      .acc-title img {
        transition: none;
      }
    }
