/* ============================================================================
   R630 · iPad = MOBILE UI (2026-12-02)
   GENERATED FILE — do not hand-edit the copied block below.
   Regenerate after any mobile.css change:
     copy mobile.css's <=767 block again (see backup folder README).
   ---------------------------------------------------------------------------
   WHY: at 768–1366px the site rendered the *desktop* layout on touch tablets
   (Bootstrap expands .navbar-collapse ≥768px, the floating right rail stays
   visible and the V.2 rail is built by JS), so on iPad the menus overlapped the
   content, were clipped and the floating menu covered the page.
   WHAT: the exact mobile.css rule-set (≤767px) re-scoped to
   (min-width:768px) and (max-width:1366px) and (pointer:coarse) — i.e. iPad in
   both orientations (768×1024 … 1366×1024) — plus the few guards that
   Bootstrap/desktop layers still apply in that band.
   Phones (≤767px) and pointer:fine desktops are untouched.
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1366px) and (pointer: coarse) {

  /* ---------- tokens ---------------------------------------------------- */
  :root {
    --m-purple: var(--science-purple);
    --m-purple-strong: var(--science-purple-strong);
    --m-purple-deep: var(--science-purple-deep);
    --m-gold: var(--science-gold);
    --m-gold-ink: #212529;
    --m-ink: #212529;
    --m-body: #5C636A;
    --m-line: #E9ECEF;
    --m-surface: #FFFFFF;
    --m-canvas: #F6F6F8;
    --m-radius: 8px;
    --m-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 6px 18px rgba(16, 24, 40, .06);
  }

  /* ---------- global safety --------------------------------------------- */
  html, body { overflow-x: hidden; }
  body { background: var(--m-canvas); }
  .container { padding-left: 12px; padding-right: 12px; }
  img, iframe, table { max-width: 100%; }
  iframe { height: auto; aspect-ratio: 4 / 3; }
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* ==========================================================================
     1 · HEADER / APP BAR  (64px, logo left, solid hamburger right — match ref)
     ========================================================================== */
  .navbar.navbar-default.navbar-static-top {
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: 64px;
    margin: 0;
    padding: 0;
    background: var(--m-surface);
    border: 0;
    border-bottom: 1px solid var(--m-line);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
    border-radius: 0;
  }
  .navbar.navbar-default.navbar-static-top .container {
    padding: 0 12px !important;
    display: flex;
    align-items: center;
    min-height: 64px;
  }

  /* header geometry: css-info.css also styles the app bar with !important, so
     these last-wins rules repeat that selector chain and lock the reference sizes */
  html body .navbar-static-top { min-height: 64px !important; }
  html body .navbar-static-top > .container { padding-left: 12px !important; padding-right: 12px !important; min-height: 64px !important; }
  html body .navbar-static-top .navbar-header { min-height: 64px !important; }
  html body .navbar-static-top .navbar-header > a {
    display: flex !important;
    align-items: center;
    order: 1;
    margin: 0 auto 0 0 !important;
    padding: 0 !important;
    min-width: 0;
    height: 64px;
    line-height: 0;
  }
  html body .navbar-static-top .navbar-toggle {
    order: 2;
    float: none !important;
    width: 44px !important;
    height: 40px !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--m-purple-strong) !important;
  }
  .navbar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    float: none;
    width: 100%;
    min-height: 64px;
  }
  .navbar-header > br { display: none; }
  html body .navbar-static-top .navbar-header > a {
    display: flex !important;
    align-items: center;
    order: 1;
    margin: 0 auto 0 0 !important;
    padding: 0 !important;
    min-width: 0;
    height: 64px;
  }
  /* desktop lockup (title_th/en.png) is hidden on mobile only — desktop rules untouched */
  .navbar-header > a > img:not(.m-logo),
  .navbar-header > a > picture { display: none !important; }
  /* Approved MATH logo (/images/math.png) on mobile only. It is a CSS background inside
     this media query, so tablet/desktop never request the file at all (an <img>, even
     display:none/lazy, still gets fetched). 1536x1024 canvas, artwork at x125-1410 /
     y295-715 → a 136x44 box with background-size:cover trims the white padding only and
     keeps the artwork's own aspect ratio; the source PNG is never modified.
     ponytail: fixed 136x44 box; swap for a pre-trimmed/smaller asset if one is approved. */
  html body .navbar-static-top .navbar-header > a > .m-logo {
    display: block !important;
    width: 122px !important;
    height: 40px !important;
    max-width: none !important;
    max-height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    /* WebP (pre-cropped to the artwork, generated from the untouched PNG) with the
       original PNG as the fallback for browsers without WebP support. Both keep the
       same 136x44 box and aspect ratio. */
    background-image: url(/images/math.png);
    background-image: image-set(
      url(/images/webp/math-272.webp) type("image/webp") 1x,
      url(/images/webp/math-408.webp) type("image/webp") 2x,
      url(/images/webp/math-816.webp) type("image/webp") 3x,
      url(/images/math.png) 1x
    );
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
  }

  /* header restructure guard: the desktop <picture> lockup and the relocated
     icon cluster must not add any height on phones */
  html body .navbar.navbar-default.navbar-static-top,
  html body .navbar-header,
  html body .navbar-header > a { height: 64px !important; min-height: 64px !important; }
  html body .navbar-static-top > .container > .navbar-header { margin-left: 0 !important; margin-right: 0 !important; }
  html body .navbar-static-top > .container > .navbar-collapse { margin-left: 0 !important; margin-right: 0 !important; }
  html body .navbar-header > a > picture { display: none !important; }
  html body .navbar-header > a > .m-logo { flex: 0 0 122px !important; width: 122px !important; max-width: 122px !important; height: 40px !important; }

  .navbar-toggle.navbar-toggle {
    order: 2;
    float: none;
    margin: 0 0 0 auto !important;
    padding: 0;
    width: 44px !important;
    height: 40px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--m-purple-strong) !important;
  }
  .navbar-toggle .icon-bar {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 !important;
    border-radius: 2px;
    background: #FFFFFF;
  }
  .navbar-toggle:focus-visible,
  .navbar-toggle:hover { background: var(--m-purple-deep); }
  .navbar-toggle:focus-visible { outline: 2px solid var(--m-gold); outline-offset: 2px; }

  /* ==========================================================================
     2 · MOBILE DRAWER (was Bootstrap collapse) — white sheet under the app bar
     ========================================================================== */
  .navbar-collapse {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1029;
    margin: 0;
    padding: 4px 0 32px;
    background: var(--m-surface);
    border: 0;
    border-top: 1px solid var(--m-line);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .navbar-collapse.in,
  .navbar-collapse.collapsing { box-shadow: 0 -1px 0 var(--m-line); }

  /* group label that the legacy markup puts in <div> before each list */
  .navbar-disable > div {
    margin: 0;
    padding: 16px 16px 8px;
    border: 0 !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    letter-spacing: .04em;
    text-transform: none;
    color: var(--m-purple-strong) !important;
    background: var(--m-surface);
  }

  /* rows: 52px tall, 16px text, thumb friendly */
  .navbar-collapse .nav.navbar-nav { margin: 0; }
  .navbar-collapse .nav.navbar-nav > li { float: none; }
  .navbar-collapse .nav.navbar-nav > li > a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--m-line);
    font-size: 15.5px;
    line-height: 1.4;
    color: var(--m-ink) !important;
    white-space: normal;
    background: var(--m-surface);
  }
  .navbar-collapse .nav.navbar-nav > li > a:active,
  .navbar-collapse .nav.navbar-nav > li > a:focus,
  .navbar-collapse .nav.navbar-nav > li > a:hover,
  .navbar-collapse .nav.navbar-nav > li.active > a {
    background: #F5F1FA;
    color: var(--m-purple-strong) !important;
    box-shadow: inset 3px 0 0 var(--m-gold);
  }

  /* nested lists (sub-categories) — indented, quieter */
  .navbar-collapse .nav.navbar-nav ul,
  .navbar-collapse ul.nav ul { margin: 0; padding-left: 0; list-style: none; }
  .navbar-collapse .nav.navbar-nav ul > li > a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 16px 10px 30px !important;
    border-bottom: 1px solid #F1F1F4;
    font-size: 14.5px;
    color: #4A5057 !important;
    background: #FBFBFD;
  }
  .navbar-collapse .nav.navbar-nav ul > li > a:active { background: #F5F1FA; }

  /* the duplicated "หน้าหลัก" label rows that exist only for the old desktop bar */
  .navbar-full_Disable { display: none; }
  /* the floating icon cluster moved out of the collapse and into the header row;
     on phones it would stack vertically and blow the header up, so it is hidden
     here — the drawer still carries the same destinations as text links. */
  html body .navbar > .container > ul.nav.navbar-right { display: none !important; }

  /* ==========================================================================
     3 · HERO  (slides are already off on mobile → static, calm block)
     ========================================================================== */
  /* the bare <br> that used to sit under the slider adds dead space */
  .container > .row > .col-md-12 > br:first-child { display: none; }

  /* header band for the news area: light surface, gold keyline, no empty box */
  .tab-content { padding-top: 4px; }
  .tab-content > .tab-pane > .row > .col-md-12 > h2,
  .tab-content > .tab-pane > .row > .col-md-12 > h4 {
    margin: 6px 0 12px;
    padding: 0 0 10px 0;
    border-bottom: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--m-purple-strong) !important;
    text-decoration: none !important;
    position: relative;
  }
  .tab-content > .tab-pane > .row > .col-md-12 > h2::after,
  .tab-content > .tab-pane > .row > .col-md-12 > h4::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 44px; height: 4px;
    border-radius: 2px;
    background: var(--m-gold);
  }

  /* News tab strip REMOVED (owner decision 2026-12-01): the news feed is the
     only panel on mobile, so the six chips are hidden and the strip's sticky
     offset no longer reserves space. Desktop/tablet still render it. */
  html body ul.nav.nav-tabs { display: none !important; }
  html body .tab-content { padding-top: 8px; }

  ul.nav.nav-tabs {
    position: sticky;
    top: 64px;
    z-index: 1025;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0 0 8px;
    padding: 8px 0 10px;
    background: var(--m-canvas);
    border-bottom: 1px solid var(--m-line);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  ul.nav.nav-tabs::-webkit-scrollbar { display: none; }
  ul.nav.nav-tabs > li {
    float: none;
    flex: 0 0 auto;
    margin: 0;
  }
  ul.nav.nav-tabs > li > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    min-width: 84px;
    margin: 0 !important;
    padding: 6px 10px !important;
    border: 1px solid var(--m-line) !important;
    border-radius: 10px !important;
    background: var(--m-surface);
    font-size: 12.5px;
    line-height: 1.25;
    color: var(--m-body) !important;
  }
  ul.nav.nav-tabs > li.active > a,
  ul.nav.nav-tabs > li.active > a:hover,
  ul.nav.nav-tabs > li.active > a:focus {
    background: #F3EEF8 !important;
    border-color: var(--m-purple) !important;
    color: var(--m-purple-strong) !important;
    box-shadow: inset 0 -3px 0 var(--m-gold);
  }
  ul.nav.nav-tabs > li > a i { font-size: 22px !important; margin-bottom: 2px; }

  /* Scroll cue: the strip fades out over its last 28px so it reads as scrollable.
     A mask is used because the chips paint their own opaque background — a
     background gradient on the <ul> would sit underneath them and never show.
     A mask also never intercepts pointer events, so chips stay tappable.
     `m-at-end` is set by a 6-line guard in include/navbar.php when the strip is
     scrolled to its end (or does not overflow), which removes the fade so the
     last chip is fully readable. */
  html body ul.nav.nav-tabs {
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 44px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 44px), transparent 100%);
  }
  html body ul.nav.nav-tabs.m-at-end {
    -webkit-mask-image: none;
    mask-image: none;
  }

  /* ---------- one gutter: 12px -------------------------------------------
     legacy stacks padding on container > row > col-md-12 > row > col (12+10+8+10
     = 40px per side). Reference card width is vw − 24, so every level below the
     container is zeroed instead of fighting each one. */
  html body .container > .row,
  html body .tab-content .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  html body .container > .row > [class*="col-"],
  html body .tab-content .row > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  html body .tab-content .tab-pane { padding-left: 0 !important; padding-right: 0 !important; }

  /* ==========================================================================
     4 · NEWS CARDS — image on top (16:9 bleed), text below
     index.css and css-info.css both style `.box-height` at ≤767px with
     !important. Every rule here is prefixed `html body .tab-content` so this
     block wins on specificity — one owner, no extra shims downstream.
     ========================================================================== */
  html body .tab-content .box-height.font-news {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    background: var(--m-surface);
    border: 1px solid #EDEBF1 !important;
    border-radius: 16px !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05) !important;
    overflow: hidden;
    text-align: left !important;
  }
  html body .tab-content .box-height.font-news > .col-md-5 {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;   /* index.css adds margin-bottom:15px → the dead tail gap */
    float: none !important;
  }
  html body .tab-content .box-height.font-news > .col-md-5 a { display: block; }
  /* one 16:9 frame, object-fit:cover — no letterbox strip, no distortion */
  html body .tab-content .box-height.font-news > .col-md-5 img,
  html body .tab-content .box-height.font-news img.thumbnail,
  html body .tab-content .box-height.font-news img.img-responsive {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    object-fit: cover !important;
    background: #F1EEF5;
  }
  html body .tab-content .box-height.font-news > .col-md-7 {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 14px 16px 16px !important;
    margin: 0 !important;
    float: none !important;
    text-align: left !important;
  }
  /* the legacy <br>s that spaced title/hashtag/date are now handled by margin */
  html body .tab-content .box-height.font-news > .col-md-7 > br,
  html body .tab-content .box-height.font-news .news-title br { display: none !important; }
  html body .tab-content .box-height.font-news .news-title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin: 0 0 8px !important;
    font-size: 17px !important;
    line-height: 1.5 !important;
    font-weight: 700 !important;
    color: var(--m-ink) !important;
    text-align: left !important;
  }
  html body .tab-content .box-height.font-news > .col-md-7 > span { display: block; }
  html body .tab-content .box-height.font-news > .col-md-7 > span > a {
    color: var(--m-purple-strong) !important;
    font-size: 13px !important;
  }
  html body .tab-content .box-height.font-news > .col-md-7 > span:last-child {
    margin-top: 6px !important;
    color: #6B7280 !important;   /* WCAG AA 4.83 on white (was #8A8F98 = 3.25) */
    font-size: 13px !important;
    padding: 0 !important;
  }
  /* WCAG 2.5.8: the inline hashtag / category / "see all" links measured 16–21px;
     padding-block lifts them to a 24px target without moving the layout. */
  html body .tab-content .box-height.font-news > .col-md-7 > span > a,
  html body .alert > a { display: inline-block; padding-block: 4px; min-height: 24px; }

  /* card height follows content — no reserved tail gap */
  html body .tab-content .box-height.font-news > .col-md-7 > *:last-child { margin-bottom: 0 !important; }

  /* generic thumbnails elsewhere (right column, galleries) */
  .thumbnail {
    border: 0;
    border-radius: var(--m-radius);
    box-shadow: var(--m-shadow);
    background: var(--m-surface);
    padding: 0;
    overflow: hidden;
  }

  .alert { border-radius: 10px; border: 0; box-shadow: var(--m-shadow); font-size: 14px; }
  .alert-warning { background: #FFF9D6; color: var(--m-gold-ink); }
  .alert-warning a { color: var(--m-purple-strong); font-weight: 600; }

  /* ==========================================================================
     5 · TYPOGRAPHY
     ========================================================================== */
  /* Prompt is the working face on mobile (reference: cmu.ac.th). Icons keep
     Font Awesome's own family — they are <i>/[class*=fa-] and are excluded. */
  html body,
  html body .container, html body .navbar, html body .navbar-collapse,
  html body .cmu-footer, html body .m-hero, html body .m-slides,
  html body h1, html body h2, html body h3, html body h4, html body h5, html body h6,
  html body p, html body a, html body li, html body td, html body th, html body dt, html body dd,
  html body span:not([class*="fa-"]), html body strong, html body em,
  html body button, html body input, html body select, html body textarea,
  html body .font-news, html body .news-title, html body .m-hero *:not(i) {
    font-family: 'Prompt', 'Conv_Sarabun', Tahoma, sans-serif !important;
  }

  .container { font-size: 15px; line-height: 1.7; color: var(--m-body); }
  .container h1 { font-size: 24px; line-height: 1.3; font-weight: 700; color: var(--m-ink); margin: 16px 0 10px; }
  .container h2 { font-size: 21px; line-height: 1.35; font-weight: 700; color: var(--m-ink); margin: 16px 0 10px; }
  .container h3 { font-size: 18px; line-height: 1.4; font-weight: 600; color: var(--m-ink); margin: 14px 0 8px; }
  .container h4 { font-size: 16.5px; line-height: 1.45; font-weight: 600; color: var(--m-ink); }
  .container p { margin: 0 0 12px; }
  .container a { color: var(--m-purple-strong); }
  .container a:focus-visible { outline: 2px solid var(--m-gold); outline-offset: 2px; }

  /* long legacy inline colours inside news items → CI-safe on mobile */
  .font-news a[style*="color"] { color: var(--m-purple-strong) !important; }

  /* ==========================================================================
     6 · FOOTER / misc alignment with the app bar width
     ========================================================================== */
  #cmu_global_foot_menu.cmu-footer { margin-top: 8px; }
  #cmu_global_foot_menu .container { padding-left: 16px; padding-right: 16px; }

  /* ==========================================================================
     7 · MOBILE SLIDER (CMU-style hero band; desktop keeps Ken Burns)
     ========================================================================== */
  .m-slides {
    position: relative;
    margin: 0;                 /* full-bleed like the CMU hero, no wasted gutters */
    background: var(--m-surface);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
  }
  .m-slides-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .m-slides-track::-webkit-scrollbar { display: none; }
  .m-slide { flex: 0 0 100%; min-width: 100%; scroll-snap-align: center; scroll-snap-stop: always; }
  .m-slide > a { display: block; }
  /* Banner keeps its own proportions inside a 3:1 frame (owner spec 2026-12-01).
     contain = no crop and no stretch; the CMS artwork is 1170x300 (3.9:1) so a
     hairline of surface colour shows at the sides instead of losing content. */
  .m-slide { aspect-ratio: 3 / 1; }
  .m-slide > a { display: block; height: 100%; }
  .m-slide img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 46vh;
    object-fit: contain;
    background: var(--m-surface);
  }
  .m-slides-title {
    padding: 10px 16px 0;
    font-size: 14.5px;
    line-height: 1.45;
    font-weight: 500;
    color: var(--m-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* caption keeps its line height only when it actually has text; an empty
     title (CMS rows with title_th = '') collapses to nothing instead of
     reserving 1.9em of dead space under the artwork. */
  .m-slides-title:not(:empty) { min-height: 1.9em; }
  .m-slides-title:empty { display: none; }
  /* control bar under the image: 44px targets, never covers the artwork */
  .m-slides-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 12px 10px;
  }
  .m-slides-btn {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--m-line);
    border-radius: 12px;
    background: var(--m-surface);
    color: var(--m-purple-strong);
    font-size: 16px;
    line-height: 1;
    box-shadow: none;
  }
  .m-slides-btn:active { background: #F3EEF8; }
  .m-slides-btn:focus-visible { outline: 2px solid var(--m-gold); outline-offset: 2px; }
  .m-slides-dots { flex: 1 1 auto; display: flex; justify-content: center; align-items: center; gap: 7px; padding: 0; }
  .m-count { flex: 0 0 auto; min-width: 34px; text-align: right; font-size: 12px; color: #6B7280; font-variant-numeric: tabular-nums; }
  /* WCAG 2.5.8: a 24px hit area around an 8px visual dot — the pill is drawn on
     ::before so the tappable box stays 24x24 without changing the look. */
  .m-dot {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width .2s ease;
  }
  .m-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D9D2E2;
    transition: width .2s ease, background .2s ease, border-radius .2s ease;
  }
  .m-dot.on { width: 38px; }
  .m-dot.on::before { width: 22px; border-radius: 4px; background: var(--m-gold); }
  @media (prefers-reduced-motion: reduce) {
    .m-slides-track { scroll-behavior: auto; }
    .m-dot { transition: none; }
  }

  /* ==========================================================================
     8 · HERO BAND — the reference puts a typographic band under the carousel
     Dark plum surface + 34/300 display line + gold keyline + one CTA.
     Markup lives in index.php (.m-hero, after slider.php); tablet/desktop
     never show it (rule at the end of this file).
     ========================================================================== */
  .m-hero {
    margin: 0;
    padding: 28px 16px 32px;
    background: linear-gradient(160deg, var(--m-purple-deep) 0%, #2A1838 100%);
    color: #FFFFFF;
    overflow: hidden;
  }
  .m-hero-eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--m-gold);
  }
  html body .m-hero .m-hero-title {
    margin: 0 !important;
    font-size: 34px !important;
    line-height: 1.25 !important;
    font-weight: 300 !important;
    letter-spacing: -.01em;
    color: #FFFFFF !important;
  }
  html body .m-hero .m-hero-sub {
    margin: 12px 0 0 !important;
    max-width: 34ch;
    font-size: 15px !important;
    line-height: 1.7 !important;
    color: rgba(255, 255, 255, .80) !important;
  }
  .m-hero-keyline {
    display: block;
    width: 48px;
    height: 4px;
    margin: 18px 0 0;
    border-radius: 2px;
    background: var(--m-gold);
  }
  .m-hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 20px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--m-gold);
    color: var(--m-gold-ink) !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
  }
  .m-hero-cta:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
  /* ---- tablet-specific guards: Bootstrap expands the navbar at ≥768px and the
     legacy layers still paint desktop chrome in this band ---------------- */
  .navbar-collapse.collapse { display: none !important; }
  .navbar-collapse.collapse.in { display: block !important; }
  .navbar-collapse.collapsing { display: block !important; }
  ul.nav.navbar-nav.navbar-right,
  .navbar-right { display: none !important; }
  .navbar-full_Disable { display: none !important; }
  .bannercontainer, .bannershadow { display: none !important; }
  .v2-group, .v2-dd { display: none !important; }
  .container { width: 100% !important; max-width: 100% !important; padding-left: 14px !important; padding-right: 14px !important; }
  img { max-width: 100% !important; height: auto !important; }
  /* ---- undo the V.2 rail block: its (min-width:1200px) rules still match a
     1366px iPad in landscape, which is what turned the tablet back into the
     desktop shell. Same specificity, later in the cascade. ---------------- */
  html.v2 body .navbar.navbar-default.navbar-static-top {
    position: static !important; display: block !important;
    width: 100% !important; height: auto !important; max-height: none !important;
    min-height: 64px !important; overflow: visible !important;
  }
  html.v2 body { padding-left: 0 !important; padding-right: 0 !important; margin-left: 0 !important; }
  html.v2 body > .container,
  html.v2 body > .container-fluid { padding-left: 14px !important; padding-right: 14px !important; margin-left: 0 !important; max-width: 100% !important; }
  html.v2 body .navbar > .container {
    display: flex !important; flex-direction: row !important; align-items: center !important;
    justify-content: flex-start !important;
    height: auto !important; min-height: 64px !important; padding: 0 14px !important;
  }
  html.v2 .navbar-header {
    position: static !important; width: auto !important; flex: 1 1 auto !important;
    display: flex !important; align-items: center !important;
    padding: 0 !important; margin: 0 !important; text-align: left !important;
  }
  html.v2 .navbar-header .v2-logo { display: none !important; }
  html.v2 .navbar-toggle { display: flex !important; margin: 0 0 0 auto !important; }
  html.v2 .m-logo,
  html.v2 body .navbar-static-top .navbar-header > a > .m-logo {
    display: block !important; flex: 0 0 180px !important;
    width: 180px !important; max-width: 46vw !important;
    height: 56px !important; max-height: 56px !important;
    background-image: url(/images/v2/math-logo-mobile-artwork.png?v=20261202a) !important;
    background-size: contain !important; background-position: center !important;
    background-repeat: no-repeat !important; background-color: transparent !important;
  }
  html.v2 #navbar.navbar-collapse,
  html.v2 #navbar.navbar-collapse.collapse {
    position: fixed !important; top: 64px !important; left: 0 !important; right: 0 !important;
    width: auto !important; height: auto !important;
    max-height: calc(100dvh - 64px) !important; margin: 0 !important;
    transform: none !important; overflow-y: auto !important; display: none !important;
  }
  html.v2 #navbar.navbar-collapse.in,
  html.v2 #navbar.navbar-collapse.collapsing { display: block !important; }
  html.v2 ul.nav.navbar-nav.navbar-right,
  html.v2 body .navbar > .container > ul.nav.navbar-nav.navbar-right,
  html.v2 .navbar-right { display: none !important; }
  html.v2 .v2-side-foot, html.v2 .v2-langline { display: none !important; }
  /* the 5-icon shortcut bar is re-flowed to the mobile bottom bar by
     cmu2026.css; make sure the desktop rail padding does not shrink the grid */
  html.v2 .v2-news { padding-right: 0 !important; padding-bottom: 84px !important; }
}
