/* ============================================================================
   nav-curtain.css — the site header and its full-screen navigation.

   ONE FILE FOR BOTH LOCALES. This is loaded directly by
   components/layout/default.blade.php rather than being appended to
   style.css (ar) / en.css (en), which are forked near-copies — a change to
   one of those ships to a single language. Everything here uses logical
   properties (inset-inline, padding-block, margin-inline) so a single
   ruleset serves RTL and LTR without a mirrored copy.

   Colours come from the --ul-* custom properties defined on :root by the
   locale stylesheet, so the Arabic and English palettes still diverge as
   intended. Fallbacks are the Arabic values.

   THIS FILE NO LONGER ANIMATES THE PANEL. Two rounds of the reveal failing to
   appear on a real browser were both CSS-transition faults — first a clip-path
   inset() interpolating a percentage to a length, then the whole thing being
   switched off by prefers-reduced-motion, which Windows turns on with its
   ordinary "animation effects" setting. A transition only runs if the engine
   agrees to interpolate it and the media query permits it, and when it does
   not run there is no error, just a panel that appears out of nowhere.

   So the states below are RESTING STATES ONLY — where things sit when open and
   where they sit when closed, no transitions, no staggered delays. The motion
   between them is built in nav-curtain.js with element.animate(), which runs
   the same way in every engine and can be inspected and driven from script.
   Nothing here can strand the panel off-screen: remove the class and it is in
   its closed position, add it and it is in its open one.

   TWO CLASSES, NOT ONE.
     body.ul-curtain-open    — the toggle is on. Drives the button, the bars,
                               and the label. Flips the instant it is clicked
                               so the control never feels lagged.
     body.ul-curtain-visible — the panel is on screen. Survives the closing
                               slide, so the navy field, the white logo and the
                               white header text all stay put until it is gone.

   Z-INDEX. style.css puts .ul-header at z-index 2 and nothing else on the
   site exceeds 1. The curtain has to cover page content but sit under the
   header (the close button lives there), and there is no integer between
   1 and 2 — so the header is lifted to 60 and the curtain sits at 50.
   ========================================================================= */

:root {
    --ulc-navy: var(--ul-primary, #0b254e);
    --ulc-navy-deep: #061530;
    --ulc-navy-lift: #12315f;
    --ulc-gold: var(--ul-c3, #febe35);
    --ulc-line: rgba(255, 255, 255, .16);
    --ulc-ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------------------------------------------------------------- header */

.ul-header {
    z-index: 60;
}

/* The utility strip. Sits above the existing .ul-header-bottom bar and keeps
   its own navy ground in every header variant — on an overlay page it reads
   as a deliberate band across the top of the hero. */
.ul-header-utility {
    background: var(--ulc-navy-deep);
    color: rgba(255, 255, 255, .74);
    font-size: 12.5px;
    overflow: hidden;
    transition: height .3s var(--ulc-ease), opacity .22s var(--ulc-ease);
}

.ul-header-utility-in {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 30px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ul-header.scrolled .ul-header-utility {
    height: 0;
    opacity: 0;
}

.ul-utility-group {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.ul-utility-group.is-end {
    gap: 18px;
}

.ul-utility-links {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

/* Separates the two kinds of thing on that side — page links and outbound
   accounts — without a second background band. */
.ul-utility-rule {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, .18);
    flex: none;
}

.ul-utility-socials {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: none;
}

.ul-utility-socials a {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .72);
    font-size: 12.5px;
    text-decoration: none;
    transition: color .18s var(--ulc-ease), background .18s var(--ulc-ease);
}

.ul-utility-socials a:hover,
.ul-utility-socials a:focus-visible {
    color: var(--ulc-navy-deep);
    background: var(--ulc-gold);
}

.ul-utility-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* meta size, regular */
    font-size: var(--t-meta);
    font-weight: 400;
    line-height: var(--lh-ui);
    white-space: nowrap;
    color: inherit;
    text-decoration: none;
    /* padding-block takes the hit area to the full strip height; the text
       alone is an 18px target. */
    padding-block: 12px;
    transition: color .18s var(--ulc-ease);
}

.ul-utility-item:hover,
.ul-utility-item:focus-visible {
    color: var(--ulc-gold);
}

.ul-utility-item svg {
    width: 14px;
    height: 14px;
    opacity: .6;
    flex: none;
}

/* The header sits ABOVE the curtain (60 vs 50) so its close button stays
   reachable, and its own background is transparent — so while the curtain is
   up the bar's normal dark-on-light text is stranded on navy. .logo-text is
   pure black and the search and language buttons are near-black. Repaint them
   for as long as the panel is on screen. */
/* .ul-header is named in these selectors purely for weight. page-header.css
   carries `.header-overlay .ul-header.scrolled .ul-header-bottom-right button`
   at (0,3,2), which re-darkens the controls the moment the page is scrolled —
   so matching that weight and loading later is what makes these stick. */
/* SCROLL FIRST, THEN OPEN — the case that broke.
   style.css turns the bar solid at `.ul-header.scrolled { background: #fff }`,
   and page-header.css then flips its content to `--page-header-dark`. Opening
   the panel under that left a white band across the top of the navy field, and
   on an overlay page the logo and controls were dark-on-navy underneath it.
   Both have to be undone for exactly as long as the panel is up.

   THE !important IS NOT LAZINESS. page-header.css declares these with
   `!important` itself, and the only thing that beats an important declaration
   is another important one at higher specificity — a normal declaration loses
   no matter how specific it is or how late it loads. The `.scrolled` variants
   are spelled out separately because `.header-overlay .ul-header.scrolled
   .logo-text` is (0,4,0) and this rule has to clear it, not tie with it. */
body.ul-curtain-visible .ul-header,
body.ul-curtain-visible .ul-header.scrolled {
    background: transparent !important;
    box-shadow: none !important;
    /* A 15px blur would sample the navy panel sitting right behind the bar and
       smear it into a grey haze. */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 0 !important;
}

/* :not(.ul-menu-btn) — that one is a gold pill while the panel is open and
   carries its own dark label. Painting it white would be white-on-gold. */
body.ul-curtain-visible .ul-header .logo-text,
body.ul-curtain-visible .ul-header.scrolled .logo-text,
body.ul-curtain-visible .ul-header .ul-header-bottom-right button:not(.ul-menu-btn),
body.ul-curtain-visible .ul-header .ul-header-bottom-right .ul-header-lang-switcher,
body.ul-curtain-visible .ul-header.scrolled .ul-header-bottom-right button:not(.ul-menu-btn),
body.ul-curtain-visible .ul-header.scrolled .ul-header-bottom-right .ul-header-lang-switcher {
    color: #fff !important;
}

body.ul-curtain-visible .ul-header .ul-header-bottom-right button:not(.ul-menu-btn):hover,
body.ul-curtain-visible .ul-header .ul-header-bottom-right .ul-header-lang-switcher:hover {
    background-color: rgba(255, 255, 255, .14);
    color: #fff !important;
}

/* Both locale sheets give every .ul-header-bottom-right button a 4px radius,
   so the hover wash was a rounded square next to a pill. Round them fully —
   the container is named to clear that (0,1,1) selector, same as .ul-menu-btn
   below.

   THE BOX IS SET HERE TOO, and that is the other half of the same oversight:
   both locale sheets size `.ul-header-bottom-right button`, which the language
   switcher is not — it is an <a>. It had a radius and no box, so the moment a
   rule gave it a background and a border (page-header.css does, on a solid
   bar) it drew as a squashed ellipse around two letters beside a true circle.
   Visible on the college sites, which is where the solid bar is used, and
   nowhere on the university, whose pages are overlay bars that add no border.

   Sizing both together is what keeps them a matched pair whatever a page does
   to their colours — and it holds on a page that declares no header variant at
   all, where nothing else sizes the switcher. */
.ul-header-bottom-right .ul-header-search-opener,
.ul-header-bottom-right .ul-header-lang-switcher {
    flex: 0 0 auto;
    /* Smaller than the clamp(35px, 2.94vw, 56px) the locale sheets give a
       header button: at 1920px that resolved to a 56px disc, and a 56px disc
       around a 20px glyph is a target, not a control. */
    width: clamp(32px, 2.1vw, 40px);
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    line-height: 1;
}

/* The switcher carries text where its neighbour carries a glyph, so it takes
   the bar's own type size rather than the icon size beside it. */
.ul-header-bottom-right .ul-header-lang-switcher {
    font-size: clamp(12px, 0.78vw, 15px);
    font-weight: 700;
    text-decoration: none;
}

/* --------------------------------------------- the pair, resting and hovered

   AT REST BOTH ARE BARE — no fill, no border, just the glyph and the two
   letters taking the bar's own colour. That is how the university's front page
   has always drawn them, and the college bars are meant to match it rather
   than carry a treatment of their own.

   ON HOVER EACH SWAPS ITS TWO COLOURS. On a white bar the disc fills navy and
   the mark turns white; over a hero, where the mark is already white on a
   photograph, it fills white and the mark turns navy. Same swap read against
   whatever the bar happens to be.
   ---------------------------------------------------------------------------- */
.ul-header-bottom-right .ul-header-search-opener,
.ul-header-bottom-right .ul-header-lang-switcher {
    background-color: transparent;
    border: 1px solid transparent;
}

.ul-header-bottom-right .ul-header-search-opener:hover,
.ul-header-bottom-right .ul-header-search-opener:focus-visible,
.ul-header-bottom-right .ul-header-lang-switcher:hover,
.ul-header-bottom-right .ul-header-lang-switcher:focus-visible {
    background-color: var(--ul-primary);
    border-color: var(--ul-primary);
    color: #fff !important;
}

/* Over a hero the mark is white already, so navy-on-navy would erase it. */
body.header-overlay .ul-header:not(.scrolled) .ul-header-bottom-right .ul-header-search-opener:hover,
body.header-overlay .ul-header:not(.scrolled) .ul-header-bottom-right .ul-header-search-opener:focus-visible,
body.header-overlay .ul-header:not(.scrolled) .ul-header-bottom-right .ul-header-lang-switcher:hover,
body.header-overlay .ul-header:not(.scrolled) .ul-header-bottom-right .ul-header-lang-switcher:focus-visible {
    background-color: #fff;
    border-color: #fff;
    color: var(--ul-primary) !important;
}

/* The switcher is an <a>, not a <button>. Every rule that themes the icon
   cluster — the ones above and their counterparts in page-header.css — was
   written as `.ul-header-bottom-right button:not(.ul-menu-btn)`, which matched
   the search opener beside it and skipped this one. It fell through to the
   inherited black and stayed black through all four bar states: black on navy
   over a hero, black over the open panel. It is named alongside those buttons
   now, so it follows the bar.

   This is its untethered base, for a page that sets no header variant at all —
   navy rather than black, so it reads as part of the header's own text. */
.ul-header-bottom-right .ul-header-lang-switcher {
    color: var(--ul-primary);
}

/* -------------------------------------------------------------- wordmark */

/* THE ENGLISH WORDMARK WAS RENDERING AT 10.65px.
   en.css:6651 and :6655 set `font-size: calc(13% + 0.80vw)`. A PERCENTAGE
   font-size resolves against the PARENT's font size, not the viewport — the
   parent inherits body's `clamp(13px, .84vw, 16px)`, so this computed to
   13% of 13px (1.69px) + 0.8vw (8.96px) = 10.65px. The `%` was meant to be
   `px`; at `calc(13px + 0.8vw)` it would have been the intended ~22px.

   Arabic never hit it: style.css sets no font-size on .logo-text at all, so it
   fell through to Bootstrap's `h5 { font-size: 1.25rem }` and looked correct.
   One typo, one language — the exact failure mode the forked stylesheets
   invite, which is why the fix lives here in the single shared file rather
   than being patched into six declarations across the two of them.

   Named with .ul-header .logo-container to match en.css's own (0,3,0) and win
   on load order. */
.ul-header .logo-container .logo-text {
    /* Sized to sit BESIDE the mark, not to compete with it. The first attempt
       at fixing the typo overshot to ~20px on one long line, which just moved
       the problem from illegible to overbearing. */
    font-size: clamp(13px, calc(8px + .55vw), 17px);
    font-weight: 700;
    /* Tight, because English still sets on two lines and the pair has to read
       as a single block against the 56px mark. Harmless on the Arabic name,
       which is one line. */
    line-height: 1.3;
    /* Pure black against a light bar is harsher than anything else on the
       page and reads as unstyled. The brand navy is the same ink used by the
       headings below it. */
    color: var(--ulc-navy);
    /* Physical margins in both sheets — margin-right in style.css, margin-left
       in en.css — for what is the same gap beside the mark in both. */
    margin: 0;
    margin-inline-start: clamp(10px, 1vw, 16px);
    /* Only English breaks (see the measures below). Where it does, `balance`
       splits the words evenly instead of stranding an orphan on line two. */
    text-wrap: balance;
}

/* ONE MEASURE CANNOT SERVE BOTH SCRIPTS HERE, and neither can one line count.
   "University of Warith Al-Anbiyaa" is 31 characters — on one line it runs
   ~240px across a 56px mark and reads as a caption trailing off it, so it is
   held to 21ch and breaks in two.

   "جامعة وارث الانبياء" is 19 characters and sets in about 110px, which sits
   beside the mark without dwarfing it — so it stays on one line. nowrap rather
   than a wide max-width, because a measure in `ch` is an approximation for
   Arabic: `ch` is the width of "0", and the script's glyphs do not average
   anywhere near it, so a value that holds one line at 13px lets it break at 17.

   The narrowest phones drop the wordmark entirely (see the 575px block below),
   which is what keeps nowrap from pushing the header controls off screen. */
[dir="ltr"] .ul-header .logo-container .logo-text { max-width: 21ch; }

[dir="rtl"] .ul-header .logo-container .logo-text {
    /* In em rather than ch, so the measure tracks the type: «جامعة وارث
       الانبياء» sets in about 9.5em at any size and stays on one line, as does
       «قسم الرقابة والتدقيق». A department name longer than this — «قسم الشؤون
       الإدارية والمالية» — breaks in two at line-height 1.3, which is 44px:
       still inside the 56px mark, so the bar does not grow. */
    max-width: 14em;
    white-space: normal;
}

/* ── the drawn Arabic wordmark ────────────────────────────────────────────
   Applied as a mask over currentColor rather than as an <img>, so it inherits
   whatever colour the header has set on .logo-text — white over a hero, the
   dark slate once the bar goes solid, white again under the open curtain. An
   <img> would need one file per colour and would go wrong the moment a fourth
   state appeared.

   Sized by HEIGHT, not width: the artwork is 3.99:1, so a width in ch or px
   would leave the cap height drifting against the 56px mark beside it as the
   viewport changes. Height is the dimension that has to agree with the mark.

   Named through .ul-header .logo-container to clear en.css's own (0,3,0)
   declarations on this element, the same as the rules above. */
.ul-header .logo-container .logo-wordmark {
    display: block;
    height: clamp(22px, 2.1vw, 30px);
    aspect-ratio: 1223 / 307;
    width: auto;
    background-color: currentColor;
    -webkit-mask: url("../img/uowa-wordmark-ar.svg") no-repeat center / contain;
    mask: url("../img/uowa-wordmark-ar.svg") no-repeat center / contain;
}

/* min-width:0 so the flex item may shrink below its content width. Without it
   an over-long name pushes the search, language and menu controls past the
   inline edge instead of wrapping — the same overflow that put the menu button
   50px off screen at 375px. */
.ul-header-bottom-left {
    min-width: 0;
}

/* ------------------------------------------------------------------- logo */

/* The CMS mark is navy-and-gold; against the curtain its navy half vanishes.
   Both files are stacked and cross-faded rather than swapping one src, so the
   reversed mark is already decoded when the panel opens. */
.ul-logo-link {
    position: relative;
    /* The reversed mark below is positioned absolutely and sized to this
       link, so the link must have a box of its own even when the CMS mark
       fails to load — a broken <img> lays out at 0x0, and the reversed one
       then hangs out over the site name. 407/639 is the reversed mark's own
       aspect; 56px is the header's logo height. */
    min-width: calc(56px * 407 / 639);
    min-height: 56px;
}

/* inset:0 with auto margins, not a top/inline-start pair. The reversed mark is
   407x639 where the CMS PNG is square, and `.ul-header .logo-container .logo`
   pins it to `width:auto` at a specificity this rule cannot outrank — so it
   keeps its own narrower box and the auto margins centre it over the square
   one rather than letting it sit against the inline-start edge. */
.ul-logo-link .ul-logo-light {
    position: absolute;
    inset: 0;
    margin: auto;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s var(--ulc-ease);
}

.ul-logo-link .logo {
    transition: opacity .28s var(--ulc-ease);
}

body.ul-curtain-visible .ul-logo-link .logo:not(.ul-logo-light) { opacity: 0; }
body.ul-curtain-visible .ul-logo-link .ul-logo-light { opacity: 1; }

/* Same swap, same reason, for a page that puts the bar on a dark hero rather
   than under an open panel. The mark the CMS serves is navy on transparent, so
   on an overlay page it was navy on navy — the wordmark beside it had already
   been turned white by page-header.css, which left a white name next to an
   invisible mark.

   `:not(.scrolled)` because the overlay bar turns solid white on scroll and the
   navy mark is the correct one again there — this has to hand back, exactly as
   the wordmark does two files over.

   Above the curtain pair on specificity (0,5,1) vs (0,3,1), and they agree
   wherever both apply: an overlay page with the panel open wants the reversed
   mark either way. */
body.header-overlay .ul-header:not(.scrolled) .ul-logo-link .logo:not(.ul-logo-light) { opacity: 0; }
body.header-overlay .ul-header:not(.scrolled) .ul-logo-link .ul-logo-light { opacity: 1; }

/* ------------------------------------------------------------ menu button */

/* Scoped to the container on purpose. Both style.css and en.css carry
       .ul-header-bottom-right button { width: clamp(35px,2.94vw,56px);
                                        aspect-ratio: 1/1; border-radius: 4px }
   plus a navy :hover — which squashed this pill into a 4px square and replaced
   its hover. That selector is (0,1,1); a bare .ul-menu-btn at (0,1,0) loses to
   it regardless of load order, so the container is named here to reach (0,2,0).
   width and aspect-ratio must be reset explicitly, not merely re-declared. */
.ul-header-bottom-right .ul-menu-btn {
    width: auto;
    aspect-ratio: auto;
    height: 42px;
    padding: 0 20px;
    border: 0;
    border-radius: 21px;
    background: var(--ulc-navy);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: background .22s var(--ulc-ease), color .22s var(--ulc-ease);
}

.ul-header-bottom-right .ul-menu-btn:hover,
.ul-header-bottom-right .ul-menu-btn:focus-visible {
    background: var(--ulc-navy-lift);
    color: #fff;
}

body.ul-curtain-open .ul-header-bottom-right .ul-menu-btn,
body.ul-curtain-open .ul-header-bottom-right .ul-menu-btn:hover {
    background: var(--ulc-gold);
    color: var(--ulc-navy-deep);
}

/* Three rules of deliberately unequal length — a stack of text, not a generic
   hamburger. They level out on hover, then fold into a cross when open.

   These keep their CSS transition: the end state is the correct one either
   way, so a transition that refuses to run costs a flourish, not a feature.
   The panel could not make that trade, which is why it moved to script. */
.ul-menu-bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 18px;
    height: 14px;
}

.ul-menu-bars i {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--ulc-gold);
    transition: transform .36s var(--ulc-ease), opacity .16s var(--ulc-ease),
        width .3s var(--ulc-ease), background .22s var(--ulc-ease);
}

.ul-menu-bars i:nth-child(2) { width: 12px; }
.ul-menu-bars i:nth-child(3) { width: 15px; }
.ul-menu-btn:hover .ul-menu-bars i { width: 18px; }

body.ul-curtain-open .ul-menu-bars i { background: var(--ulc-navy-deep); width: 18px; }
body.ul-curtain-open .ul-menu-bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.ul-curtain-open .ul-menu-bars i:nth-child(2) { opacity: 0; transform: scaleX(.2); }
body.ul-curtain-open .ul-menu-bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.ul-menu-btn-label {
    position: relative;
    display: grid;
}

.ul-menu-btn-label span {
    grid-area: 1 / 1;
    transition: opacity .2s var(--ulc-ease), transform .28s var(--ulc-ease);
}

.ul-menu-btn-label .is-close { opacity: 0; transform: translateY(7px); }
body.ul-curtain-open .ul-menu-btn-label .is-open { opacity: 0; transform: translateY(-7px); }
body.ul-curtain-open .ul-menu-btn-label .is-close { opacity: 1; transform: none; }

/* --------------------------------------------------------------- curtain */

/* THE SCROLL LOCK.
   `body { overflow: hidden }` on its own did nothing here. Body overflow only
   propagates to the viewport when the ROOT element's own overflow is
   `visible`, and style.css:36 sets `html { overflow-x: hidden }` — which forces
   overflow-y to compute as `auto` and blocks the propagation outright. The
   page scrolled freely behind the open panel.

   So the root is locked directly, and the body is taken out of flow with its
   scroll offset moved to `top` (set from script). The second half is not
   belt-and-braces: on iOS Safari `overflow:hidden` does not stop a touch drag
   from scrolling the page, and taking the body out of flow is the only thing
   that does. `top` is what makes it survivable — without it the page would
   jump to the top the moment the menu opened.

   `overflow-y: scroll`, NOT `hidden`. Taking the body out of flow already
   leaves the root with nothing to scroll — its scrollHeight collapses to the
   viewport height — so the track here is inert either way. But `hidden`
   REMOVES the classic Windows scrollbar, which widens the viewport by 16px and
   slid the whole page sideways every time the menu opened. `scroll` keeps the
   track exactly where it was, so opening the panel shifts nothing.
   (`scrollbar-gutter: stable` is the tidier answer on paper; Chrome does not
   reserve the gutter for an `overflow: hidden` container, so it does not
   actually work here — measured, not assumed.) */
html.ul-curtain-locked {
    overflow-x: hidden;
    overflow-y: scroll;
}

/* !important because main.js:5 runs `document.body.style.position = 'static'`
   on DOMContentLoaded. That is an inline declaration, and an inline
   declaration outranks every selector in every stylesheet no matter how
   specific — author `!important` is the only thing above it. Without this the
   rule matched, was visibly present in the cascade, and still lost.

   Only `position` needs it; nothing sets the others inline. */
body.ul-curtain-locked {
    position: fixed !important;
    inset-inline: 0;
    width: 100%;
    overflow: hidden;
}

/* Closed and open positions. No transition — nav-curtain.js animates between
   them. `visibility` matters as much as the transform: nothing inside a hidden
   element can take focus or be reached by a screen reader, so the closed panel
   is genuinely out of the document's reach rather than merely pushed up. */
.ul-curtain {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: var(--ulc-navy);
    color: #fff;
    overflow-y: auto;
    /* Setting overflow-y alone makes the browser compute overflow-x as auto
       too, which turned a decorative element that once overhung the edge into
       a horizontal scrollbar. Kept as a guard. */
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding: 140px 30px 44px;
    transform: translateY(-100%);
    visibility: hidden;
    will-change: transform;
}

/* The panel scrolls whenever its columns outrun the viewport, and because the
   panel is RTL the browser puts that track on the LEFT — the full-width light
   grey Windows scrollbar, laid down the edge of a navy field, which is the
   single lightest thing on the screen once the menu is up.

   Thinned and tinted to the panel rather than hidden: the menu genuinely does
   overflow on a short viewport, so the affordance has to stay reachable. A
   translucent white thumb rather than the gold, which is already carrying the
   category rules and the menu pill and would read as a fourth accent.

   `scrollbar-width`/`scrollbar-color` cover Firefox and Chromium 121+; the
   ::-webkit- rules cover older WebKit. Neither reaches everything alone. */
.ul-curtain {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .35) transparent;
}

.ul-curtain::-webkit-scrollbar {
    width: 6px;
}

.ul-curtain::-webkit-scrollbar-track {
    background: transparent;
}

.ul-curtain::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, .35);
    border-radius: 3px;
}

.ul-curtain::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, .55);
}

body.ul-curtain-visible .ul-curtain {
    transform: translateY(0);
    visibility: visible;
}

.ul-header.scrolled ~ .ul-curtain {
    padding-top: 96px;
}

/* A gold thread along the top edge. Drawn at full width; the script wipes it
   in. Resting at scaleX(0) would mean an invisible thread forever if the
   animation did not run. */
.ul-curtain-thread {
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 2px;
    background: var(--ulc-gold);
    transform-origin: right;
}

[dir="ltr"] .ul-curtain-thread { transform-origin: left; }

/* NO DECORATIVE GLOW. A radial gradient used to sit in the top inline corner.
   Its box ended before the gradient had finished fading, so the cut showed as
   a hard vertical seam running down the panel — a rectangle of slightly
   lighter navy rather than a glow. Boxing a soft gradient this large is not
   worth the trouble; the field is flat now. */

.ul-curtain-in {
    max-width: 1360px;
    margin: 0 auto;
    position: relative;
}

/* ---- the two sides ---- */

/* A rail of direct destinations beside the categories. They used to share one
   column flow, which dropped a bordered one-link box wherever it happened to
   land — between two lists, at the foot of a column, splitting the reading.
   Kept together on their own side they read as a short list of primary
   destinations standing next to the categories, and the lists get uninterrupted
   columns. The rail leads in both directions: flex order puts it first, and
   `flex-direction` follows the document, so it is the right-hand column in
   Arabic and the left-hand one in English with no mirrored ruleset. */
.ul-curtain-body {
    display: flex;
    align-items: flex-start;
    gap: 36px;
}

.ul-curtain-direct {
    flex: 0 0 clamp(230px, 21vw, 300px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-inline-end: 36px;
    border-inline-end: 1px solid var(--ulc-line);
    align-self: stretch;
}

/* Multi-column, NOT grid. The lists are wildly uneven — one carries twelve
   colleges where another carries two — and a grid row stretches every cell to
   the tallest, so a short list sat under a few hundred px of dead space.
   Columns flow instead: a short group is followed immediately by the next one,
   and the later ones pull up rather than starting a new row. */
.ul-curtain-groups {
    flex: 1;
    min-width: 0;
    columns: 3;
    column-gap: 30px;
}

.ul-curtain-group {
    /* A group must never be split across a column boundary. */
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    width: 100%;
    margin-bottom: 32px;
}

.ul-curtain-group-head {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-bottom: 13px;
    margin-bottom: 15px;
    position: relative;
}

.ul-curtain-group-head::after {
    content: "";
    position: absolute;
    inset-block-end: 0;
    inset-inline: 0;
    height: 1px;
    background: var(--ulc-line);
}

.ul-curtain-group-head::before {
    content: "";
    position: absolute;
    inset-block-end: 0;
    inset-inline-start: 0;
    height: 2px;
    width: 46px;
    background: var(--ulc-gold);
    z-index: 1;
}

/* A hairline gold ring, not a filled tile. The filled version read as a row of
   app icons pasted onto a formal navy field; a ring is quiet enough to sit
   under a heading and matches the circular controls in the bar above. */
.ul-curtain-group-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: none;
    background: rgba(254, 190, 53, .07);
    border: 1px solid rgba(254, 190, 53, .3);
    color: var(--ulc-gold);
    transition: background .2s var(--ulc-ease), border-color .2s var(--ulc-ease),
        color .2s var(--ulc-ease);
}

.ul-curtain-group-icon svg { width: 16px; height: 16px; }

.ul-curtain-group-head h3 {
    margin: 0;
    font-size: 15.5px;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

/* ---- a group with one destination ---- */

/* Five of the eight live groups carry a single child that repeats the heading.
   Those render as one link — the head itself — so the panel stops showing a
   category whose only content is its own name.

   And it is drawn as a bordered row, NOT as a heading. Left with the rule and
   the gold accent the others carry, a single-destination group reads as a
   section whose contents failed to load — the exact impression the collapse
   was meant to remove. A box says "this is somewhere to go". */
/* The rail spaces these with `gap`; a margin as well would double it. */
.ul-curtain-group.is-single {
    margin-bottom: 0;
}

.ul-curtain-group.is-single .ul-curtain-group-head {
    color: inherit;
    text-decoration: none;
    margin-bottom: 0;
    padding: 11px 14px;
    border: 1px solid var(--ulc-line);
    border-radius: 12px;
    transition: background .2s var(--ulc-ease), border-color .2s var(--ulc-ease);
}

.ul-curtain-group.is-single .ul-curtain-group-head::before,
.ul-curtain-group.is-single .ul-curtain-group-head::after {
    display: none;
}

.ul-curtain-group.is-single .ul-curtain-group-head:hover,
.ul-curtain-group.is-single .ul-curtain-group-head:focus-visible {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(254, 190, 53, .45);
}

.ul-curtain-group.is-single .ul-curtain-group-head .arw {
    margin-inline-start: auto;
    color: var(--ulc-gold);
    opacity: 0;
    transform: translateX(6px);
    transition: opacity .18s var(--ulc-ease), transform .22s var(--ulc-ease);
}

[dir="ltr"] .ul-curtain-group.is-single .ul-curtain-group-head .arw { transform: translateX(-6px); }

.ul-curtain-group.is-single .ul-curtain-group-head:hover .arw,
.ul-curtain-group.is-single .ul-curtain-group-head:focus-visible .arw {
    opacity: 1;
    transform: none;
}

.ul-curtain-group.is-single .ul-curtain-group-head:hover .ul-curtain-group-icon,
.ul-curtain-group.is-single .ul-curtain-group-head:focus-visible .ul-curtain-group-icon {
    background: var(--ulc-gold);
    border-color: var(--ulc-gold);
    color: var(--ulc-navy-deep);
}

/* ---- links ---- */

/* :not() because a single-destination group's head IS an <a>, and this rule is
   (0,1,1) — it would otherwise win `display:block` over the head's own flex
   layout and re-pad it. */
.ul-curtain-group a:not(.ul-curtain-group-head) {
    display: block;
    padding: 8px 0;
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
    transition: color .16s var(--ulc-ease);
}

.ul-curtain-group a:not(.ul-curtain-group-head):hover,
.ul-curtain-group a:not(.ul-curtain-group-head):focus-visible { color: #fff; }

.ul-curtain-group a:not(.ul-curtain-group-head) .arw {
    display: inline-block;
    opacity: 0;
    transform: translateX(6px);
    color: var(--ulc-gold);
    transition: opacity .18s var(--ulc-ease), transform .22s var(--ulc-ease);
}

[dir="ltr"] .ul-curtain-group a:not(.ul-curtain-group-head) .arw { transform: translateX(-6px); }
.ul-curtain-group a:not(.ul-curtain-group-head):hover .arw { opacity: 1; transform: none; }

/* ---- footer ---- */

.ul-curtain-foot {
    max-width: 1360px;
    margin: 46px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--ulc-line);
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    align-items: center;
    justify-content: space-between;
    font-size: 13.5px;
    color: rgba(255, 255, 255, .62);
}

.ul-curtain-foot a {
    color: var(--ulc-gold);
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    padding-block: 8px;
}

/* focus is invisible sitewide — style.css sets outline:none */
.ul-curtain a:focus-visible,
.ul-curtain button:focus-visible,
.ul-menu-btn:focus-visible,
.ul-utility-item:focus-visible,
.ul-utility-socials a:focus-visible {
    outline: 2.5px solid var(--ulc-gold);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---------------------------------------------------------- responsive */

/* These set `columns`, not `grid-template-columns` — the groups are a
   multi-column flow, and the old grid property was silently ignored here.

   The strip sheds its contents in order of how easily the visitor can find
   them elsewhere: the address email is also in the footer, the accounts are
   also in the footer, the phone is the one thing worth keeping longest. */
@media (max-width: 1180px) {
    .ul-curtain-groups { columns: 2; }
    .ul-utility-group.is-contact .ul-utility-item:nth-child(n + 2) { display: none; }
}

/* Below this the rail has no room to stand beside the lists, so the two sides
   stack — the direct destinations still arrive first and still read as one
   block, only now as a row of boxes above the categories rather than a column
   beside them. The divider switches edges with them. */
@media (max-width: 900px) {
    .ul-curtain-body {
        display: block;
    }

    .ul-curtain-direct {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
        padding-inline-end: 0;
        border-inline-end: 0;
        padding-bottom: 26px;
        margin-bottom: 26px;
        border-bottom: 1px solid var(--ulc-line);
    }

    .ul-utility-socials,
    .ul-utility-rule { display: none; }
}

@media (max-width: 640px) {
    .ul-utility-group.is-contact { display: none; }
    .ul-header-utility-in { justify-content: center; padding: 0 18px; }
    .ul-curtain { padding: 116px 18px 34px; }
    .ul-curtain-groups { columns: 1; }
    .ul-header-bottom-right .ul-menu-btn { padding: 0 13px; }
    .ul-menu-btn-label { display: none; }

    /* The wordmark has to go here, not merely shrink. At 375px the logo block
       is 234px and the three controls 160px against 345px of bar — so the bar
       overflowed and took the menu button 50px off the inline edge with it,
       leaving no way to close the panel on the narrowest phones. The mark
       still links home, and the full name is in the panel footer. */
    .ul-header-bottom-left .logo-text { display: none; }

    .ul-header-bottom-left { min-width: 0; }
    .ul-header-bottom-right { flex: none; gap: 4px; }
}

/* Reduced motion is handled in nav-curtain.js, which checks the media query
   and simply does not start the animations — so the panel snaps between the
   two resting states above. It is deliberately NOT handled here: a media query
   that switches off a transition also switches off the only thing moving the
   panel onto the screen, which is how the reveal came to be invisible for
   every Windows user with animation effects turned off. Nothing in this file
   moves the panel, so there is nothing here left to switch off. */
