/* =============================================
   iPhone layer (2026-10-15). Loaded LAST on every page via _inc/head.html,
   after style.css -> responsive.css -> modern.css, so it only has to win
   against those. Everything is inside the 768px query: desktop is untouched.
   Target: 390px iPhone, tap targets >= 44px, no sideways scroll.
   ============================================= */

:root {
    --ac-navy:      #214d74;
    --ac-navy-deep: #1a2e40;
    --ac-ink:       #1c3d5e;
    --ac-text:      #3d3c3c;
    --ac-muted:     #6f7d8c;
    --ac-line:      #e8edf1;
    --ac-bg:        #f7f8fa;
    --ac-surface:   #fff;
    --ac-tap:       44px;
    --ac-gutter:    16px;
    --ac-radius:    4px;
}

/* Contact: office name on its own line (replaced a <br />); applies at every width. */
.contact_text .office { display: block; }

@media (max-width: 768px) {

    html, body { overflow-x: clip; }
    body { -webkit-text-size-adjust: 100%; }

    /* ---- Header: sticky bar, logo left, menu button right ---- */
    #header {
        position: sticky;
        top: 0;
        z-index: 500;
    }
    #header .wrapper {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 0 var(--ac-gutter);
        min-height: 60px;
    }
    #header .logo { float: none; margin: 8px 0; }
    #header .logo img { height: 34px; width: auto; max-width: none; }
    .nav-toggle {
        float: none;
        margin: 0 -8px 0 0;
        width: var(--ac-tap);
        height: var(--ac-tap);
        padding: 0;
        font-size: 28px;
        color: var(--ac-navy);
    }
    .mainnav,
    .mainnav.open { flex-basis: 100%; }
    .mainnav.open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        margin: 0 calc(-1 * var(--ac-gutter));
        width: auto;
        padding: 0 0 8px;
        border-top: 1px solid var(--ac-line);
    }
    .mainnav li,
    .mainnav li.first {
        padding: 0;
        margin: 0;
        border-bottom: 1px solid var(--ac-line);
        font-size: 15px;
    }
    .mainnav li a {
        display: flex;
        align-items: center;
        min-height: 50px;
        padding: 0 var(--ac-gutter);
    }
    .mainnav li a::after { display: none; }
    .mainnav li.sel { background: #eef3f8; box-shadow: inset 3px 0 0 var(--ac-navy); }
    .mainnav li:last-child {
        margin: 10px var(--ac-gutter) 0;
        border: 0;
        border-radius: var(--ac-radius);
        background: var(--ac-navy) !important;
    }
    .mainnav li:last-child a { justify-content: center; color: #fff; }

    /* ---- Home hero: legible text, no fixed heights ---- */
    #featured li p {
        top: 16px;
        margin: 0 var(--ac-gutter);
        padding: 14px 16px;
        font-size: 15px;
        line-height: 1.5;
        color: #fff;
        background: rgba(20, 38, 56, 0.72);
        border-radius: var(--ac-radius);
        text-shadow: none;
    }

    /* ---- Content cards ---- */
    #team_featured { padding: 72px 0 8px; }
    #team_featured .wrapper,
    #home_featured .wrapper { padding: 0 12px; }
    .team-header { padding: 0; }
    .team-block :is(h1,h2).title {
        font-size: 21px;
        line-height: 1.3;
        padding: 14px var(--ac-gutter);
        margin: 0;
    }
    .team-content { padding: 4px var(--ac-gutter) 18px; box-sizing: border-box; }
    .doc-page { padding: 6px 0; }

    /* Justified text leaves rivers at 390px: left-align everything. */
    #team_featured p, #team_featured td, #team_featured div,
    #home_featured p, #home_featured td {
        text-align: left !important;
    }
    .team-block p.text,
    #home_featured p,
    .team-content {
        font-size: 16px;
        line-height: 1.6;
        color: var(--ac-text);
    }
    .team-block p.title2 { font-size: 16px; margin: 0 0 8px; }

    /* ---- Document lists (UCITS, Regulatory): one tappable row per document ---- */
    .team-content .doc-list {
        list-style: none;
        margin: 4px 0 20px;
        padding: 0;
        border-top: 1px solid var(--ac-line);
    }
    .team-content .doc-list li {
        margin: 0;
        padding: 0;
        border-bottom: 1px solid var(--ac-line);
        background: none;
    }
    .team-content .doc-list li a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 48px;
        padding: 8px 0;
        font-size: 15px;
        line-height: 1.35;
        color: var(--ac-ink);
        text-decoration: none;
    }
    .team-content .doc-list li a::after {
        content: "\203A";
        flex: none;
        font-size: 22px;
        color: #a9b6c3;
    }
    .team-content .doc-list li a[href$=".pdf"]::after {
        content: "PDF";
        font-size: 10px;
        font-weight: 600;
        letter-spacing: .06em;
        padding: 3px 6px;
        border: 1px solid #c9d4de;
        border-radius: 3px;
        color: var(--ac-muted);
    }
    /* Bullets that are plain text (no link) keep a quiet list look. */
    .team-content .doc-list li > p { margin: 8px 0; }
    /* Section labels above each list ("NAV AND FINANCIAL STATEMENTS" etc.) */
    .doc-group {
        margin-top: 18px;
        font-size: 12px;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--ac-muted);
    }

    /* ---- Team page ---- */
    .team-block .bioimg { width: 140px !important; border-radius: var(--ac-radius); }
    .team-content td { padding: 0 !important; }

    /* ---- Contact page: stacked offices, tappable mail/phone ---- */
    .contact_text { font-size: 16px; line-height: 1.6; margin-top: 18px; }
    #img_map { max-width: 320px; display: block; margin: 8px auto 0; }
    .contact_text a[href^="mailto:"],
    .contact_text a[href^="tel:"] {
        display: inline-flex;
        align-items: center;
        min-height: var(--ac-tap);
        color: var(--ac-navy);
        text-decoration: underline;
        text-underline-offset: 3px;
    }
    .contact_text .office {
        display: block;
        font-weight: 600;
        color: var(--ac-ink);
    }

    /* ---- Press page: nothing below 13px ---- */
    .prquotes .art0, .prquotes .title0 { font-size: 12px; }
    .prquotes .art3, .prquotes .link { font-size: 14px; }
    .prquotes .link a { display: inline-flex; align-items: center; min-height: var(--ac-tap); }
    .prquotes img { max-width: 100%; height: auto; }

    /* ---- Footer: big tappable links, readable statement ---- */
    #footer { margin-top: 24px; padding: 8px 0 calc(24px + env(safe-area-inset-bottom)); }
    #footer .wrapper { padding: 0 var(--ac-gutter); }
    .footnav { margin: 0; padding: 0; }
    .footnav li,
    .footnav li.first {
        float: none;
        display: block;
        padding: 0;
        margin: 0;
        border-bottom: 1px solid rgba(168, 191, 207, .15);
        font-size: 15px;
    }
    .footnav li::before { content: none; }
    .footnav li a {
        display: flex;
        align-items: center;
        min-height: 48px;
        border-bottom: 0;
        padding: 0;
    }
    .copyright,
    #footer p.copyright {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        font-size: 12.5px;
        line-height: 1.6;
        color: #8ea4b6;
        text-align: left;
        padding: 18px 0 0;
        margin: 0;
    }

    /* ---- Disclaimer: full-screen sheet, accept button always on screen ---- */
    .popup {
        position: fixed;
        inset: 0;
        width: auto;
        height: auto;
        margin: 0 !important;
        border: 0;
        border-radius: 0;
        z-index: 2000;
        background: var(--ac-surface);
    }
    .popup-wrapper, #scrollbar1 {
        height: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    #scrollbar1 { display: flex; flex-direction: column; }
    #scrollbar1 .viewport {
        flex: 1;
        width: auto;
        height: auto;
        padding: calc(16px + env(safe-area-inset-top)) var(--ac-gutter) 16px;
        overscroll-behavior: contain;
    }
    #scrollbar1 .overview { position: static; }
    .popup .accept {
        position: static;
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
        min-height: 52px;
        margin: 0;
        padding: 0 var(--ac-gutter) env(safe-area-inset-bottom);
        border-radius: 0;
        font-size: 15px;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
    }

    /* ---- TermsFeed cookie banner: compact full-width bar instead of a 60%-of-screen box ---- */
    .termsfeed-com---nb-simple {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        max-width: none !important;
        width: auto !important;
    }
    .termsfeed-com---nb .cc-nb-main-container {
        padding: 14px var(--ac-gutter) calc(14px + env(safe-area-inset-bottom)) !important;
    }
    .termsfeed-com---nb .cc-nb-title { font-size: 15px !important; margin-bottom: 4px !important; }
    .termsfeed-com---nb .cc-nb-text { font-size: 12.5px !important; line-height: 1.45 !important; margin-bottom: 10px !important; }
    .termsfeed-com---nb .cc-nb-buttons-container { display: flex !important; flex-wrap: wrap; gap: 8px; }
    .termsfeed-com---nb .cc-nb-buttons-container button {
        flex: 1 1 auto;
        min-height: var(--ac-tap);
        margin: 0 !important;
        font-size: 13px !important;
    }
    .termsfeed-com---nb .cc-nb-okagree,
    .termsfeed-com---nb .cc-nb-reject { flex: 1 1 40% !important; width: auto !important; }
    .termsfeed-com---nb .cc-nb-changep { flex: 1 1 100% !important; }
}
