/* =========================================================
   Homepage — Embassy of India, Doha  (v9: strict DBIM 3.0, whole page)
   Colours — DBIM palette only:
     Blue group  #162F6A (key) · #214AAB · #5279D7 · #A3BBF3 · #D2DFFF
     Functional  #FFFFFF · #EBEAEA Linen · #150202 Deep Earthy Brown · #606060 Grey
   Gradients only between two shades of the Blue group. No decorative shadows.
   Noto Sans, DBIM type scale
     desktop  H2 24 · H3 20 · P1 16 · P2 14 · small 12
     mobile   H2 20 · H3 16 · P1 14 · P2 12
   rem = 16px (the header resets Bootstrap 3's 10px root).
   ========================================================= */

.hp,
.hp-modal {
    --hp-navy: #162F6A;
    --hp-blue: #214AAB;
    --hp-tint: #D2DFFF;
    --hp-pale: #D2DFFF;
    --hp-linen: #EBEAEA;
    --hp-text: #150202;
    --hp-muted: #606060;
    --hp-line: #A3BBF3;
    --hp-card: #FFFFFF;
    --hp-grad: linear-gradient(135deg, #162F6A 0%, #214AAB 100%);
    --hp-card-line: #A3BBF3;          /* card outlines */
    --hp-soft: #D2DFFF;               /* dividers, chips, badges */
    --hp-tile-bg: #FFFFFF;
    --hp-tile-line: #D2DFFF;
    font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--hp-text);
}
.hp *, .hp *::before, .hp *::after,
.hp-modal *, .hp-modal *::before, .hp-modal *::after { box-sizing: border-box; }

.hp { padding: 0 0 3rem; }
.hp > .container { padding-left: 1rem !important; padding-right: 1rem !important; }
.hp img { max-width: 100%; height: auto; }
.hp ul { list-style: none; margin: 0; padding: 0; }
.hp p { margin: 0; }

.hp-sr-only {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* focus ring (keyboard) */
.hp a:focus-visible,
.hp [tabindex]:focus-visible,
.hp-modal a:focus-visible,
.hp-modal button:focus-visible {
    outline: 3px solid var(--hp-blue);
    outline-offset: 2px;
}

.hp-ico { width: 1em; height: 1em; flex: 0 0 auto; vertical-align: -.125em; }

.hp-badge {
    display: inline-block;
    margin-left: .375rem;
    padding: 0 .375rem;
    border-radius: .25rem;
    background: var(--hp-blue);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.5;
    vertical-align: .1em;
}

/* section headings */
.hp-section-title {
    position: relative;
    margin: 3rem 0 1.25rem;
    padding-bottom: .625rem;
    color: var(--hp-navy);
    font-size: 1.5rem;            /* H2 24 */
    font-weight: 700;
    line-height: 1.3;
}
.hp-section-title::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 3rem; height: 4px;
    background: var(--hp-navy);
}

/* (not used on the homepage any more; kept for inner pages) */
.hp-block-title {
    margin: 0 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--hp-navy);
    color: var(--hp-navy);
    font-size: 1.25rem;           /* H3 20 */
    font-weight: 700;
    line-height: 1.3;
}

/* ---------- Performance Smart Board ---------- */
.hp-psb { display: block; margin: 1.5rem 0; border-radius: .5rem; overflow: hidden; }
.hp-psb img { display: block; width: 100%; }

/* =========================================================
   Panel: Ambassador | India–Qatar Trade | Quick Links   (MEA formal, strict DBIM)
   Every colour is from the DBIM 3.0 palette:
     Blue group  #162F6A (key) · #214AAB · #5279D7 · #A3BBF3 · #D2DFFF
     Functional  #FFFFFF Inclusive White · #150202 Deep Earthy Brown · #606060 Grey
   Gradients only between two shades of the same group (DBIM 2.1). No drop shadows, no motion.
   Each column = card: navy header strip (white icon + H2) + body.
   Trade and Quick Links use the SAME tile (size, icon, type) so the panel reads as one system.
     ≥1280  three columns, bottoms aligned
     992–1279  Ambassador + Trade, Quick Links full width (2 columns)
     576–991  stacked; ambassador card horizontal; links in 2 columns
     <576  one link per row
   ========================================================= */
.hp-panel {
    display: grid;
    grid-template-columns: minmax(16rem, 18rem) minmax(0, 1fr) minmax(20rem, 23rem);
    grid-template-areas: "amb trade quick";
    gap: 1.5rem;
    align-items: stretch;
}

/* ---------- column card ---------- */
.hp-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--hp-card-line);
    border-radius: .625rem;
    background: var(--hp-card);
}
.hp-col--amb   { grid-area: amb; }
.hp-col--trade { grid-area: trade; }
.hp-col--quick { grid-area: quick; }

.hp-col__head {
    display: flex;
    align-items: center;
    gap: .625rem;
    min-height: 3.25rem;
    padding: .625rem 1rem;
    border-bottom: 3px solid #5279D7;
    background: #162F6A var(--hp-grad);
    color: #fff;
}
.hp-col__icon {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    padding: .3125rem;
    border: 1px solid #A3BBF3;
    border-radius: 50%;
}
.hp-col__title {
    margin: 0;
    color: #fff;
    font-size: 1.25rem;               /* H3 20 */
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .01em;
}
.hp-panel .hp-col__body { flex: 1 1 auto; padding: .875rem; }   /* .hp-panel beats ".hp ul { padding: 0 }" */

/* ---------- Ambassador ---------- */
.hp-panel .hp-amb { display: flex; flex-direction: column; padding: .875rem; }

/* DBIM 6 headshot frame: always 1:1 on white. Cropped from the top, never stretched,
   so it also behaves with an older 4:5 file. */
.hp-amb__media {
    flex: 0 0 auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--hp-tile-line);
    border-bottom: 0;
    border-radius: .5rem .5rem 0 0;
    background: #fff;
}
.hp-amb__photo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 50% 0%;
}
@supports not (aspect-ratio: 1 / 1) {
    .hp-amb__media { position: relative; height: 0; padding-top: 100%; }
    .hp-amb__photo { position: absolute; top: 0; left: 0; }
}

.hp-amb__info {                       /* name band; takes any spare column height */
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-height: 4.5rem;
    padding: .75rem 1rem;
    border-radius: 0 0 .5rem .5rem;
    background: #214AAB var(--hp-grad);
    color: #fff;
    text-align: center;
}
.hp-amb__name {
    margin: 0;
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
}
.hp-amb__role {
    margin: .25rem 0 0 !important;
    padding-top: .25rem;
    border-top: 1px solid #5279D7;
    color: #fff;
    font-size: .875rem;
    line-height: 1.4;
}

.hp-amb__links { display: flex; gap: .5rem; padding-top: .75rem !important; }
.hp-amb__links li { display: flex; flex: 1 1 auto; min-width: 0; }

/* outline button (DBIM CTA: same size/padding, distinct hover + focus) */
.hp-btn {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    min-height: 2.75rem;
    padding: .375rem .625rem;
    border: 1px solid var(--hp-navy);
    border-radius: .375rem;
    background: var(--hp-card);
    color: var(--hp-navy);
    font-size: .875rem;               /* P2 14 */
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}
.hp-btn__ico { flex: 0 0 auto; width: 1.125rem; height: 1.125rem; }
.hp-btn:hover,
.hp-btn:focus-visible {
    background: var(--hp-navy);
    color: #fff;
    text-decoration: underline;
    text-underline-offset: .2em;
}

/* ---------- link tiles (Trade + Quick Links, identical) ---------- */
.hp-tiles,
.hp-quick__list {
    display: grid;
    grid-auto-rows: 1fr;              /* equal tile heights; lists fill to the panel bottom */
    align-content: stretch;
    gap: .625rem;
}
.hp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hp-quick__list { grid-template-columns: minmax(0, 1fr); }
.hp-panel .hp-col--quick .hp-col__body { padding: .75rem; }
.hp-quick__list .hp-tile { gap: .625rem; padding-right: .625rem; }
.hp-tiles > li,
.hp-quick__list > li { display: flex; min-width: 0; }

.hp-tile {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    min-height: 3.5rem;
    padding: .5rem .875rem .5rem .5rem;
    border: 1px solid var(--hp-tile-line);
    border-radius: .5rem;
    background: var(--hp-tile-bg);
    color: var(--hp-navy);
    font-size: 1rem;                  /* P1 16 */
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    overflow: hidden;
    transition: border-color .15s ease;
}
.hp-tile::before {                    /* navy edge bar, shown on hover / focus */
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 4px;
    background: var(--hp-navy);
    opacity: 0;
}
.hp-tile__icon {
    display: inline-flex;
    flex: 0 0 2.5rem;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .5rem;
    background: #162F6A var(--hp-grad);
    color: #fff;
}
.hp-tile__svg { width: 1.375rem; height: 1.375rem; }
.hp-tile__text { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
.hp-tile__go {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    padding: .3125rem;
    border-radius: 50%;
    background: var(--hp-soft);
    color: var(--hp-navy);
    transition: background-color .15s ease, color .15s ease;
}

/* hover + keyboard focus: navy border + edge bar, filled arrow, underline (not colour alone) */
a.hp-tile:hover,
a.hp-tile:focus-visible {
    border-color: var(--hp-navy);
    color: var(--hp-navy);
    text-decoration: none;
}
a.hp-tile:hover::before,
a.hp-tile:focus-visible::before { opacity: 1; }
a.hp-tile:hover .hp-tile__text,
a.hp-tile:focus-visible .hp-tile__text { text-decoration: underline; text-underline-offset: .2em; }
a.hp-tile:hover .hp-tile__go,
a.hp-tile:focus-visible .hp-tile__go { background: var(--hp-navy); color: #fff; }

.hp-tile--static { color: var(--hp-text); }


/* ---------- breakpoints ---------- */
@media (max-width: 1279.98px) {
    .hp-panel {
        grid-template-columns: 16rem minmax(0, 1fr);
        grid-template-areas: "amb trade" "quick quick";
    }
    .hp-quick__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
    .hp-panel {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "amb" "trade" "quick";
        gap: 1.25rem;
    }
    /* ambassador: photo left, name band + buttons right */
    .hp-panel .hp-amb {
        display: grid;
        grid-template-columns: 10rem minmax(0, 1fr);
        grid-template-rows: 1fr auto;
        grid-template-areas: "media info" "media links";
        column-gap: 1rem;
    }
    .hp-amb__media { grid-area: media; align-self: start; border-bottom: 1px solid var(--hp-tile-line); border-radius: .5rem; }
    .hp-amb__info  { grid-area: info; border-radius: .5rem; text-align: left; }
    .hp-amb__links { grid-area: links; }
    .hp-amb__links li { flex: 0 1 auto; }
    .hp-quick__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .hp-col__head { min-height: 2.875rem; padding: .5rem .875rem; }
    .hp-col__title { font-size: 1rem; }                                /* H3 mobile 16 */
    .hp-col__icon { width: 1.75rem; height: 1.75rem; padding: .25rem; }
    .hp-panel .hp-col__body,
    .hp-panel .hp-amb { padding: .75rem; }
    .hp-panel .hp-amb { grid-template-columns: 7.5rem minmax(0, 1fr); column-gap: .875rem; }
    .hp-amb__name { font-size: 1rem; }
    .hp-amb__role { font-size: .8125rem; }
    .hp-amb__info { min-height: 0; padding: .625rem .75rem; }
    .hp-btn { font-size: .8125rem; padding: .375rem .625rem; }
    .hp-tile { min-height: 3.25rem; gap: .625rem; padding: .5rem .625rem .5rem .5rem; font-size: .875rem; }   /* P1 mobile 14 */
    .hp-tile__icon { flex-basis: 2.25rem; width: 2.25rem; height: 2.25rem; }
    .hp-tile__svg { width: 1.25rem; height: 1.25rem; }
    .hp-tile__go { width: 1.5rem; height: 1.5rem; padding: .25rem; }
}

@media (max-width: 575.98px) {
    .hp-tiles,
    .hp-quick__list { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
    .hp-panel .hp-amb { grid-template-rows: auto auto; grid-template-areas: "media info" "links links"; row-gap: .75rem; }
    .hp-amb__info { align-self: stretch; }
    .hp-amb__links { padding-top: 0 !important; }
    .hp-amb__links li { flex: 1 1 0; }
}

@media (max-width: 399.98px) {
    .hp-panel .hp-amb { grid-template-columns: 6rem minmax(0, 1fr); column-gap: .75rem; }
}

/* =========================================================
   News cards · social cards · Important Links   (v9 — strict DBIM)
   Same language as the panel: gradient header strip with a ringed line icon,
   Blue-group borders, palette colours only, no shadows, no motion.
   ========================================================= */
.hp-grid { display: grid; gap: 1.5rem; margin-top: 2rem; }
.hp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hp-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.hp-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--hp-card-line);
    border-radius: .625rem;
    background: var(--hp-card);
}
.hp-card__head {
    display: flex;
    align-items: center;
    gap: .625rem;
    min-height: 3.25rem;
    margin: 0;
    padding: .625rem 1rem;
    border-bottom: 3px solid #5279D7;
    background: #162F6A var(--hp-grad);
    color: #fff;
}
.hp-card__icon {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    padding: .3125rem;
    border: 1px solid #A3BBF3;
    border-radius: 50%;
}
.hp-card__title {
    margin: 0;
    color: #fff;
    font-size: 1.25rem;               /* H3 20 */
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .01em;
}

/* ---------- news feed ---------- */
.hp-card__body {
    flex: 1 1 auto;
    height: 25rem;
    overflow-y: auto;
    overscroll-behavior: auto;        /* at the end of the list the wheel / swipe carries on scrolling the page */
    scrollbar-width: thin;
    scrollbar-color: #A3BBF3 transparent;
}
.hp-card__body:focus-visible { outline-offset: -3px; }

.hp-feed__item {
    position: relative;
    padding: .875rem 1rem .875rem 1.25rem;
    border-bottom: 1px solid var(--hp-soft);
}
.hp-feed__item:last-child { border-bottom: 0; }
.hp-feed__item::before {              /* marker bar; turns navy when the item is hovered / focused */
    content: "";
    position: absolute;
    top: .875rem; bottom: .875rem; left: 0;
    width: 3px;
    background: var(--hp-soft);
}
.hp-feed__item:hover::before,
.hp-feed__item:focus-within::before { background: var(--hp-navy); }

.hp-feed__link {
    display: block;                   /* whole title line is clickable */
    color: var(--hp-text);
    font-size: 1rem;                  /* P1 16 */
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
}
.hp-feed__link:hover,
.hp-feed__link:focus-visible { color: var(--hp-navy); text-decoration: underline; text-underline-offset: .2em; }
.hp-feed__text > p { display: inline; margin: 0; }
.hp-feed__link > .hp-ico { margin-left: .375rem; color: var(--hp-muted); }

.hp-meta {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    margin-left: .375rem;
    color: var(--hp-muted);
    font-size: .875rem;
    font-weight: 400;
    white-space: nowrap;
}
.hp-feed__date {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    margin: .5rem 0 0 !important;
    padding: .125rem .5rem;
    border-radius: .25rem;
    background: var(--hp-soft);
    color: var(--hp-navy);
    font-size: .875rem;               /* P2 14 */
    font-weight: 500;
    line-height: 1.5;
}
.hp-empty {
    margin: 1rem !important;
    padding: 2rem 1rem;
    border: 1px dashed var(--hp-card-line);
    border-radius: .5rem;
    color: var(--hp-muted);
    text-align: center;
}

.hp-card__foot {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    border-top: 1px solid var(--hp-soft);
    background: var(--hp-card);
}
.hp-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;              /* 44 px target */
    padding: 0 1rem;
    border: 1px solid var(--hp-navy);
    border-radius: .375rem;
    background: var(--hp-navy);
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.hp-more:hover,
.hp-more:focus-visible { border-color: var(--hp-blue); background: var(--hp-blue); color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.hp-more--plain { background: var(--hp-card); color: var(--hp-navy); }
.hp-more--plain:hover,
.hp-more--plain:focus-visible { border-color: var(--hp-navy); background: var(--hp-navy); color: #fff; }

/* ---------- social ---------- */
.hp-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--hp-soft);
}
.hp-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 1.125rem;
    border: 1px solid var(--hp-navy);
    border-radius: 999px;
    background: var(--hp-card);
    color: var(--hp-navy);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.hp-chip:hover,
.hp-chip:focus-visible { background: var(--hp-navy); color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.hp-card__embed {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 32rem;
    padding: 1rem;
    overflow: hidden;
    background: var(--hp-card);
}
.hp-card__embed .twitter-timeline { color: var(--hp-blue); font-size: 1rem; font-weight: 600; }
.hp-embed { display: block; width: 100%; max-width: 500px; height: 30rem; border: 0; overflow: hidden; }
.hp-embed-fallback {
    align-self: center;
    max-width: 28rem;
    padding: 1.5rem 1rem;
    border: 1px dashed var(--hp-card-line);
    border-radius: .5rem;
    color: var(--hp-muted);
    text-align: center;
}
.hp-embed-fallback a { color: var(--hp-blue); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }

/* ---------- Important Links ---------- */
.hp-links { margin-top: 2rem; }
.hp-panel-body,
.hp-links__body { padding: 1rem; }
.hp-links__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 1rem;
}
.hp-links__grid > li { display: flex; min-width: 0; }
.hp-linktile {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    gap: .625rem;
    min-width: 0;
    padding: 1rem .75rem .875rem;
    overflow: hidden;
    border: 1px solid var(--hp-tile-line);
    border-radius: .5rem;
    background: var(--hp-tile-bg);
    color: var(--hp-navy);
    font-size: .875rem;               /* P2 14 */
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    transition: border-color .15s ease;
}
.hp-linktile::before {                /* navy edge bar on hover / focus — same cue as the panel tiles */
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--hp-navy);
    opacity: 0;
}
.hp-linktile__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 5rem;
    padding: .25rem;
    border-radius: .375rem;
    background: #fff;                 /* logos are artwork: always on white, also in dark modes */
}
.hp-linktile__logo img { max-width: 100%; max-height: 4.5rem; width: auto; height: auto; object-fit: contain; }
.hp-linktile__text { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: .375rem; overflow-wrap: break-word; }
.hp-linktile__go { flex: 0 0 auto; width: .875rem; height: .875rem; color: var(--hp-blue); }
.hp-linktile:hover,
.hp-linktile:focus-visible { border-color: var(--hp-navy); color: var(--hp-navy); text-decoration: none; }
.hp-linktile:hover::before,
.hp-linktile:focus-visible::before { opacity: 1; }
.hp-linktile:hover .hp-linktile__label,
.hp-linktile:focus-visible .hp-linktile__label { text-decoration: underline; text-underline-offset: .2em; }

/* ---------- breakpoints (cards + links) ---------- */
@media (max-width: 1199.98px) {
    .hp-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hp-grid--3 > :last-child { grid-column: 1 / -1; }
    .hp-links__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .hp-grid { margin-top: 1.5rem; gap: 1.25rem; }
    .hp-grid--3,
    .hp-grid--2 { grid-template-columns: minmax(0, 1fr); }
    .hp-grid--3 > :last-child { grid-column: auto; }
    .hp-card__head { min-height: 2.875rem; padding: .5rem .875rem; }
    .hp-card__title { font-size: 1rem; }                               /* H3 mobile 16 */
    .hp-card__icon { width: 1.75rem; height: 1.75rem; padding: .25rem; }
    .hp-card__body { height: auto; max-height: 22rem; }
    .hp-feed__item { padding: .75rem .875rem .75rem 1.125rem; }
    .hp-feed__link { font-size: .875rem; }                             /* P1 mobile 14 */
    .hp-feed__date,
    .hp-meta { font-size: .8125rem; }
    .hp-card__embed { height: 28rem; }
    .hp-embed { height: 26rem; }
    .hp-links { margin-top: 1.5rem; }
    .hp-links__body { padding: .75rem; }
    .hp-links__grid { gap: .75rem; }
    .hp-linktile { padding: .75rem .5rem; font-size: .8125rem; }
}

@media (max-width: 575.98px) {
    .hp-links__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hp-linktile__logo { height: 4rem; }
    .hp-linktile__logo img { max-height: 3.5rem; }
}

/* =========================================================
   Page-level type on phones
   ========================================================= */
@media (max-width: 767.98px) {
    .hp { font-size: .875rem; }
    .hp-section-title { margin-top: 2.25rem; font-size: 1.25rem; }      /* H2 mobile 20 */
    .hp-block-title { font-size: 1.125rem; }
}

/* =========================================================
   Notices (native <dialog>)
   ========================================================= */
html.hp-modal-open { overflow: hidden; }

.hp-modal {
    position: fixed;
    inset: 0;
    width: min(50rem, calc(100vw - 2rem));
    max-width: none;
    max-height: calc(100vh - 3rem);
    margin: auto;
    padding: 0;
    overflow: visible;
    border: 0;
    border-top: 6px solid var(--hp-navy);
    border-radius: .75rem;
    background: #fff;
}
.hp-modal:not([open]) { display: none; }
.hp-modal::backdrop { background: rgba(21, 2, 2, .72); }
.hp-modal.is-fallback { z-index: 10000; box-shadow: 0 0 0 100vmax rgba(21, 2, 2, .72); }

.hp-modal__inner {
    max-height: calc(100vh - 3.5rem);
    overflow-y: auto;
    padding: 2.25rem 2.5rem 2rem;
    font-size: 1rem;
    line-height: 1.6;
}
.hp-modal__inner p,
.hp-modal__list { margin: 0 0 1rem; }
.hp-modal__inner a { color: var(--hp-blue); font-weight: 600; text-decoration: underline; word-break: break-word; }

.hp-modal__step { margin: 0 0 .5rem !important; color: var(--hp-muted); font-size: .875rem; }
.hp-modal__step:empty { display: none; }
.hp-modal__emblem { display: block; width: auto; height: 5rem; margin: 0 auto .75rem; }
.hp-modal__org { text-align: center; font-size: 1.25rem; font-weight: 700; line-height: 1.35; }
.hp-modal__title {
    display: table;
    margin: 0 auto 1.5rem;
    padding: .625rem 1.5rem;
    border-radius: .5rem;
    background: var(--hp-tint);
    color: var(--hp-navy);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}
.hp-modal__list { padding-left: 1.5rem; }
.hp-modal__list li { margin-bottom: .75rem; }
.hp-url { font-weight: 600; word-break: break-all; }

.hp-modal__close {
    position: absolute;
    top: -1.25rem;
    right: -1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin: 0;
    padding: 0;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--hp-navy);
    color: #fff;
    cursor: pointer;
}
.hp-modal__close:hover { background: var(--hp-blue); }
.hp-modal__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 7px var(--hp-navy); }

@media (max-width: 767.98px) {
    .hp-modal { width: calc(100vw - 1.5rem); max-height: calc(100vh - 1.5rem); }
    .hp-modal__inner { max-height: calc(100vh - 2rem); padding: 3.25rem 1.25rem 1.5rem; font-size: .875rem; }
    .hp-modal__close { top: .5rem; right: .5rem; border-color: var(--hp-navy); }
    .hp-modal__org, .hp-modal__title { font-size: 1rem; }
    .hp-modal__emblem { height: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
    .hp *, .hp-modal * { transition: none !important; }
}

/* ---------------------------------------------------------
   Dark Contrast (html.ei-dark) / Dark Mode (html.ei-theme-dark)
   — the classes your header's accessibility panel sets.
   --------------------------------------------------------- */
html.ei-dark :is(.hp, .hp-modal),
html.ei-theme-dark :is(.hp, .hp-modal) {
    --hp-card: #111827;
    --hp-pale: #0f172a;
    --hp-linen: #1f2a44;
    --hp-text: #F9FAFB;
    --hp-muted: #D1D5DB;
    --hp-line: #3A4A70;
    --hp-tint: #214AAB;
    --hp-navy: #214AAB;
    --hp-card-line: #3A4A70;
    --hp-soft: #1f2a44;
    --hp-tile-bg: #0f172a;
    --hp-tile-line: #3A4A70;
    --hp-grad: linear-gradient(135deg, #0B1A38 0%, #214AAB 100%);
}
html.ei-dark .hp-modal,
html.ei-theme-dark .hp-modal { background: #111827; }
html.ei-dark :is(.hp-modal__title, .hp-more--plain, .hp-modal__inner a, .hp-block-title, .hp-section-title, .hp-tile, .hp-feed__date, .hp-chip, .hp-linktile),
html.ei-theme-dark :is(.hp-modal__title, .hp-more--plain, .hp-modal__inner a, .hp-block-title, .hp-section-title, .hp-tile, .hp-feed__date, .hp-chip, .hp-linktile) { color: #fff; }
html.ei-dark .hp a:focus-visible,
html.ei-theme-dark .hp a:focus-visible { outline-color: #FFD54A; }
html.ei-dark .hp-tile__go,
html.ei-theme-dark .hp-tile__go { background: #1f2a44; color: #D2DFFF; }
html.ei-dark :is(.hp-btn, a.hp-tile:hover, a.hp-tile:focus-visible),
html.ei-theme-dark :is(.hp-btn, a.hp-tile:hover, a.hp-tile:focus-visible) { border-color: #A3BBF3; color: #fff; }

/* Windows High Contrast: keep card, tile and button edges */
@media (forced-colors: active) {
    .hp-col, .hp-col__head, .hp-tile, .hp-btn, .hp-amb__info,
    .hp-card, .hp-card__head, .hp-more, .hp-chip, .hp-linktile { border: 1px solid CanvasText; }
    a.hp-tile:hover, a.hp-tile:focus-visible { outline: 2px solid Highlight; }
}
