/* =====================================================================
   Review fixes (Oct 2026) – loaded after style-new.css / mobile-new.css
   on every page (see header.php / header-new.php).
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Hero breadcrumb – the current page is now removed server-side
      (sci_hero_breadcrumb()), so never show a trailing "›" and keep the
      remaining items on one tidy line.
   ------------------------------------------------------------------- */
/* main.css (old design) hid the first / last two items – show every real item. */
.hero-breadcrumb .fbc-page .fbc-wrap .fbc-items li[itemprop="itemListElement"] {
    display: inline-block !important;
}
.hero-breadcrumb .fbc-page .fbc-wrap .fbc-items li:not([itemprop="itemListElement"]),
.hero-breadcrumb .fbc-page .fbc-wrap .fbc-items li.active {
    display: none !important;
}
.hero-breadcrumb .fbc-page .fbc-wrap .fbc-items li:last-child::after,
.hero-breadcrumb .fbc-page .fbc-wrap .fbc-items li.active::after {
    display: none !important;
}

/* Tablet hero (≤1023px, e.g. 994×954): the stacked featured image kept a
   57% aspect ratio, so the banner alone filled most of the screen.
   Use a shorter strip on tablets; phones keep a taller image. */
@media (max-width: 1023px) {
    .page-hero .hero-right {
        padding-bottom: 32%;
    }
}
@media (max-width: 640px) {
    .page-hero .hero-right {
        padding-bottom: 50%;
    }
}

/* ---------------------------------------------------------------------
   1b. Top bar search popover (replaces the slow "/?s=" link).
   ------------------------------------------------------------------- */
.top-bar .search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.top-bar .search-wrap .search-btn {
    border: none;
    cursor: pointer;
}
.top-bar .top-search-form {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: none;
    align-items: center;
    width: 320px;
    max-width: 90vw;
    padding: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    z-index: 1000;
}
.top-bar .search-wrap.is-open .top-search-form {
    display: flex;
}
.top-bar .top-search-form input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border: none;
    background: transparent;
    color: #1e293b;
    font-size: 15px;
    outline: none;
    -webkit-appearance: none;
}
.top-bar .top-search-form button[type="submit"] {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 8px;
    background: var(--blue, #2563eb);
    color: #fff;
    cursor: pointer;
}
.top-bar .top-search-form button[type="submit"]:hover {
    background: var(--orange, #f9923c);
}
/* The Foundation CSS kept in MEC "Custom CSS" adds a cuhkbiz-icons glyph
   before every button[type="submit"]; the font is never loaded, so a
   square appeared next to the magnifier. */
.top-bar .top-search-form button::before,
.top-bar .search-wrap .search-btn::before,
.mm-search-form .mm-search-btn::before,
.searchandfilter button::before,
.inner-page button[type="submit"]::before {
    content: none !important;
    display: none !important;
}

/* Mobile menu search field */
.mm-header .mm-header-left {
    flex: 1 1 auto;
    min-width: 0;
    gap: 10px;
}
.mm-search-form {
    display: inline-flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 4px;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    padding: 0 4px 0 12px;
    background: #fff;
}
.mm-search-form input[type="search"] {
    width: 100%;
    min-width: 0;
    max-width: 160px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
    color: #333;
    -webkit-appearance: none;
}
.mm-search-form .mm-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}
/* Mobile menu language pill: "中文" was breaking onto two lines. */
.widget-language-switcher-mobile .wpml-ls-legacy-dropdown {
    width: auto;
}
.widget-language-switcher-mobile .wpml-ls-item-toggle {
    white-space: nowrap;
}

/* ---------------------------------------------------------------------
   2. Divi content alignment.
      Divi centres blurb content (max-width + margin:auto) which left the
      text ~50px to the right of headings, images, cards and tables in the
      same row. Left-align blurb content everywhere in the new layout.
   ------------------------------------------------------------------- */
.inner-page .entry-content .et_pb_blurb.et_pb_text_align_left .et_pb_blurb_content,
.inner-page .entry-content .et_pb_blurb:not(.et_pb_text_align_center):not(.et_pb_text_align_right) .et_pb_blurb_content {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Facts & figures counters (Introduction): spread across the full row
   instead of floating with auto margins. */
.inner-page .entry-content .facts-and-figures-row .et_pb_column {
    justify-content: space-between;
    gap: 1.5rem;
}
.inner-page .entry-content .facts-and-figures-row .et_pb_number_counter {
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 1 1 0;
    width: auto !important;
}
/* v2: Divi's 72px counter digits were too large; and the page's own
   custom CSS used a fixed "200px 200px" grid between 768–980px (digits
   wrapped, cells pushed to the edges) and display:block with no gaps
   below 768px (cells touching). Use a fluid 2-column grid instead. */
.inner-page .entry-content .facts-and-figures-row .et_pb_number_counter .percent p {
    font-size: 48px;
    line-height: 1.1;
}
.inner-page .entry-content .facts-and-figures-row .et_pb_number_counter .title {
    font-size: 18px;
}
@media (max-width: 980px) {
    .inner-page .entry-content .facts-and-figures-row .et_pb_column {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-template-rows: auto !important;
        grid-auto-flow: row !important;
        gap: 20px !important;
        justify-content: stretch;
        margin-bottom: 20px !important;
    }
    .inner-page .entry-content .facts-and-figures-row .et_pb_number_counter {
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
    }
    .inner-page .entry-content .facts-and-figures-row .et_pb_number_counter .percent p {
        font-size: 40px;
    }
}
@media (max-width: 479px) {
    .inner-page .entry-content .facts-and-figures-row .et_pb_column {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .inner-page .entry-content .facts-and-figures-row .et_pb_number_counter .percent p {
        font-size: 36px;
    }
}

/* The Foundation CSS stored in MEC "Custom CSS" prepends an icon (font
   "cuhkbiz-icons", never loaded) to the link in a trailing paragraph,
   e.g. "Read more on [] CUHK in Focus" on 60a/anniversary-banquet. */
p + p:last-child > a:only-child::before,
p + p:last-child > a:only-child[target="_blank"]::before {
    content: none !important;
    display: none !important;
}
p + p:last-child > a:only-child {
    display: inline !important;
    font-weight: inherit !important;
}

/* v2 – People / Deanery (EN 18255 / ZH 19010). The Foundation CSS makes
   button{display:inline-flex}, so the absolutely positioned ETmodules
   arrow (style.css "#people .desc button::after") was drawn over the
   "Show More" text. Anchor it to the right of the button instead. */
#people .desc button,
#people .desc + p button {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding-right: 22px !important;
    line-height: 1.4;
}
#people .desc button::after,
#people .desc + p button::after {
    position: absolute !important;
    right: 0;
    top: 50%;
    margin-top: 0 !important;
    transform: translateY(-50%);
    font-size: 20px !important;
    line-height: 1;
}
/* The Dean's tablet/phone blurb wraps the bio in class="content" instead of
   "desc-content", and style-new.css forces ".content {display:block
   !important}", so the bio was never collapsed and "Show More" appeared to
   do nothing. review-fixes.js now toggles .is-open on the .desc wrapper. */
#people .desc span.content,
#people .desc .desc-content {
    display: none !important;
    background: transparent !important;
}
#people .desc.is-open span.content,
#people .desc.is-open .desc-content {
    display: inline !important;
}
#people .desc.is-open span[id^="dots"] {
    display: none !important;
}

/* ---------------------------------------------------------------------
   3. "Highlights and News" side column (Fellowships pages).
      The S&F results template (243414.php) was styled for a full-width
      2-column grid; in the narrow 2/5 column the cards were squashed and
      the titles clipped. Show them as a compact single-column list, the
      same way the old design did for the honours sub-pages.
   ------------------------------------------------------------------- */
.inner-page .et_pb_column_2_5 .fp-highlight-news {
    display: block;
    background: #fff;
    padding: 0.5rem 0;
}
.inner-page .et_pb_column_2_5 .fp-highlight-news .fp-hn {
    width: 100% !important;
    margin: 0 !important;
    border-right: 0 !important;
    flex: none;
}
.inner-page .et_pb_column_2_5 .fp-highlight-news .fp-hn a {
    display: block;
    padding: 0 1rem;
}
.inner-page .et_pb_column_2_5 .fp-highlight-news .fp-news-image {
    display: none;
}
.inner-page .et_pb_column_2_5 .fp-highlight-news .fp-news-details {
    width: 100% !important;
    padding: 0.6rem 0 0.8rem;
}
.inner-page .et_pb_column_2_5 .fp-highlight-news .fp-hn:not(:last-child) .fp-news-details {
    border-bottom: 1px solid #e5e7eb;
}
.inner-page .et_pb_column_2_5 .fp-highlight-news .fp-news-details p.date {
    padding-top: 0 !important;
    margin-bottom: 0.25rem;
    font-size: 13px;
}
.inner-page .et_pb_column_2_5 .fp-highlight-news .fp-news-details h4 {
    display: block;
    height: auto !important;
    -webkit-line-clamp: unset;
    overflow: visible;
    font-size: 15px !important;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

/* ------------------------------------------------------------------
   4. UG "Programmes Offered" (EN 270353 / ZH 270357): the programme
   blurbs carry no body font size, so they inherit the 64% body size
   (10px) used for chrome. Match the 16px used by the other content
   modules and keep the stream/concentration list slightly smaller.
   ------------------------------------------------------------------ */
.inner-page .academic-us-po-row-blurb .et_pb_blurb_description {
    font-size: 16px;
    line-height: 1.6;
}
.inner-page .academic-us-po-row-blurb .et_pb_blurb_description p.prglistp,
.inner-page .academic-us-po-row-blurb .et_pb_blurb_description > p:first-child {
    margin-bottom: 0;
    font-weight: 600;
}
/* A few programme links lack the prglistp class (e.g. ZH 生物化學). */
.inner-page .academic-us-po-row-blurb .et_pb_blurb_description > p > a {
    color: var(--blue);
}
.inner-page .academic-us-po-row-blurb .et_pb_blurb_description > p > a:hover {
    color: var(--blue-light);
}
.inner-page .academic-us-po-row-blurb .et_pb_blurb_description li,
.inner-page .academic-us-po-row-blurb .et_pb_blurb_description li span[style] {
    font-size: 14px !important;
}

/* ------------------------------------------------------------------
   5. "How Nobel Prizes Are Won" (EN 20529 / ZH 255282): the two poster
   pages filled a 1/2 + 1/2 row (560px each, 400px apart) and the
   register image was oversized. Show the posters side by side at a
   readable size, left-aligned with the text.
   ------------------------------------------------------------------ */
.inner-page .nobel-posters {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
.inner-page .nobel-posters .et_pb_column {
    width: auto !important;
    max-width: 380px;
    margin: 0 !important;
    flex: 0 1 380px;
}
.inner-page .nobel-posters .et_pb_image {
    text-align: left;
    margin-bottom: 0;
}
.inner-page .nobel-posters .et_pb_image img {
    width: 100%;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}
.inner-page .tabledemo3 img[src*="register"] {
    width: 100px !important;
    height: auto !important;
    margin-bottom: 4px;
}
/* Review v2: the detail tables (Date/Time/Venue…, Talk 1/2/3) have 24px
   cell padding, so "Date" and "Talk 1" were indented against the posters
   and the "Lecture Series Topics" heading above them – start the first
   column flush with the rest of the content. */
.inner-page .et_pb_blurb_description table.tabledemo3 td,
.inner-page .et_pb_text_inner table.tabledemo3 td {
    padding-left: 0 !important;
    padding-right: 24px !important;
    vertical-align: top;
}
.inner-page .et_pb_blurb_description table.tabledemo3 td:last-child,
.inner-page .et_pb_text_inner table.tabledemo3 td:last-child {
    padding-right: 0 !important;
}
.inner-page .et_pb_blurb_description table.tabledemo3 td > p:first-child,
.inner-page .et_pb_blurb_description table.tabledemo3 td > p:last-child {
    margin-top: 0;
}
.inner-page .et_pb_blurb_description table.tabledemo3 td > p:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
}
.inner-page .nobel-prev-row {
    padding-top: 0;
}

/* ------------------------------------------------------------------
   6. Image modules. The Divi global "Image Preset 1" (width 70%,
   align centre) is applied to nearly every image module, so images sat
   centred while all surrounding text, tables and headings were
   left-aligned (VTL, PG Research Day, Lau Oi Wah, PST, 60a …).
   Left-align image modules in the new layout on desktop; Divi still
   centres them on mobile (.et_always_center_on_mobile).
   In 3- and 4-column galleries let the images fill the column so the
   grid lines up (the posters in those rows already use force_fullwidth).
   ------------------------------------------------------------------ */
@media (min-width: 981px) {
    .inner-page .entry-content .et_pb_column .et_pb_image:not(.sci-center-image) {
        margin-left: 0 !important;
        margin-right: auto !important;
        text-align: left;
    }
    .inner-page .entry-content .et_pb_row_3col .et_pb_column .et_pb_image,
    .inner-page .entry-content .et_pb_row_4col .et_pb_column .et_pb_image {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ==================================================================
   Main site review v2
   ================================================================== */

/* ------------------------------------------------------------------
   7. Diversity and Inclusion (EN 270202 / ZH 270207): the IG posters
   sit in gutter-less 1/3 rows (et_pb_gutters1). When the columns stack
   below 981px the posters touched each other.
   ------------------------------------------------------------------ */
@media (max-width: 980px) {
    .page-id-270202 .et_pb_row.et_pb_gutters1 .et_pb_column:not(:last-child),
    .page-id-270206 .et_pb_row.et_pb_gutters1 .et_pb_column:not(:last-child),
    .page-id-270207 .et_pb_row.et_pb_gutters1 .et_pb_column:not(:last-child) {
        margin-bottom: 30px !important;
    }
}

/* ------------------------------------------------------------------
   8. 60th Anniversary > Overview (EN 281048 / ZH 281059): the
   "About FOS 60th Anniversary Logo" row has no gutter (et_pb_gutters1)
   and the logo column sat flush against the text column.
   ------------------------------------------------------------------ */
@media (min-width: 981px) {
    .page-id-281048 .et_pb_row.et_pb_gutters1 > .et_pb_column_1_3:last-child,
    .page-id-281059 .et_pb_row.et_pb_gutters1 > .et_pb_column_1_3:last-child {
        padding-left: 48px;
    }
}

/* ------------------------------------------------------------------
   9. Icon + text rows ("table.contact-us-table": phone / e-mail /
   website / address / JUPAS code). Used on Contact Us, every UG
   programme page, STARS, Major Declaration, Experiential Learning,
   CPSE, the "Enquiries" blocks … The legacy rules sized each icon
   differently (absolute positioning, 65%/80% heights, negative
   margins) so the icons never lined up with their text or with the
   download button below. Normalise: fixed 32px icon cell, icon
   centred in it, text vertically centred, no negative margins.
   ------------------------------------------------------------------ */
.inner-page table.contact-us-table {
    width: 100% !important;
    border-collapse: collapse;
}
.inner-page table.contact-us-table tbody,
.inner-page table.contact-us-table tr {
    border: 0;
}
.inner-page table.contact-us-table tr {
    align-items: center;
    height: auto !important;
    min-height: 36px;
    margin: 0;
}
.inner-page table.contact-us-table td {
    border: 0 !important;
    vertical-align: middle;
}
.inner-page table.contact-us-table tr td:first-child,
.inner-page .et_pb_module table.contact-us-table tr:first-child td:first-child,
.inner-page .et_pb_module table.contact-us-table tr:last-child td:first-child,
.inner-page .et_pb_module table.contact-us-table tr:not(:first-child) td:first-child {
    position: relative !important;
    display: flex !important;
    flex: 0 0 32px;
    align-items: center;
    justify-content: flex-start; /* icon flush with the column edge = button edge */
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
}
.inner-page table.contact-us-table tr td:first-child img {
    position: static !important;
    display: block;
    width: 22px !important;
    height: 22px !important;
    max-width: none;
    margin: 0 !important;
    -o-object-fit: contain;
    object-fit: contain;
    object-position: center;
}
.inner-page table.contact-us-table tbody tr td:last-child,
.inner-page .et_pb_module table.contact-us-table tbody tr td:last-child {
    flex: 1 1 auto;
    width: auto !important;
    padding: 6px 24px 6px 10px !important;
    font-size: 16px;   /* programme blurbs inherit 12px; links were 16px */
    line-height: 1.5;
}
.inner-page table.contact-us-table tbody tr td:last-child a {
    font-size: inherit;
}
/* Desktop: rows of the same table may sit side by side (Contact Us). */
@media (min-width: 981px) {
    .inner-page table.contact-us-table tr {
        display: inline-flex;
    }
    .inner-page .programmes-offered-table table.contact-us-table tr {
        display: flex !important;
    }
}
@media (max-width: 980px) {
    .inner-page table.contact-us-table tr {
        display: flex !important;
    }
}
/* Contact Us (EN 287543 / ZH 287563): yellow group headers centred + bold. */
.inner-page .sci-contact-group .et_pb_blurb_description,
.inner-page .sci-contact-group .et_pb_blurb_description p,
.inner-page .sci-contact-group .et_pb_blurb_description span {
    text-align: center !important;
    font-weight: 700 !important;
}
.inner-page .sci-contact-group .et_pb_blurb_description p {
    margin: 0;
    padding: 0;
}
/* Download / brochure button under the icon rows: align with the icons. */
.inner-page .programmes-offered-table + .et_pb_button_module_wrapper,
.inner-page .et_pb_blurb + .et_pb_button_module_wrapper {
    text-align: left;
}
/* style-new.css indents every button on the programme pages by 1em,
   but Divi's own rule cancels it for the first button only, so a second
   button ("Detailed Course List") sat 1em to the right of the first. */
.parent-pageid-270353 .et_pb_button_module_wrapper .et_pb_button,
.parent-pageid-270357 .et_pb_button_module_wrapper .et_pb_button {
    margin-left: 0 !important;
}

/* ------------------------------------------------------------------
   10. UG > Programmes Offered index (EN 270353 / ZH 270357): below
   980px the brochure image was left-aligned while the "Faculty
   Brochure" button was centred, so they looked detached. Centre both.
   ------------------------------------------------------------------ */
@media (max-width: 980px) {
    .page-id-270353 .et_pb_image,
    .page-id-270357 .et_pb_image {
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }
    .page-id-270353 .et_pb_image .et_pb_image_wrap,
    .page-id-270357 .et_pb_image .et_pb_image_wrap {
        display: block;
        width: -moz-fit-content;
        width: fit-content;
        max-width: 100%;
        margin: 0 auto;
    }
    .page-id-270353 .et_pb_image + .et_pb_button_module_wrapper,
    .page-id-270357 .et_pb_image + .et_pb_button_module_wrapper,
    .page-id-270353 .et_pb_button_module_wrapper,
    .page-id-270357 .et_pb_button_module_wrapper {
        text-align: center !important;
        margin-top: 16px;
    }
}

/* ------------------------------------------------------------------
   11. ASEIDM (275035 / 275095) and IDADM (270464 / 273863): the FAQ
   accordion module carries min_height="487px" in the builder, which
   left ~340px of empty space under the last question (and, when the
   columns stack, a big gap before the contact block). Let it size to
   its content.
   ------------------------------------------------------------------ */
.inner-page .et_pb_accordion.customizeAcc {
    min-height: 0 !important;
}

/* ------------------------------------------------------------------
   12. Curriculum (19435 / 255092) and similar: a button that directly
   follows a text blurb sat ~80px below it (blurb padding + content
   margin + button margin), so it did not read as part of the same
   block. Tighten the blurb's bottom spacing when a button follows.
   ------------------------------------------------------------------ */
.inner-page .et_pb_blurb:has(+ .et_pb_button_module_wrapper) {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}
.inner-page .et_pb_blurb:has(+ .et_pb_button_module_wrapper) .et_pb_blurb_content {
    margin-bottom: 0 !important;
}
.inner-page .et_pb_blurb + .et_pb_button_module_wrapper .et_pb_button {
    margin-top: 8px;
}

/* ------------------------------------------------------------------
   13. Text links not blue (Projects & Centres 284273/284275, e-News
   244049/255262 …). The Tailwind preflight shipped with the new header
   (`a { color: inherit }`) is loaded after Divi's `a { color:#2ea3f2 }`,
   so only modules with an explicit "link text colour" showed blue links.
   Restore the site link colour for links inside content modules; inline
   colours, buttons, headings and module-level settings still win.
   ------------------------------------------------------------------ */
.inner-page .et_pb_text_inner a:not(.et_pb_button):not([class*="button"]),
.inner-page .et_pb_blurb_description a:not(.et_pb_button):not([class*="button"]),
.inner-page .et_pb_toggle_content a:not(.et_pb_button):not([class*="button"]),
.inner-page .et_pb_tab_content a:not(.et_pb_button):not([class*="button"]),
.inner-page .et_pb_post_content a:not(.et_pb_button):not([class*="button"]) {
    color: #2ea3f2;
}
.inner-page .et_pb_text_inner a:not(.et_pb_button):not([class*="button"]):hover,
.inner-page .et_pb_blurb_description a:not(.et_pb_button):not([class*="button"]):hover,
.inner-page .et_pb_toggle_content a:not(.et_pb_button):not([class*="button"]):hover,
.inner-page .et_pb_tab_content a:not(.et_pb_button):not([class*="button"]):hover,
.inner-page .et_pb_post_content a:not(.et_pb_button):not([class*="button"]):hover {
    color: #f7882f;
}
/* Headings keep their own colour even when wrapped in a link. */
.inner-page .et_pb_text_inner h1 a, .inner-page .et_pb_text_inner h2 a,
.inner-page .et_pb_text_inner h3 a, .inner-page .et_pb_text_inner h4 a,
.inner-page .et_pb_blurb_description h1 a, .inner-page .et_pb_blurb_description h2 a,
.inner-page .et_pb_blurb_description h3 a, .inner-page .et_pb_blurb_description h4 a {
    color: inherit;
}

/* ------------------------------------------------------------------
   14. Faculty Research Day (19978/255218) & PG Research Day (19982/255228)
   – and any inner page whose 2nd section is ".et_pb_section_1": the
   legacy home-page rule in style.css (`.et_pb_section_1{width:80%}` at
   480–767px) shrank the content section, leaving a grey strip on the
   right. Inner pages always use the full width.
   ------------------------------------------------------------------ */
@media (min-width: 480px) and (max-width: 767px) {
    .inner-page .et_pb_section_1:not(.et_section_specialty) {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ------------------------------------------------------------------
   15. Faces of CUHK Science detail pages (single-focs.php, post type
   "focs"): the content sat in Divi's generic "#main-content .container",
   whose width/max-width is reset to 100% by the Tailwind ".container"
   utility, so the text hugged the left edge instead of lining up with the
   hero title / the 90% rows used by every other inner page.
   ------------------------------------------------------------------ */
.single-focs #main-content .container {
    width: 90% !important;
    max-width: 1600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.single-focs #main-content #left-area {
    width: 100% !important;
    padding-left: 0;
    padding-right: 0;
}
/* The title/featured-image column (.et_post_meta_wrapper) is hidden on
   these pages, so the EN articles (class "category-focs") should not be
   limited to the 65% column next to it – the ZH ones already span 100%. */
.single-focs .et_pb_post.category-focs .entry-content {
    width: 100%;
}
/* Empty AddToAny "follow" sidebar widget printed after the article. */
.single-focs #main-content #sidebar {
    display: none;
}

/* ------------------------------------------------------------------
   16. Publication cards (module_id "programme-brochure-card": Programme
   Brochures 244058/255267, Sci-by-side 244234/250630, Faculty
   Publications). The page custom CSS puts each cover in a fixed
   250×300 (≤980: 200px) box with object-fit:contain, which centres narrow
   covers inside the box, so covers of different ratios did not line up
   with each other or with the text column – pin them to the top-left.
   The description text inherited the body size, which mobile-new.css
   scales to 80% under 1500px (Issue 3–8 text shrank to ~10px while the
   issues that set an explicit size stayed 16px) – fix the card text size.
   ------------------------------------------------------------------ */
.inner-page div#programme-brochure-card .et_pb_main_blurb_image {
    flex: 0 0 auto;
    margin-bottom: 0;
}
.inner-page div#programme-brochure-card .et_pb_main_blurb_image img {
    object-position: left top;
    display: block;
}
.inner-page div#programme-brochure-card .et_pb_blurb_container {
    flex: 1 1 auto;
    min-width: 0;
}
.inner-page div#programme-brochure-card .et_pb_blurb_description,
.inner-page div#programme-brochure-card .et_pb_blurb_description p,
.inner-page div#programme-brochure-card .et_pb_blurb_description li {
    font-size: 16px;
    line-height: 1.6em;
}
.inner-page div#programme-brochure-card .et_pb_blurb_description ul {
    padding-left: 1.2em;
    margin-bottom: 0;
}
.inner-page div#programme-brochure-card .et_pb_blurb_description li {
    margin-bottom: 4px;
}
@media (min-width: 981px) {
    /* Consistent gap under every card row (Divi's gutters1 rows have none). */
    .inner-page .et_pb_row .et_pb_column div#programme-brochure-card {
        margin-bottom: 40px !important;
    }
}
@media (max-width: 980px) {
    .inner-page div#programme-brochure-card .et_pb_main_blurb_image {
        flex: 0 0 200px;
        width: 200px;
    }
    /* One consistent gap between stacked cards (instead of 0 / 30px /
       empty-paragraph leftovers). */
    .inner-page .et_pb_row .et_pb_column div#programme-brochure-card {
        margin-bottom: 32px !important;
    }
    /* …and no extra row padding between card rows, so the gap between
       two cards is the same whether or not they sit in the same row. */
    .inner-page .et_pb_row:has(> .et_pb_column > div#programme-brochure-card) {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}
@media (max-width: 600px) {
    /* Cover above the text when there is no room for two columns. */
    .inner-page div#programme-brochure-card .et_pb_blurb_content {
        display: block !important;
    }
    .inner-page div#programme-brochure-card .et_pb_main_blurb_image {
        width: auto;
        margin-bottom: 14px;
    }
    .inner-page div#programme-brochure-card .et_pb_main_blurb_image img {
        width: 160px !important;
        height: auto !important;
    }
    .inner-page div#programme-brochure-card .et_pb_blurb_container {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* ------------------------------------------------------------------
   17. Lau Oi Wah Memorial Science Lecture Series (288305/288311) and any
   other inner page with an image column next to a text column: the site
   uses Divi's gutter width 1, which removes every column margin once the
   columns stack (≤980px), so the (placeholder) portrait touched the
   "Biography of Professor Lau Oi Wah" heading. Keep a gap after an image
   that ends a stacked column.
   ------------------------------------------------------------------ */
@media (max-width: 980px) {
    .inner-page .et_pb_row .et_pb_column:not(:last-child) > .et_pb_image:last-child {
        margin-bottom: 28px !important;
    }
}

/* ------------------------------------------------------------------
   18. Prospective Students > Non-local Students (20931/255314) and the
   other pages using the ".inner-singleEvent" button rows: a plain-text
   note placed next to a button – "(Chinese version only)" – sat at the top
   edge of the row instead of on the button's text baseline. Centre the
   items of the row vertically and let it wrap on small screens.
   ------------------------------------------------------------------ */
.inner-page .inner-singleEvent {
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}
.inner-page .inner-singleEvent .singleEvent-customButton {
    margin-bottom: 1rem;
}
.inner-page .inner-singleEvent .singleEvent-customButton:not(:last-child) {
    margin-right: 0;
}
