/* FIW mobile visual layer (2026-11-24). Loaded after all other styles; mobile only.
   Rollback: remove the stylesheet link injected by nginx. */
@media (max-width: 760px) {
  body.fiw05 {
    --m-navy: #0b1f38;
    --m-ink: #14273d;
    --m-muted: #5b6b7d;
    --m-red: #c0283c;
    --m-gold: #e2b85c;
    --m-paper: #f3f1ec;
    --m-line: #e2e6ea;
    background: #fff;
    color: var(--m-ink);
    -webkit-font-smoothing: antialiased;
  }

  /* ---------- Header: compact, sticky, with a scrollable section strip ---------- */
  body.fiw05 .masthead {
    position: sticky; top: 0; z-index: 50;
    background: var(--m-navy);
    border-bottom: 0;
    box-shadow: 0 1px 0 rgba(255,255,255,.06);
  }
  body.fiw05 .masthead-inner {
    min-height: 56px; padding: 8px 16px !important; gap: 12px;
    display: flex !important; align-items: center; justify-content: space-between; flex-wrap: nowrap;
  }
  body.fiw05 .masthead .header-tools { display: none !important; }
  body.fiw05 .masthead .brand img {
    height: 30px; width: auto;
    filter: brightness(0) invert(1);
  }
  body.fiw05 .brand-dek { display: none; }
  body.fiw05 .mobile-menu summary { color: #fff; font-weight: 600; }
  body.fiw05 .header-search { color: #fff; }
  body.fiw05 .header-search svg { stroke: currentColor; }

  body.fiw05 .primary-nav {
    display: block !important;
    position: sticky; top: 56px; z-index: 49;
    background: var(--m-navy);
    border-top: 1px solid rgba(255,255,255,.08);
  }
  body.fiw05 .primary-nav > div {
    display: flex !important; flex-wrap: nowrap; gap: 4px; width: 100%; box-sizing: border-box;
    overflow-x: auto !important; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding: 0 12px; margin: 0; max-width: none;
    mask-image: linear-gradient(90deg, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  body.fiw05 .primary-nav > div::-webkit-scrollbar { display: none; }
  body.fiw05 .primary-nav a {
    flex: 0 0 auto; white-space: nowrap;
    color: rgba(255,255,255,.72); font-size: 15px; font-weight: 600;
    padding: 11px 10px 12px; border-bottom: 3px solid transparent;
    text-decoration: none;
  }
  body.fiw05 .primary-nav a[aria-current],
  body.fiw05:not(:has(.primary-nav a[aria-current])) .primary-nav a.home-link { color: #fff; border-bottom-color: var(--m-red); }
  body.fiw05 .primary-nav .institution-menu { display: none; }

  /* Hide entry points for features that are not open yet. */
  body.fiw05 .cms-mobile-actions,
  body.fiw05 .header-tip { display: none !important; }

  /* ---------- Home: content first ---------- */
  body.fiw05 .cms-home {
    display: flex !important; flex-direction: column; align-items: stretch !important;
    gap: 0; padding: 0 0 24px; width: 100%; max-width: none; margin: 0;
  }
  body.fiw05 .cms-home > .cms-module {
    width: 100% !important; max-width: none; box-sizing: border-box;
    margin: 0; border: 0; border-radius: 0; box-shadow: none;
    padding: 28px 16px; background: #fff;
  }
  body.fiw05 .cms-home > .cms-module:has(.cms-empty) { display: none !important; }
  body.fiw05 .cms-home .module-hero     { order: 1; }
  body.fiw05 .cms-home .module-events   { order: 2; }
  body.fiw05 .cms-home .module-guide    { order: 3; }
  body.fiw05 .cms-home .module-search   { order: 4; }
  body.fiw05 .cms-home .module-stories  { order: 5; }
  body.fiw05 .cms-home .module-research { order: 6; }
  body.fiw05 .cms-home .module-cta      { order: 7; }
  body.fiw05 .cms-home .module-interview { order: 8; }
  /* No real ads yet: hide the placeholder slot. */
  body.fiw05 .cms-home .module-advert { display: none !important; }
  body.fiw05 .site-main:has(.cms-home) { padding-left: 0 !important; padding-right: 0 !important; }
  body.fiw05 .media-source { display: none; }

  /* Section headings: red tick, bold title, quiet link */
  body.fiw05 .cms-module .section-heading {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; margin: 0 0 4px; padding: 0; border: 0;
  }
  body.fiw05 .cms-module .section-heading h2,
  body.fiw05 .cms-module .copy-panel > h2 {
    position: relative; margin: 0; padding-left: 14px;
    font-size: 22px; line-height: 1.25; font-weight: 800; letter-spacing: .01em;
    color: var(--m-ink);
  }
  body.fiw05 .cms-module .section-heading h2::before,
  body.fiw05 .cms-module .copy-panel > h2::before {
    content: ""; position: absolute; left: 0; top: .18em; bottom: .18em;
    width: 4px; background: var(--m-red);
  }
  body.fiw05 .cms-module .section-heading a {
    font-size: 14px; font-weight: 600; color: var(--m-muted); text-decoration: none; white-space: nowrap;
  }
  body.fiw05 .cms-module .copy-panel > p {
    margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--m-muted);
  }
  body.fiw05 .cms-module .copy-panel > p:empty { display: none; }

  /* ---------- Hero: cover-style lead story ---------- */
  /* Covers already carry their own headline, so the title sits on a navy band below the image. */
  body.fiw05 .cms-home .module-hero {
    padding: 0 !important; background: var(--m-navy) !important;
    display: block !important; overflow: hidden;
  }
  body.fiw05 .module-hero .module-hero-media { margin: 0; border: 0; }
  body.fiw05 .module-hero .module-hero-media img {
    display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: 0;
  }
  body.fiw05 .module-hero .module-hero-copy {
    padding: 22px 20px 30px !important; background: var(--m-navy) !important; color: #fff;
    border: 0 !important; border-top: 4px solid var(--m-red) !important;
  }
  body.fiw05 .module-hero .module-hero-copy small:first-child {
    display: inline-block; background: var(--m-red); color: #fff;
    font-size: 12px; font-weight: 700; letter-spacing: .12em;
    padding: 5px 10px; margin-bottom: 14px;
  }
  body.fiw05 .module-hero .module-hero-copy h1 {
    margin: 0 0 12px; color: #fff;
    font-size: 30px; line-height: 1.22; font-weight: 800; letter-spacing: .005em;
    text-wrap: balance;
  }
  body.fiw05 .module-hero .module-hero-copy p {
    margin: 0 0 18px; color: rgba(255,255,255,.82); font-size: 15px; line-height: 1.6;
  }
  body.fiw05 .module-hero .module-hero-copy small:not(:first-child) { display: none; }
  body.fiw05 .module-hero .module-hero-copy .button {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff !important; color: var(--m-navy) !important; border: 0 !important; border-radius: 0;
    font-weight: 800; font-size: 15px; padding: 13px 20px;
  }
  body.fiw05 .module-hero .module-hero-copy h1,
  body.fiw05 .module-hero .module-hero-copy p { color: inherit; }
  body.fiw05 .module-hero .module-hero-copy h1 { color: #fff !important; }
  body.fiw05 .module-hero .module-hero-copy p { color: rgba(255,255,255,.8) !important; }
  body.fiw05 .module-hero .module-hero-copy small:first-child { color: #fff !important; }

  /* ---------- Story lists: one lead card, then compact rows ---------- */
  body.fiw05 .cms-story-list {
    display: flex !important; flex-direction: column; gap: 0; margin-top: 16px; counter-reset: fiwstory;
  }
  body.fiw05 .cms-card {
    counter-increment: fiwstory;
    display: grid !important; grid-template-columns: 1fr 104px; grid-template-areas: "body pic";
    gap: 14px; align-items: start;
    padding: 16px 0; margin: 0; border: 0; border-top: 1px solid var(--m-line);
    background: none; box-shadow: none; border-radius: 0;
  }
  body.fiw05 .cms-card > div { grid-area: body; min-width: 0; padding: 0; }
  body.fiw05 .cms-card .card-picture { grid-area: pic; display: block; margin: 0; aspect-ratio: 1 / 1; overflow: hidden; }
  body.fiw05 .cms-card .card-picture img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
  body.fiw05 .cms-card:not(:has(.card-picture)) { grid-template-columns: 1fr; grid-template-areas: "body"; }
  body.fiw05 .cms-card small:first-child {
    display: block; margin: 0 0 6px;
    font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--m-red);
  }
  body.fiw05 .cms-card h3 { margin: 0; font-size: 17px; line-height: 1.42; font-weight: 700; }
  body.fiw05 .cms-card h3 a { color: var(--m-ink); text-decoration: none; }
  body.fiw05 .cms-card > div > small:not(:first-child) { display: none; }
  body.fiw05 .cms-card p {
    margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--m-muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  body.fiw05 .cms-card .card-date { display: block; margin-top: 8px; font-size: 12px; color: #8a97a5; }

  body.fiw05 .cms-story-list > .cms-card:first-child { border-top: 0; }

  /* Guide list: numbered rows so it reads like a reading list, not repeated covers */
  body.fiw05 .module-guide .copy-panel > p { display: none; }
  body.fiw05 .module-guide .cms-card { grid-template-columns: 34px 1fr 88px; grid-template-areas: "num body pic"; }
  body.fiw05 .module-guide .cms-card:not(:has(.card-picture)) { grid-template-columns: 34px 1fr; grid-template-areas: "num body"; }
  body.fiw05 .module-guide .cms-card::before {
    grid-area: num; content: counter(fiwstory, decimal-leading-zero);
    font-size: 22px; font-weight: 800; line-height: 1; color: var(--m-red); padding-top: 2px;
    font-variant-numeric: tabular-nums;
  }

  /* Stories list: lead card with a big picture on top */
  body.fiw05 .module-stories .cms-story-list > .cms-card:first-child {
    grid-template-columns: 1fr; grid-template-areas: "pic" "body"; padding-top: 4px;
  }
  body.fiw05 .module-stories .cms-story-list > .cms-card:first-child .card-picture { aspect-ratio: 16 / 9; }
  body.fiw05 .module-stories .cms-story-list > .cms-card:first-child h3 { font-size: 21px; line-height: 1.35; }
  body.fiw05 .module-stories .cms-story-list > .cms-card:first-child p { -webkit-line-clamp: 3; font-size: 14.5px; }

  /* Guide list on warm paper so it reads as its own band */
  body.fiw05 .cms-home .module-guide { background: var(--m-paper) !important; }
  body.fiw05 .module-guide .cms-card { border-top-color: rgba(20,39,61,.12); }

  /* ---------- Institution search: strong navy band ---------- */
  body.fiw05 .cms-home .module-search {
    background: var(--m-navy) !important; color: #fff;
    padding: 32px 20px !important;
  }
  body.fiw05 .module-search .copy-panel > h2 { color: #fff; font-size: 24px; }
  body.fiw05 .module-search .copy-panel > h2::before { background: var(--m-gold); }
  body.fiw05 .module-search .copy-panel > p { color: rgba(255,255,255,.7); }
  body.fiw05 .module-search .cms-search { margin-top: 18px; }
  body.fiw05 .module-search .cms-search label { display: none; }
  body.fiw05 .module-search .cms-search > div { display: flex; gap: 0; }
  body.fiw05 .module-search .cms-search input {
    flex: 1; min-width: 0; height: 48px; border: 0; border-radius: 0;
    padding: 0 14px; font-size: 15px; background: #fff; color: var(--m-ink);
  }
  body.fiw05 .module-search .cms-search button {
    height: 48px; padding: 0 16px; border: 0; border-radius: 0;
    background: var(--m-gold); color: var(--m-navy); font-weight: 800; font-size: 15px; white-space: nowrap;
  }
  body.fiw05 .module-search .institution-shortcuts {
    display: flex !important; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none;
    margin: 16px -20px 0; padding: 0 20px;
  }
  body.fiw05 .module-search .institution-shortcuts::-webkit-scrollbar { display: none; }
  body.fiw05 .module-search .institution-shortcuts a {
    flex: 0 0 auto; color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
    border: 1px solid rgba(255,255,255,.28); padding: 8px 12px; border-radius: 999px;
  }
  body.fiw05 .module-search .search-hint,
  body.fiw05 .module-search .keyword-links { display: none; }

  /* ---------- Research rows ---------- */
  body.fiw05 .research-rows > a {
    border-top: 1px solid var(--m-line); padding: 14px 0; text-decoration: none;
  }

  /* ---------- Feedback CTA (kept, moved down, made quieter) ---------- */
  body.fiw05 .cms-home .module-cta { background: var(--m-paper) !important; }
  body.fiw05 .module-cta .module-feature-media { margin: 0 0 16px; }
  body.fiw05 .module-cta .module-feature-media img { border-radius: 0; }
  body.fiw05 .module-cta .copy-panel {
    border: 0 !important; border-radius: 0 !important; padding: 0 !important; background: none !important;
  }
  body.fiw05 .module-cta .route-actions a {
    border-top: 1px solid rgba(20,39,61,.12); padding: 14px 0; text-decoration: none;
  }

  /* ---------- Article page ---------- */
  body.fiw05 article h1, body.fiw05 .article-header h1 {
    font-size: 28px; line-height: 1.28; font-weight: 800; text-wrap: balance;
  }
  body.fiw05 .article-body p, body.fiw05 .prose p { font-size: 17px; line-height: 1.85; }

  /* ---------- Footer ---------- */
  body.fiw05 .site-footer { background: var(--m-navy); color: rgba(255,255,255,.7); border: 0; }
  body.fiw05 .site-footer a { color: #fff; }
  body.fiw05 .site-footer .footer-brand img { filter: brightness(0) invert(1); height: 30px; width: auto; }

  /* ---------- Refinements ---------- */
  body.fiw05 .site-main:has(.cms-home) { padding-top: 0 !important; padding-bottom: 0 !important; }
  body.fiw05 .cms-home { padding-bottom: 0 !important; }
  body.fiw05 .module-search .cms-search button {
    background: var(--m-gold) !important; color: var(--m-navy) !important; flex: 0 0 auto; width: auto !important;
  }
  body.fiw05 .module-search .cms-search > div { background: none !important; border: 0 !important; padding: 0 !important; }
  /* A one-card "focus" list only repeats the lead story. */
  body.fiw05 .cms-home .module-stories:not(:has(.cms-card + .cms-card)) { display: none !important; }

  body.fiw05 .research-rows > a {
    display: grid !important; grid-template-columns: 40px 1fr; gap: 12px; align-items: start;
    padding: 14px 0 !important; color: var(--m-ink);
  }
  body.fiw05 .research-rows > a > *:first-child {
    width: 40px; height: 40px; display: grid; place-items: center; margin: 0;
    background: var(--m-navy); color: #fff; border-radius: 0; font-weight: 800; font-size: 16px; order: 0;
  }
  body.fiw05 .research-rows > a > *:last-child:not(:first-child) { display: none; }
  body.fiw05 .research-rows b, body.fiw05 .research-rows strong { font-size: 16px; line-height: 1.4; }
  body.fiw05 .research-rows small, body.fiw05 .research-rows span { font-size: 12.5px; line-height: 1.5; }

  body.fiw05 .module-cta .copy-panel > p { display: none; }
  body.fiw05 .module-cta .copy-panel > h2 { font-size: 20px; margin-bottom: 4px; }

  body.fiw05 .site-footer { padding: 28px 20px 36px !important; margin-top: 0 !important; }
  body.fiw05 .site-footer .footer-top { display: flex !important; flex-direction: column; align-items: flex-start !important; text-align: left; gap: 12px; padding: 0; margin: 0 0 16px; }
  body.fiw05 .site-footer .footer-top p { margin: 0; font-size: 13px; color: rgba(255,255,255,.6); order: 3; }
  body.fiw05 .site-footer small { font-size: 12px; line-height: 1.6; color: rgba(255,255,255,.45); }
  body.fiw05 .site-footer small a { color: rgba(255,255,255,.7); }
}
