/* =====================================================================
   Medical Swift — design system v2
   RTL-first (logical properties), mobile-first, motion-aware.
   ===================================================================== */

/* ---------- Fonts ---------- */
@font-face {
    font-family: "Cairo";
    src: url("../fonts/cairo-arabic.woff2") format("woff2");
    font-weight: 400 800;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: "Cairo";
    src: url("../fonts/cairo-latin.woff2") format("woff2");
    font-weight: 400 800;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
    --ink: #0b1b33;
    --ink-2: #33445c;
    --muted: #5b6b82;
    --line: #e3e9f2;
    --line-2: #d3dce9;
    --bg: #f5f8fd;
    --white: #fff;

    --brand: #2b5cd6;
    --brand-600: #2450c2;
    --brand-700: #1d3f9e;
    --brand-50: #eef3ff;
    --brand-100: #dce6ff;
    --teal: #0e9aa7;
    --teal-50: #e4f6f8;
    --accent: #f47a2f;
    --accent-btn: #bf531a;   /* 4.7:1 with white */
    --accent-50: #fff3eb;
    --ok: #17805a;
    --navy: #0b1630;

    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --sh-1: 0 1px 2px rgba(11, 27, 51, .06), 0 2px 8px rgba(11, 27, 51, .05);
    --sh-2: 0 4px 12px rgba(11, 27, 51, .07), 0 12px 32px rgba(11, 27, 51, .07);
    --sh-3: 0 18px 50px rgba(11, 27, 51, .16);
    --focus: 0 0 0 3px rgba(43, 92, 214, .35);
    --ease: cubic-bezier(.2, .8, .2, 1);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --header-h: 72px;
    --gutter: 16px;
}
@media (min-width: 768px) { :root { --gutter: 24px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
    margin: 0;
    font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-700); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 800; color: var(--ink); }
p { margin: 0 0 .8em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
bdi { unicode-bidi: isolate; }
hr { border: 0; border-block-start: 1px solid var(--line); margin-block: 1.5rem; }
::selection { background: var(--brand-100); }

.ico { inline-size: 1.15em; block-size: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 12px; inset-block-start: -80px; z-index: 200; background: var(--ink); color: #fff !important; padding: .55rem 1rem; border-radius: 10px; transition: inset-block-start .2s; }
.skip:focus { inset-block-start: 12px; }

.wrap { inline-size: 100%; max-inline-size: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-inline-size: 860px; }
.tc { text-align: center; }
.muted { color: var(--muted); }

/* Type */
.kicker { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 .5rem; color: var(--brand); font-weight: 800; font-size: .88rem; letter-spacing: .01em; }
.kicker::before { content: ""; inline-size: 18px; block-size: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--brand)); }
.h1 { font-size: clamp(1.7rem, 1.25rem + 2vw, 2.6rem); letter-spacing: -.01em; }
.h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 2rem); letter-spacing: -.01em; }
.h3 { font-size: 1.18rem; display: flex; align-items: center; gap: .55rem; }
.h3 .ico { color: var(--brand); }
.lead { font-size: clamp(1rem, .96rem + .25vw, 1.12rem); color: var(--ink-2); max-inline-size: 70ch; }

/* ---------- Buttons ---------- */
.btn {
    --btn-bg: var(--brand); --btn-fg: #fff; --btn-bd: transparent;
    position: relative; isolation: isolate; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-block-size: 46px; padding: .6rem 1.15rem; border-radius: 14px;
    border: 1.5px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg) !important;
    font-weight: 800; font-size: .98rem; line-height: 1.2; white-space: nowrap; text-decoration: none;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--primary { --btn-bg: var(--brand); }
.btn--primary:hover { --btn-bg: var(--brand-600); }
.btn--accent { --btn-bg: var(--accent-btn); }
.btn--accent:hover { --btn-bg: #a3460f; }
.btn--outline { --btn-bg: #fff; --btn-fg: var(--brand); --btn-bd: var(--brand); }
.btn--outline:hover { --btn-bg: var(--brand-50); }
.btn--soft { --btn-bg: var(--brand-50); --btn-fg: var(--brand-700); }
.btn--soft:hover { --btn-bg: var(--brand-100); box-shadow: none; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink-2); }
.btn--ghost:hover { --btn-bg: var(--bg); box-shadow: none; }
.btn--white { --btn-bg: #fff; --btn-fg: var(--brand-700); }
.btn--sm { min-block-size: 38px; padding: .4rem .85rem; font-size: .9rem; border-radius: 11px; }
.btn--lg { min-block-size: 54px; padding: .75rem 1.5rem; font-size: 1.03rem; border-radius: 16px; }
.btn--block { inline-size: 100%; }
.btn .num { font-weight: 700; opacity: .9; font-size: .92em; }
.btn[disabled], .btn.is-busy { opacity: .7; cursor: progress; transform: none; }
.btn.is-busy .ico { animation: spin .8s linear infinite; }
/* Ripple on primary actions */
.btn--primary::after, .btn--accent::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(circle at var(--rx, 50%) var(--ry, 50%), rgba(255, 255, 255, .35), transparent 60%);
    opacity: 0; transition: opacity .35s;
}
.btn--primary:hover::after, .btn--accent:hover::after { opacity: 1; }

.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; white-space: nowrap; }
.link-arrow .ico { transition: transform .2s var(--ease); }
.link-arrow:hover .ico { transform: translateX(-4px); }

/* ---------- Header ---------- */
/* The frosted background lives on ::before: backdrop-filter on the header itself would make it the
   containing block of the fixed mobile drawer, shrinking the drawer to the header's 64px. */
.site-header {
    position: sticky; inset-block-start: 0; z-index: 60;
    border-block-end: 1px solid transparent;
    transition: border-color .25s, box-shadow .25s;
}
.site-header::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
    transition: background-color .25s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px rgba(11, 27, 51, .06); }
.site-header.is-scrolled::before { background: rgba(255, 255, 255, .95); }
.ms-home .site-header:not(.is-scrolled)::before { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header__bar { display: flex; align-items: center; gap: 1rem; block-size: var(--header-h); transition: block-size .25s var(--ease); }
.site-header.is-scrolled .site-header__bar { block-size: 62px; }
.brand { flex: none; }
.brand img { block-size: 46px; inline-size: auto; transition: block-size .25s var(--ease); }
.site-header.is-scrolled .brand img { block-size: 40px; }

.nav { margin-inline-start: auto; display: flex; align-items: center; gap: .75rem; }
.nav__head { display: none; }
.nav__list { display: flex; gap: .15rem; }
.nav__list a { position: relative; display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; border-radius: 10px; color: var(--ink-2); font-weight: 700; font-size: .96rem; }
.nav__list a > .ico { display: none; }
.nav__list a::after { content: ""; position: absolute; inset-inline: .75rem; inset-block-end: .3rem; block-size: 2px; border-radius: 2px; background: var(--brand); transform: scaleX(0); transform-origin: right; transition: transform .25s var(--ease); }
.nav__list a:hover { color: var(--ink); }
.nav__list a:hover::after, .nav__list a[aria-current="page"]::after { transform: scaleX(1); }
.nav__list a[aria-current="page"] { color: var(--brand); }
.nav__extra { display: flex; gap: .5rem; align-items: center; }

.burger { display: none; margin-inline-start: auto; inline-size: 46px; block-size: 46px; flex: none; border: 1px solid var(--line); border-radius: 14px; background: #fff; align-items: center; justify-content: center; }
.burger__lines { position: relative; inline-size: 20px; block-size: 14px; }
.burger__lines span { position: absolute; inset-inline: 0; block-size: 2px; border-radius: 2px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s, inset-block-start .3s var(--ease); }
.burger__lines span:nth-child(1) { inset-block-start: 0; }
.burger__lines span:nth-child(2) { inset-block-start: 6px; }
.burger__lines span:nth-child(3) { inset-block-start: 12px; }
.burger[aria-expanded="true"] .burger__lines span:nth-child(1) { inset-block-start: 6px; transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger__lines span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__lines span:nth-child(3) { inset-block-start: 6px; transform: rotate(-45deg); }
.nav-backdrop { display: none; }

@media (max-width: 1120px) {
    :root { --header-h: 64px; }
    .brand img { block-size: 40px; }
    .burger { display: inline-flex; }
    /* Off-canvas drawer, slides in from the right (inline-start in RTL). */
    .nav {
        position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 70;
        inline-size: min(84vw, 340px); block-size: 100vh; block-size: 100dvh;
        flex-direction: column; align-items: stretch; gap: 1rem;
        margin: 0; padding: 0 16px calc(20px + env(safe-area-inset-bottom));
        background: #fff; box-shadow: var(--sh-3);
        overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
        transform: translateX(105%); visibility: hidden;
        transition: transform .35s var(--ease-out), visibility 0s linear .35s;
    }
    .nav.is-open { transform: none; visibility: visible; transition: transform .35s var(--ease-out), visibility 0s; }
    .nav__head {
        position: sticky; inset-block-start: 0; z-index: 1;
        display: flex; align-items: center; justify-content: space-between; gap: .75rem;
        min-block-size: var(--header-h); margin-inline: -16px; padding-inline: 16px 12px;
        background: #fff; border-block-end: 1px solid var(--line);
    }
    .nav__title { font-weight: 800; font-size: 1.05rem; color: var(--ink); }
    .nav__close { inline-size: 44px; block-size: 44px; }
    .nav__list { flex-direction: column; gap: .2rem; }
    .nav__list a { min-block-size: 48px; padding: .7rem .8rem; font-size: 1.04rem; border-radius: 12px; color: var(--ink); }
    .nav__list a > .ico { display: block; inline-size: 20px; block-size: 20px; color: var(--brand); }
    .nav__list a::after { display: none; }
    .nav__list a:hover, .nav__list a:focus-visible { background: var(--bg); }
    .nav__list a[aria-current="page"] { background: var(--brand-50); color: var(--brand-700); }
    .nav__extra { flex-direction: column; align-items: stretch; gap: .6rem; margin-block-start: auto; padding-block-start: 1rem; border-block-start: 1px solid var(--line); }
    .nav__extra .btn { min-block-size: 48px; font-size: 1rem; }
    .nav-backdrop {
        display: block; position: fixed; inset: 0; z-index: 65;
        background: rgba(11, 22, 48, .5); opacity: 0; visibility: hidden;
        transition: opacity .3s, visibility 0s linear .3s;
    }
    .nav-backdrop.is-open { opacity: 1; visibility: visible; transition: opacity .3s, visibility 0s; }
    html.nav-open, html.nav-open body { overflow: hidden; }
    html.nav-open .burger { opacity: 0; } /* the drawer has its own close button */
}
@media (max-width: 380px) {
    .site-header__bar { gap: .5rem; }
    .brand img { block-size: 36px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; margin-block-start: calc(var(--header-h) * -1); padding-block-start: var(--header-h); }
.hero__bg { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #f3f7ff 0%, #fbfcff 60%, #fff 100%); -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.hero__bg::before {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(43, 92, 214, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(43, 92, 214, .06) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.blob--1 { inline-size: 520px; block-size: 520px; inset-block-start: -180px; inset-inline-end: -120px; background: radial-gradient(circle, #8fb0ff, transparent 65%); animation: drift 18s var(--ease) infinite alternate; }
.blob--2 { inline-size: 420px; block-size: 420px; inset-block-end: -160px; inset-inline-start: -100px; background: radial-gradient(circle, #ffc29c, transparent 65%); animation: drift 22s var(--ease) infinite alternate-reverse; }
.blob--3 { inline-size: 360px; block-size: 360px; inset-block-start: 30%; inset-inline-start: 35%; background: radial-gradient(circle, #8ee3ea, transparent 65%); opacity: .35; animation: drift 26s var(--ease) infinite alternate; }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.08); } }

.hero__inner { display: grid; gap: 2rem; padding-block: 2rem 3rem; align-items: center; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .85rem .35rem .4rem; margin: 0 0 1.1rem; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 1px solid var(--brand-100); color: var(--brand-700); font-weight: 700; font-size: .88rem; box-shadow: var(--sh-1); }
.hero__eyebrow b { display: inline-grid; place-items: center; min-inline-size: 26px; block-size: 26px; padding-inline: .45rem; border-radius: 999px; background: var(--brand); color: #fff; font-size: .8rem; }
.hero__title { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.4rem); line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
.hero__title .hl { position: relative; z-index: 0; white-space: nowrap; background: linear-gradient(90deg, var(--brand), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__title .hl::after { content: ""; position: absolute; z-index: -1; inset-inline: -2%; inset-block-end: .06em; block-size: .2em; border-radius: 6px; background: var(--accent); opacity: .28; transform-origin: right; animation: underline 1s .4s var(--ease-out) both; }
@keyframes underline { from { transform: scaleX(0); } }
.hero__lead { margin-block: 1rem 0; font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); color: var(--ink-2); max-inline-size: 54ch; text-wrap: pretty; }
.rotator { display: inline-grid; justify-items: start; vertical-align: bottom; block-size: 1.75em; overflow: hidden; color: var(--brand-700); font-weight: 800; transition: inline-size .45s var(--ease-out); }
.rotator > span { white-space: nowrap; }
.rotator > span { grid-area: 1 / 1; transform: translateY(110%); opacity: 0; transition: transform .5s var(--ease-out), opacity .4s; }
.rotator > span.is-active { transform: none; opacity: 1; }
.rotator > span.is-out { transform: translateY(-110%); opacity: 0; }
.hero__stats { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; margin-block-start: 1.5rem; }
.stat { display: grid; }
.stat__n { font-size: 1.6rem; font-weight: 800; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat__l { font-size: .88rem; color: var(--muted); }

@media (min-width: 1000px) {
    .hero__inner { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; padding-block: 3.5rem 4.5rem; }
}

/* Hero visual */
.hero-visual { position: relative; display: none; aspect-ratio: 1 / .92; }
@media (min-width: 1000px) { .hero-visual { display: block; } }
.scan {
    position: absolute; inset: 9% 10% 9% 10%; border-radius: 32px; overflow: hidden;
    background: radial-gradient(120% 90% at 50% 0%, #1d3f9e 0%, #0b1630 70%);
    box-shadow: 0 30px 80px rgba(11, 22, 48, .35), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.scan svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; }
.scan__ring { transform-origin: 50% 50%; animation: spin 28s linear infinite; }
.scan__line { position: absolute; inset-inline: 0; block-size: 26%; background: linear-gradient(180deg, transparent, rgba(110, 231, 240, .28) 70%, rgba(110, 231, 240, .9) 98%, transparent); animation: scan 3.6s var(--ease) infinite; }
@keyframes scan { 0% { inset-block-start: -26%; } 100% { inset-block-start: 100%; } }
.scan__pulse { position: absolute; inline-size: 12px; block-size: 12px; border-radius: 50%; background: #6ee7f0; box-shadow: 0 0 0 0 rgba(110, 231, 240, .7); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 16px rgba(110, 231, 240, 0); } 100% { box-shadow: 0 0 0 0 rgba(110, 231, 240, 0); } }
.float-card {
    position: absolute; display: flex; gap: .7rem; align-items: center;
    padding: .8rem 1rem; border-radius: 18px; background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--sh-3); border: 1px solid rgba(255, 255, 255, .7);
    animation: float 6s ease-in-out infinite; max-inline-size: 290px;
}
.float-card__icon { display: grid; place-items: center; inline-size: 42px; block-size: 42px; border-radius: 13px; background: var(--brand-50); color: var(--brand); flex: none; }
.float-card__icon--teal { background: var(--teal-50); color: var(--teal); }
.float-card__icon--orange { background: var(--accent-50); color: var(--accent-btn); }
.float-card__icon .ico { inline-size: 22px; block-size: 22px; }
.float-card b { display: block; font-size: .98rem; line-height: 1.35; }
.float-card small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.float-card--a { inset-block-start: 4%; inset-inline-start: 0; }
.float-card--b { inset-block-end: 6%; inset-inline-end: 0; animation-delay: -2s; }
.float-card--c { inset-block-start: 44%; inset-inline-end: -2%; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- Search panel ---------- */
.search-panel { position: relative; padding: .5rem; border-radius: 24px; background: rgba(255, 255, 255, .9); border: 1px solid var(--line); box-shadow: var(--sh-3); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tabs { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: auto; gap: .25rem; padding: .3rem; border-radius: 18px; background: var(--bg); }
.tab { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-block-size: 44px; padding: .4rem .5rem; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-weight: 800; font-size: .92rem; white-space: nowrap; transition: color .2s; }
.tab[aria-selected="true"] { color: var(--brand-700); }
.tab .ico { inline-size: 18px; block-size: 18px; }
.tabs__ink { position: absolute; z-index: 0; inset-block: .3rem; border-radius: 14px; background: #fff; box-shadow: var(--sh-1); transition: inset-inline-start .35s var(--ease-out), inline-size .35s var(--ease-out); }
.tabpanel { padding: 1rem .6rem .6rem; }
.tabpanel[hidden] { display: none; }
.tabpanel.is-entering { animation: fadeUp .35s var(--ease-out); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 420px) { .tab { padding-inline: .35rem; } .tab span { font-size: .84rem; } .tab .ico { display: none; } }
@media (max-width: 340px) { .tabs { gap: 0; } .tab span { font-size: .78rem; } }

/* Combobox */
.combo { position: relative; }
.combo__field { position: relative; display: flex; align-items: center; }
.combo__field > .ico { position: absolute; inset-inline-start: 16px; inline-size: 22px; block-size: 22px; color: var(--muted); pointer-events: none; }
.input, .select select, .combo input {
    inline-size: 100%; min-block-size: 54px; padding: .6rem 1rem; border: 1.5px solid var(--line); border-radius: 14px;
    background: #fff; font-size: 1rem; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
.combo input { padding-inline-start: 3rem; padding-inline-end: 5.6rem; font-size: 1.04rem; text-overflow: ellipsis; }
.combo__submit { position: absolute; inset-inline-end: 6px; }
@media (max-width: 420px) { .combo__field > .ico { inset-inline-start: 12px; } .combo input { padding-inline: 2.5rem 4.9rem; } }
.input:hover, .select select:hover, .combo input:hover { border-color: var(--line-2); }
.input:focus, .select select:focus, .combo input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.combo__list {
    position: absolute; z-index: 30; inset-inline: 0; inset-block-start: calc(100% + 8px);
    max-block-size: min(60vh, 420px); overflow-y: auto; padding: .4rem; border-radius: 16px; background: #fff;
    border: 1px solid var(--line); box-shadow: var(--sh-3); animation: fadeUp .2s var(--ease-out);
}
.combo__list[hidden] { display: none; }
.combo__group { padding: .55rem .7rem .25rem; color: var(--muted); font-size: .78rem; font-weight: 800; }
.combo__opt { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: 12px; color: var(--ink) !important; cursor: pointer; }
.combo__opt .ico { inline-size: 20px; block-size: 20px; color: var(--brand); flex: none; }
.combo__opt b { font-weight: 700; display: block; line-height: 1.4; }
.combo__opt small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.combo__opt mark { background: var(--brand-100); color: inherit; border-radius: 4px; padding-inline: 2px; }
.combo__opt[aria-selected="true"], .combo__opt:hover { background: var(--brand-50); }
.combo__all { display: flex; justify-content: center; gap: .4rem; margin-block-start: .25rem; padding: .6rem; border-block-start: 1px solid var(--line); font-weight: 800; }
.combo__empty { padding: .9rem; color: var(--muted); text-align: center; }
.combo__hint { margin: .6rem .2rem 0; color: var(--muted); font-size: .85rem; }

/* Structured search grid */
.sgrid { display: grid; gap: .75rem; grid-template-columns: 1fr; }
.field { display: grid; gap: .3rem; min-inline-size: 0; }
.field > label { font-weight: 800; font-size: .88rem; color: var(--ink-2); }
.select { position: relative; }
.select::after { content: ""; position: absolute; inset-inline-end: 16px; inset-block-start: 50%; inline-size: 8px; block-size: 8px; border-inline-end: 2px solid var(--muted); border-block-end: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select select { padding-inline-end: 2.6rem; cursor: pointer; }
.select select:disabled { background: var(--bg); color: var(--muted); cursor: not-allowed; }
@media (min-width: 560px) { .sgrid { grid-template-columns: 1fr 1fr; } .sgrid .field--wide, .sgrid .sgrid__go { grid-column: 1 / -1; } }
.sgrid--inline { align-items: end; }
@media (min-width: 960px) { .sgrid--inline { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; } .sgrid--inline .field--wide, .sgrid--inline .sgrid__go { grid-column: auto; } }

.near-box { display: grid; gap: .8rem; justify-items: start; }
.near-box p { margin: 0; color: var(--ink-2); }
.near-box small { color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.75rem, 2rem + 3vw, 5rem); }
.section--tint { background: var(--bg); }
.section--dark { position: relative; overflow: hidden; background: radial-gradient(120% 120% at 100% 0%, #1d3f9e 0%, var(--navy) 60%); color: #d9e3f5; }
.section--dark .h2, .section--dark h3 { color: #fff; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem 1.5rem; margin-block-end: 1.5rem; }
.sec-head p:not(.kicker) { margin: .35rem 0 0; color: var(--muted); }

/* Exam explorer */
.chiptabs { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem .1rem 1rem; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.chiptabs::-webkit-scrollbar { display: none; }
.chiptab { scroll-snap-align: start; display: inline-flex; align-items: center; gap: .55rem; padding: .55rem .9rem .55rem 1rem; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font-weight: 800; white-space: nowrap; transition: border-color .2s, background-color .2s, color .2s, transform .2s var(--ease); }
.chiptab .ico { inline-size: 20px; block-size: 20px; color: var(--brand); }
.chiptab small { color: var(--muted); font-weight: 700; }
.chiptab:hover { border-color: var(--brand-100); transform: translateY(-1px); }
.chiptab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chiptab[aria-selected="true"] .ico, .chiptab[aria-selected="true"] small { color: #cfe0ff; }
.explorer__panel { position: relative; min-block-size: 200px; }
.explorer__panel.is-loading .grid { opacity: .35; filter: blur(1px); transition: opacity .2s; }
.explorer__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-block-start: 1.25rem; }
.explorer__about { margin: 0; color: var(--ink-2); max-inline-size: 70ch; }

/* Tiles (exams hub / home) */
.tiles { display: grid; gap: .8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.tile { position: relative; display: grid; gap: .45rem; align-content: start; block-size: 100%; padding: 1.1rem; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); color: var(--ink) !important; overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.tile::before { content: ""; position: absolute; inset-inline-end: -40px; inset-block-start: -40px; inline-size: 120px; block-size: 120px; border-radius: 50%; background: radial-gradient(circle, var(--brand-50), transparent 70%); transition: transform .4s var(--ease); }
.tile:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--brand-100); }
.tile:hover::before { transform: scale(1.6); }
.tile__icon { position: relative; display: inline-grid; place-items: center; inline-size: 48px; block-size: 48px; border-radius: 14px; background: var(--brand-50); color: var(--brand); transition: transform .3s var(--ease), background-color .3s, color .3s; }
.tile:hover .tile__icon { transform: rotate(-6deg) scale(1.06); background: var(--brand); color: #fff; }
.tile__icon .ico { inline-size: 24px; block-size: 24px; }
.tile__name { position: relative; font-weight: 800; line-height: 1.45; }
.tile__meta { position: relative; color: var(--muted); font-size: .88rem; }

/* Governorates */
.gov-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-block-end: 1rem; }
.gov-filter { position: relative; flex: 1 1 260px; max-inline-size: 360px; }
.gov-filter .ico { position: absolute; inset-inline-start: 14px; inset-block-start: 50%; transform: translateY(-50%); color: var(--muted); }
.gov-filter input { min-block-size: 46px; padding-inline-start: 2.6rem; }
.gov-grid { display: grid; gap: .6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .gov-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1050px) { .gov-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gov { position: relative; display: grid; gap: .35rem; padding: .85rem 1rem; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--ink) !important; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.gov:hover { border-color: var(--brand-100); box-shadow: var(--sh-2); transform: translateY(-2px); }
.gov { min-inline-size: 0; }
.gov__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 .5rem; min-inline-size: 0; }
.gov__name { min-inline-size: 0; overflow-wrap: anywhere; }
.gov__name { font-weight: 800; }
.gov__n { color: var(--muted); font-size: .84rem; font-weight: 700; white-space: nowrap; }
.gov__bar { block-size: 6px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.gov__bar i { display: block; block-size: 100%; inline-size: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--brand)); transform-origin: right; transform: scaleX(0); transition: transform 1s var(--ease-out); }
.is-in .gov__bar i, html:not(.motion) .gov__bar i { transform: scaleX(1); }
.gov-empty { padding: 1rem; color: var(--muted); }

/* ---------- Center cards ---------- */
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; transition: opacity .2s; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 1240px) { .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: transparent; }
.card__media { position: relative; aspect-ratio: 3 / 2; background: var(--bg); overflow: hidden; }
.card__media img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(11, 22, 48, .35)); opacity: .6; }
.card__ph { display: grid; place-items: center; inline-size: 100%; block-size: 100%; color: #9fb0c9; background: linear-gradient(135deg, var(--brand-50), var(--bg)); }
.card__ph .ico { inline-size: 52px; block-size: 52px; stroke-width: 1.3; }
.badge { position: absolute; z-index: 1; display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 800; }
.badge--km { inset-block-start: 10px; inset-inline-start: 10px; background: rgba(11, 22, 48, .85); color: #fff; }
.badge--count { inset-block-end: 10px; inset-inline-end: 10px; background: rgba(255, 255, 255, .92); color: var(--ink); }
.card__body { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.05rem 1.05rem; flex: 1; }
.card__title { font-size: 1.07rem; font-weight: 800; line-height: 1.45; }
.card__title a { color: var(--ink) !important; }
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__place { display: flex; gap: .35rem; align-items: flex-start; margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.card__place .ico { color: var(--accent); margin-block-start: .2em; }
.card__actions { position: relative; z-index: 2; display: flex; gap: .5rem; margin-block-start: auto; padding-block-start: .5rem; }
.card__actions .btn { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chips li { padding: .12rem .6rem; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: .8rem; font-weight: 700; }
.chips .chips__more { background: var(--bg); color: var(--muted); }
.chips--lg li { font-size: .9rem; padding: .25rem .8rem; }

/* List view (results page toggle) */
.grid.is-list { grid-template-columns: 1fr; }
@media (min-width: 700px) {
    .grid.is-list .card { flex-direction: row; }
    .grid.is-list .card__media { inline-size: 240px; aspect-ratio: auto; flex: none; }
    .grid.is-list .card__actions { max-inline-size: 360px; }
}

/* Carousel */
.carousel { position: relative; }
.carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: min(82%, 320px); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .25rem .1rem 1.25rem; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; }
.carousel__nav { display: flex; gap: .5rem; }
.icon-btn { display: inline-grid; place-items: center; inline-size: 46px; block-size: 46px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); transition: background-color .2s, border-color .2s, transform .2s var(--ease), opacity .2s; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.icon-btn[disabled] { opacity: .35; pointer-events: none; }
.carousel__dots { display: flex; justify-content: center; gap: 6px; }
.carousel__dots i { inline-size: 8px; block-size: 8px; border-radius: 8px; background: var(--line-2); transition: inline-size .3s var(--ease), background-color .3s; }
.carousel__dots i.is-active { inline-size: 22px; background: var(--brand); }

/* Steps */
.steps { position: relative; display: grid; gap: 1rem; counter-reset: step; }
@media (min-width: 820px) {
    .steps { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
    .steps:not(.steps--compact)::before { content: ""; position: absolute; inset-inline: 16%; inset-block-start: 34px; block-size: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 8px, transparent 8px 16px); }
}
.steps__item { position: relative; padding: 1.4rem; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); transition: transform .25s var(--ease), box-shadow .25s; }
.steps__item:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.steps__n { position: relative; display: inline-grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--brand), var(--teal)); color: #fff; font-weight: 800; font-size: 1.1rem; box-shadow: 0 8px 20px rgba(43, 92, 214, .3); }
.steps__item h3 { font-size: 1.12rem; margin-block: .8rem .35rem; }
.steps__item p { margin: 0; color: var(--ink-2); }

/* Feature list / trust */
.split { display: grid; gap: 1.25rem; }
@media (min-width: 920px) { .split { grid-template-columns: 1.15fr 1fr; gap: 2rem; } }
.panel { padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.panel--soft { background: var(--brand-50); border-color: var(--brand-100); }
.panel--grad { background: linear-gradient(160deg, var(--brand-50), #fff 65%); }
.panel > .h3 { margin-block-end: 1rem; }
.panel > :last-child { margin-block-end: 0; }
.checks { display: grid; gap: .7rem; }
.checks li { display: flex; gap: .6rem; align-items: flex-start; color: var(--ink-2); }
.checks .ico { flex: none; inline-size: 22px; block-size: 22px; padding: 3px; border-radius: 50%; background: #e3f5ee; color: var(--ok); stroke-width: 2.4; margin-block-start: .15em; }

/* CTA band */
.cta-band { position: relative; overflow: hidden; display: grid; gap: 1.25rem; align-items: center; padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); border-radius: var(--r-xl); background: linear-gradient(120deg, var(--brand-700), var(--brand) 55%, var(--teal)); color: #e8efff; }
.cta-band::before { content: ""; position: absolute; inset-inline-end: -80px; inset-block-start: -120px; inline-size: 320px; block-size: 320px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .08); }
.cta-band h2 { color: #fff; }
.cta-band p { margin: .4rem 0 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (min-width: 860px) { .cta-band { grid-template-columns: 1fr auto; } }

/* FAQ */
.faq { display: grid; gap: .65rem; }
.faq__item { border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.faq__item[open] { border-color: var(--brand-100); box-shadow: var(--sh-1); }
.faq__item summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.2rem; font-weight: 800; cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__icon { position: relative; flex: none; inline-size: 28px; block-size: 28px; border-radius: 50%; background: var(--brand-50); }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; inset-inline-start: 50%; inset-block-start: 50%; inline-size: 12px; block-size: 2px; margin: -1px -6px 0 0; background: var(--brand); border-radius: 2px; transition: transform .3s var(--ease); }
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon::after { transform: rotate(0); }
.faq__body { padding: 0 1.2rem 1.1rem; color: var(--ink-2); overflow: hidden; }
.faq__body p:last-child { margin: 0; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; padding-block: 1.25rem 1.75rem; background: linear-gradient(180deg, #f3f7ff, #fff); border-block-end: 1px solid var(--line); }
.page-hero::before { content: ""; position: absolute; inset-inline-end: -120px; inset-block-start: -160px; inline-size: 420px; block-size: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(143, 176, 255, .35), transparent 65%); pointer-events: none; }
.page-hero .lead { margin-block-start: .75rem; }
.page-hero__meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-block-start: 1rem; }
.meta-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: .88rem; font-weight: 700; }
.meta-chip .ico { color: var(--brand); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .25rem; font-size: .88rem; color: var(--muted); margin-block-end: .9rem; }
.crumbs li:not(:last-child)::after { content: "‹"; margin-inline-start: .45rem; color: #a3afc2; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs [aria-current] { color: var(--ink-2); font-weight: 700; }

.filterbox { margin-block-start: 1.25rem; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--sh-1); }
.filterbox > summary { display: flex; align-items: center; gap: .55rem; padding: .85rem 1.1rem; font-weight: 800; cursor: pointer; list-style: none; }
.filterbox > summary::-webkit-details-marker { display: none; }
.filterbox > summary .ico { color: var(--brand); }
.filterbox__chev { margin-inline-start: auto; transition: transform .25s var(--ease); }
.filterbox[open] .filterbox__chev { transform: rotate(180deg); }
.filterbox .sgrid { padding: 0 1.1rem 1.1rem; }

/* Results */
.results { padding-block: 1.5rem 3.5rem; }
.refine { margin-block-end: 1.25rem; }
.refine__title { font-size: .95rem; color: var(--ink-2); margin-block-end: .55rem; }
.pills { display: flex; gap: .45rem; overflow-x: auto; padding-block-end: .4rem; scrollbar-width: thin; }
.pills a { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 700; font-size: .9rem; transition: border-color .2s, color .2s, background-color .2s; }
.pills a span { color: var(--muted); font-weight: 600; font-size: .8rem; }
.pills a:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
@media (min-width: 820px) { .pills { flex-wrap: wrap; overflow: visible; } }
.toolbar { position: sticky; inset-block-start: calc(var(--header-h) - 4px); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-block-end: 1rem; padding: .55rem .2rem; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.toolbar__count { margin: 0; color: var(--muted); font-size: .93rem; }
.toolbar__count b { color: var(--ink); }
.toolbar__actions { display: flex; gap: .4rem; align-items: center; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--bg); }
.seg button { display: inline-grid; place-items: center; inline-size: 38px; block-size: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--brand); box-shadow: var(--sh-1); }
.loadmore { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-block-start: 2rem; }
.loadmore__bar { inline-size: min(260px, 70%); block-size: 4px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.loadmore__bar i { display: block; block-size: 100%; background: var(--brand); border-radius: inherit; transition: inline-size .4s var(--ease); }
.loadmore small { color: var(--muted); }

.pager ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-block-start: 2rem; }
.pager a, .pager span { display: inline-flex; align-items: center; gap: .3rem; justify-content: center; min-inline-size: 44px; min-block-size: 44px; padding-inline: .8rem; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 700; color: var(--ink-2); }
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager__gap { align-self: center; color: var(--muted); }
.js .pager.is-enhanced { display: none; }

.empty { display: grid; justify-items: center; gap: .5rem; text-align: center; padding: 3rem 1rem; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); background: var(--bg); }
.empty > .ico { inline-size: 46px; block-size: 46px; color: var(--muted); }
.empty h2 { font-size: 1.25rem; }
.empty__links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-block-start: .5rem; }

.related { margin-block-start: 2.5rem; }
.linklist { display: grid; gap: 0 1.5rem; }
@media (min-width: 720px) { .linklist--2 { grid-template-columns: 1fr 1fr; } }
.linklist li { display: flex; justify-content: space-between; gap: .75rem; padding-block: .55rem; border-block-end: 1px solid var(--bg); }
.linklist span { color: var(--muted); font-size: .88rem; }
.note { display: flex; gap: .55rem; align-items: flex-start; padding: .8rem 1rem; border-radius: 14px; background: var(--bg); color: var(--muted); font-size: .9rem; }
.note .ico { margin-block-start: .25em; color: var(--brand); }
.note--warm { background: var(--accent-50); color: #6b3a14; }
.note--warm .ico { color: var(--accent-btn); }
.note--warm a { color: var(--accent-btn); font-weight: 800; text-decoration: underline; }
.note p { margin: 0; }

/* Hub */
.hub { display: grid; gap: 1rem; }
@media (min-width: 720px) { .hub { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .hub { grid-template-columns: repeat(3, 1fr); } }
.hub__item { display: grid; gap: .7rem; align-content: start; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; transition: box-shadow .25s, transform .25s var(--ease), border-color .25s; }
.hub__item:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: var(--brand-100); }
.hub__head { display: flex; gap: .8rem; align-items: center; }
.hub__title { font-size: 1.1rem; display: grid; }
.hub__title a { color: var(--ink) !important; }
.hub__title a:hover { color: var(--brand) !important; }
.hub__title span { color: var(--muted); font-size: .86rem; font-weight: 700; }
.hub__item p { margin: 0; color: var(--ink-2); font-size: .94rem; }
.taglinks { display: flex; flex-wrap: wrap; gap: .35rem; }
.taglinks a { padding: .2rem .7rem; border-radius: 999px; background: var(--bg); color: var(--ink-2); font-size: .86rem; font-weight: 700; transition: background-color .2s, color .2s; }
.taglinks a:hover { background: var(--brand-50); color: var(--brand-700); }

/* ---------- Center page ---------- */
.c-hero { padding-block: 1.25rem 2rem; background: linear-gradient(180deg, #f3f7ff, #fff); border-block-end: 1px solid var(--line); }
.c-hero__grid { display: grid; gap: 1.5rem; }
@media (min-width: 880px) { .c-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 2.5rem; } }
.c-gallery { display: grid; gap: .5rem; }
.c-gallery__main { position: relative; aspect-ratio: 5 / 3.2; border-radius: 22px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.c-gallery__main img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.c-gallery__main button { position: absolute; inset: 0; border: 0; background: transparent; cursor: zoom-in; }
.c-gallery__thumbs { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; }
.c-gallery__thumbs button { flex: none; inline-size: 76px; block-size: 52px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: var(--bg); opacity: .75; transition: opacity .2s, border-color .2s; }
.c-gallery__thumbs button[aria-current="true"], .c-gallery__thumbs button:hover { opacity: 1; border-color: var(--brand); }
.c-gallery__thumbs img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.c-intro { display: grid; gap: .85rem; align-content: start; }
.c-intro__place { display: flex; gap: .45rem; align-items: center; margin: 0; color: var(--ink-2); font-weight: 700; }
.c-intro__place .ico { color: var(--accent); }
.c-intro__cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-block-start: .3rem; }
.c-body { display: grid; gap: 1.25rem; padding-block: 1.75rem 3rem; }
.c-main, .c-side { display: grid; gap: 1.25rem; align-content: start; min-inline-size: 0; }
@media (min-width: 980px) {
    .c-body { grid-template-columns: minmax(0, 1fr) 350px; gap: 2rem; }
    .c-side { position: sticky; inset-block-start: calc(var(--header-h) + 16px); }
}
.phones { display: grid; gap: .5rem; }
.phones li { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem .55rem .9rem; border-radius: 14px; background: var(--bg); }
.phones__type { flex: 1; color: var(--muted); font-weight: 700; font-size: .9rem; }
.phones__num { font-weight: 800; font-size: 1.08rem; color: var(--ink) !important; }
.phones__acts { display: flex; gap: .3rem; }
.phones .icon-btn { inline-size: 38px; block-size: 38px; border-radius: 11px; }
.phones .is-fax { opacity: .8; }
.map { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; margin-block: .75rem 1rem; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(135deg, var(--brand-50), var(--bg)); }
.map::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--line-2) 1px, transparent 1px); background-size: 18px 18px; opacity: .7; }
.map .btn { position: relative; }
.map iframe { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; border: 0; animation: fadeIn .4s; }
@keyframes fadeIn { from { opacity: 0; } }
.examlist { display: grid; gap: .5rem; }
@media (min-width: 640px) { .examlist { grid-template-columns: 1fr 1fr; } }
.examlist li { display: flex; align-items: center; gap: .7rem; padding: .6rem; border-radius: 14px; border: 1px solid var(--line); }
.examlist .tile__icon { inline-size: 40px; block-size: 40px; border-radius: 12px; }
.examlist .tile__icon .ico { inline-size: 20px; block-size: 20px; }
.examlist b { display: block; line-height: 1.4; }
.examlist a { font-size: .84rem; font-weight: 700; }

.stickybar { display: none; }
@media (max-width: 760px) {
    .stickybar {
        position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 50; display: flex; gap: .5rem;
        padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        border-block-start: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(11, 27, 51, .08);
        transform: translateY(110%); transition: transform .35s var(--ease-out);
    }
    .stickybar.is-visible { transform: none; }
    .stickybar .btn { flex: 1; }
    body.has-stickybar .site-footer { padding-block-end: 6rem; }
    body.has-stickybar .to-top { inset-block-end: 84px; }
}

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 1rem; background: rgba(6, 12, 28, .9); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { inline-size: auto; block-size: auto; max-inline-size: min(1100px, 100%); max-block-size: 82vh; border-radius: 14px; object-fit: contain; animation: zoomIn .3s var(--ease-out); }
@keyframes zoomIn { from { transform: scale(.94); opacity: 0; } }
.lightbox .icon-btn { position: absolute; background: rgba(255, 255, 255, .12); border-color: transparent; color: #fff; }
.lightbox__close { inset-block-start: 16px; inset-inline-end: 16px; }
.lightbox__prev { inset-inline-start: 16px; }
.lightbox__next { inset-inline-end: 16px; }
.lightbox__count { position: absolute; inset-block-end: 18px; color: #c9d4ea; font-size: .9rem; }

/* ---------- Content pages ---------- */
.content { padding-block: 2rem 3.5rem; }
.content__grid { display: grid; gap: 2rem; }
@media (min-width: 980px) { .content__grid--side { grid-template-columns: minmax(0, 1fr) 320px; } }
.prose { color: var(--ink-2); font-size: 1.04rem; }
.prose--lead { font-size: 1.12rem; }
.prose h2 { font-size: 1.4rem; margin-block: 2rem .75rem; color: var(--ink); }
.prose h3 { font-size: 1.15rem; margin-block: 1.5rem .5rem; color: var(--ink); }
.prose ul, .prose ol { padding-inline-start: 1.4rem; margin-block-end: 1em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-block-end: .35em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: 14px; }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-inline-start: 4px solid var(--brand); background: var(--bg); border-radius: 12px; }
.figure { margin: 1.5rem 0; }
.figure img { border-radius: 18px; }
.form-card { padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: var(--sh-1); }
.form-card .wpforms-container { margin: 0 !important; }
.form-card input[type="text"], .form-card input[type="email"], .form-card input[type="tel"], .form-card textarea, .form-card select { inline-size: 100% !important; max-inline-size: none !important; min-block-size: 50px; padding: .6rem .9rem !important; border: 1.5px solid var(--line) !important; border-radius: 12px !important; background: #fff !important; font: inherit !important; }
.form-card textarea { min-block-size: 140px; }
.form-card input:focus, .form-card textarea:focus { outline: none; border-color: var(--brand) !important; box-shadow: var(--focus) !important; }
.form-card button[type="submit"] { min-block-size: 50px; padding: .6rem 1.6rem !important; border: 0 !important; border-radius: 14px !important; background: var(--brand) !important; color: #fff !important; font: inherit !important; font-weight: 800 !important; cursor: pointer; }
.contact-cards { display: grid; gap: .75rem; }
.contact-card { display: flex; gap: .8rem; align-items: center; padding: 1rem; border-radius: 16px; border: 1px solid var(--line); background: #fff; color: var(--ink) !important; transition: border-color .2s, box-shadow .2s; }
a.contact-card:hover { border-color: var(--brand-100); box-shadow: var(--sh-1); }
.contact-card small { display: block; color: var(--muted); }
.contact-card b { display: block; }
.exam-guide { display: grid; gap: 1rem; }
@media (min-width: 760px) { .exam-guide { grid-template-columns: 1fr 1fr; } }
.guide-card { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; transition: box-shadow .25s, transform .25s var(--ease); }
.guide-card:hover { box-shadow: var(--sh-2); transform: translateY(-3px); }
.guide-card__media { aspect-ratio: 16 / 7; overflow: hidden; background: var(--bg); }
.guide-card__media img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.guide-card__body { display: grid; gap: .55rem; align-content: start; padding: 1.15rem; }
.guide-card__body p { margin: 0; color: var(--ink-2); }
.guide-card__links { display: flex; flex-wrap: wrap; gap: .5rem; margin-block-start: .3rem; }

/* Posts */
.post-list { display: grid; gap: 1rem; }
@media (min-width: 720px) { .post-list { grid-template-columns: 1fr 1fr; } }
.post-card { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.post-card h2 { font-size: 1.15rem; margin-block-end: .4rem; }
.post-card h2 a { color: var(--ink) !important; }
.article { max-inline-size: 760px; margin-inline: auto; }
.article__meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: var(--muted); font-size: .9rem; margin-block-start: .75rem; }
.progress { position: fixed; inset-inline: 0; inset-block-start: 0; z-index: 80; block-size: 3px; background: linear-gradient(90deg, var(--teal), var(--brand)); transform-origin: right; transform: scaleX(var(--p, 0)); }

/* 404 */
.notfound { display: grid; justify-items: center; gap: 1rem; text-align: center; padding-block: clamp(3rem, 2rem + 6vw, 7rem); }
.notfound__code { font-size: clamp(4rem, 3rem + 6vw, 8rem); font-weight: 800; line-height: 1; background: linear-gradient(135deg, var(--brand), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound .combo { inline-size: min(560px, 100%); text-align: start; }

/* ---------- Forms (contact, add/update center) ---------- */
.hp { position: absolute !important; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.form { display: grid; gap: 1.1rem; }
.form > .h3 { margin-block-end: .25rem; }
.form__title { font-size: 1.05rem; margin-block-start: .5rem; padding-block-start: 1rem; border-block-start: 1px solid var(--line); }
.fgrid { display: grid; gap: .9rem; }
@media (min-width: 640px) { .fgrid { grid-template-columns: 1fr 1fr; } .fld--wide { grid-column: 1 / -1; } }
.fld { display: grid; gap: .35rem; min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.fld > label, .fld > legend { font-weight: 800; font-size: .9rem; color: var(--ink-2); padding: 0; }
.fld > label b, .fld > legend b { color: var(--accent-btn); }
textarea.input { min-block-size: 120px; resize: vertical; line-height: 1.7; padding-block: .75rem; }
.input[aria-invalid="true"], .select select[aria-invalid="true"] { border-color: #c2412d; box-shadow: 0 0 0 3px rgba(194, 65, 45, .15); }
.fld__err { color: #b3361f; font-weight: 700; font-size: .85rem; min-block-size: 0; }
.fld__err:empty { display: none; }
.form-alert { margin: 0; padding: .75rem 1rem; border-radius: 12px; background: #fdecea; color: #8a2a17; font-weight: 700; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.form__foot small { flex: 1 1 220px; }
.form-done { display: grid; justify-items: start; gap: .6rem; padding: .5rem 0; animation: fadeUp .4s var(--ease-out); }
.form-done:focus { outline: none; box-shadow: none; }
.form-done__icon { display: grid; place-items: center; inline-size: 56px; block-size: 56px; border-radius: 18px; background: #e3f5ee; color: var(--ok); }
.form-done__icon .ico { inline-size: 28px; block-size: 28px; stroke-width: 2.4; }
.choice { display: grid; gap: .6rem; margin: 0; padding: 0; border: 0; }
@media (min-width: 560px) { .choice { grid-template-columns: 1fr 1fr; } }
.choice__opt { position: relative; cursor: pointer; }
.choice__opt input { position: absolute; opacity: 0; inset: 0; }
.choice__opt > span { display: grid; grid-template-columns: auto 1fr; gap: .1rem .7rem; align-items: center; block-size: 100%; padding: .9rem 1rem; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.choice__opt .ico { grid-row: span 2; inline-size: 40px; block-size: 40px; padding: 9px; border-radius: 12px; background: var(--bg); color: var(--muted); transition: background-color .2s, color .2s; }
.choice__opt b { font-weight: 800; }
.choice__opt small { color: var(--muted); font-size: .84rem; }
.choice__opt input:checked + span { border-color: var(--brand); background: var(--brand-50); box-shadow: var(--sh-1); }
.choice__opt input:checked + span .ico { background: var(--brand); color: #fff; }
.choice__opt input:focus-visible + span { box-shadow: var(--focus); }
.checkchips { display: flex; flex-wrap: wrap; gap: .45rem; }
.checkchips label { position: relative; cursor: pointer; }
.checkchips input { position: absolute; opacity: 0; inset: 0; }
.checkchips span { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .85rem; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--ink-2); transition: all .2s; }
.checkchips span::before { content: ""; inline-size: 14px; block-size: 14px; border-radius: 4px; border: 1.5px solid var(--line-2); transition: all .2s; }
.checkchips input:checked + span { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); }
.checkchips input:checked + span::before { background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/10px no-repeat; border-color: var(--brand); }
.checkchips input:focus-visible + span { box-shadow: var(--focus); }

/* ---------- Articles ---------- */
.article-layout { display: grid; gap: 2rem; }
@media (min-width: 1020px) { .article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; } }
.article-body { min-inline-size: 0; max-inline-size: 760px; }
.article-head { max-inline-size: 820px; }
.article-cover { margin: 0 0 1.5rem; }
.article-cover img { inline-size: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: 20px; }
.article-side { display: grid; gap: 1rem; align-content: start; }
@media (min-width: 1020px) { .article-side { position: sticky; inset-block-start: calc(var(--header-h) + 16px); } .toc--inline { display: none; } }
@media (max-width: 1019px) { .toc--side { display: none; } }
.toc { font-size: .93rem; }
.toc ol { display: grid; gap: .15rem; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: .55rem; padding: .35rem .5rem; border-radius: 9px; color: var(--ink-2); line-height: 1.5; transition: background-color .2s, color .2s; }
.toc a::before { content: counter(toc); flex: none; inline-size: 1.4em; color: var(--muted); font-weight: 800; }
.toc a:hover { background: var(--bg); color: var(--ink); }
.toc a.is-active { background: var(--brand-50); color: var(--brand-700); font-weight: 700; }
.toc a.is-active::before { color: var(--brand); }
.toc__title { display: flex; align-items: center; gap: .45rem; margin: 0 0 .6rem; font-weight: 800; }
.toc--inline { margin-block-end: 1.5rem; padding: .25rem .9rem .75rem; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.toc--inline > summary { display: flex; align-items: center; gap: .45rem; padding: .6rem 0; font-weight: 800; cursor: pointer; list-style: none; }
.toc--inline > summary::-webkit-details-marker { display: none; }
.prose h2 { scroll-margin-top: calc(var(--header-h) + 16px); }
.prose table { inline-size: 100%; border-collapse: collapse; margin-block: 1.25rem; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: .65rem .8rem; border: 1px solid var(--line); text-align: start; vertical-align: top; }
.prose thead th { background: var(--brand-50); color: var(--brand-700); font-weight: 800; }
.prose tbody tr:nth-child(even) td { background: var(--bg); }
.prose h3 { font-size: 1.08rem; }
.article-cta { margin-block-start: 2rem; }
.taglinks--light a { background: rgba(255, 255, 255, .14); color: #fff !important; }
.taglinks--light a:hover { background: rgba(255, 255, 255, .26); }
.article-cta .taglinks { margin-block-start: .75rem; }
.related-posts { margin-block-start: 3rem; }
.related-posts .h2 { margin-block-end: 1.25rem; }
.post-grid { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post-card { position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); }
.post-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg); }
.post-card__media img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.05); }
.post-card__body { display: grid; gap: .45rem; padding: 1rem 1.1rem 1.15rem; flex: 1; align-content: start; }
.post-card__cat { color: var(--brand); font-weight: 800; font-size: .82rem; }
.post-card__title { font-size: 1.08rem; line-height: 1.5; }
.post-card__title a { color: var(--ink) !important; }
.post-card__body p { margin: 0; color: var(--ink-2); font-size: .94rem; }
.post-card__meta { display: flex; align-items: center; gap: .35rem; margin-block-start: auto; padding-block-start: .4rem; color: var(--muted); font-size: .84rem; }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--navy); color: #b9c6dc; padding-block: 3.5rem 1.5rem; font-size: .94rem; }
.site-footer::before { content: ""; position: absolute; inset-inline-start: -200px; inset-block-start: -260px; inline-size: 560px; block-size: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(43, 92, 214, .35), transparent 65%); pointer-events: none; }
.site-footer a { color: #e2e9f5 !important; }
.site-footer a:hover { color: #fff !important; }
.footer-grid { position: relative; display: grid; gap: 2rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.footer-about img { inline-size: 170px; block-size: auto; margin-block-end: 1rem; }
.footer-about p { max-inline-size: 42ch; }
.footer-title { color: #fff; font-size: 1rem; margin-block-end: .9rem; }
.footer-links { display: grid; gap: .5rem; }
.footer-links a { display: inline-flex; gap: .4rem; align-items: center; transition: transform .2s var(--ease), color .2s; }
.footer-links a:hover { transform: translateX(-3px); }
.footer-contact { display: grid; gap: .5rem; margin-block-start: 1rem; }
.footer-contact li { display: flex; gap: .5rem; align-items: center; }
.footer-legal { position: relative; display: grid; gap: .3rem; margin-block-start: 2.5rem; padding-block-start: 1.25rem; border-block-start: 1px solid rgba(255, 255, 255, .1); color: #8d9bb4; font-size: .85rem; }
.footer-legal p { margin: 0; }

/* ---------- Floating UI ---------- */
.to-top { position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 45; inline-size: 48px; block-size: 48px; border-radius: 16px; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; box-shadow: var(--sh-3); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease-out); }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.toast { position: fixed; inset-block-end: 24px; inset-inline-start: 50%; z-index: 130; translate: 50% 0; display: inline-flex; gap: .5rem; align-items: center; padding: .7rem 1.1rem; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 700; box-shadow: var(--sh-3); opacity: 0; transform: translateY(20px); transition: opacity .25s, transform .3s var(--ease-out); pointer-events: none; }
.toast.is-visible { opacity: 1; transform: none; }
.toast .ico { color: #7ee2b0; }

.skeleton { border-radius: var(--r-lg); min-block-size: 300px; background: linear-gradient(100deg, var(--bg) 30%, #eaf0f8 50%, var(--bg) 70%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Scroll reveal (only once main.js has actually run: html.motion) ---------- */
.motion [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: var(--d, 0s); }
.motion [data-reveal].is-in { opacity: 1; transform: none; }

/* Page transitions where supported */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .motion [data-reveal] { opacity: 1; transform: none; }
    .blob, .scan__ring, .scan__line, .float-card { animation: none !important; }
}
@media print {
    .site-header, .site-footer, .stickybar, .filterbox, .c-intro__cta, .to-top, .toolbar { display: none !important; }
}

/* ---------- Small-screen fixes ---------- */
.prose, .card__title, .hub__title, .c-intro h1 { overflow-wrap: break-word; }
.btn { max-inline-size: 100%; }
@media (max-width: 560px) {
    /* Call button carries the number: give it its own full-width row so it never overflows. */
    .c-intro__cta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .c-intro__cta .btn { padding-inline: .8rem; }
    .c-intro__cta .btn--primary { grid-column: 1 / -1; flex-wrap: wrap; white-space: normal; row-gap: .1rem; }
    .c-intro__cta .btn:only-child, .c-intro__cta .btn--primary + .btn:last-child { grid-column: 1 / -1; }
    .sec-head .btn, .explorer__foot .btn { white-space: normal; }
    .cta-band__actions .btn { flex: 1 1 100%; }
}
@media (max-width: 420px) {
    /* Two narrow columns: stack name and count so every card has the same rhythm. */
    .gov__top { display: grid; gap: 0; }
}


/* ---------- Home hero v3: calm, search-first ---------- */
.hero--finder {
    min-block-size: min(760px, 100svh);
    background: #f7f9fe;
}
.hero--finder .hero__bg {
    background:
        radial-gradient(circle at 12% 18%, rgba(244, 122, 47, .11), transparent 28%),
        radial-gradient(circle at 86% 32%, rgba(43, 92, 214, .16), transparent 34%),
        linear-gradient(180deg, #f4f7ff 0%, #fbfcff 68%, #fff 100%);
    -webkit-mask-image: none;
    mask-image: none;
}
.hero--finder .hero__bg::before {
    background-image:
        linear-gradient(rgba(43, 92, 214, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(43, 92, 214, .045) 1px, transparent 1px);
    background-size: 52px 52px;
    opacity: .72;
    -webkit-mask-image: radial-gradient(ellipse 78% 72% at 50% 34%, #000 20%, transparent 76%);
    mask-image: radial-gradient(ellipse 78% 72% at 50% 34%, #000 20%, transparent 76%);
}
.hero--finder .blob--1 {
    inline-size: 420px;
    block-size: 420px;
    inset-block-start: -230px;
    inset-inline-end: -120px;
    opacity: .34;
}
.hero--finder .blob--2 {
    inline-size: 360px;
    block-size: 360px;
    inset-block-end: -200px;
    inset-inline-start: -80px;
    opacity: .3;
}
.hero--finder .blob--3 { display: none; }
.hero--finder .hero__inner {
    position: relative;
    z-index: 1;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
    padding-block: 3rem 3.75rem;
}
.hero--finder .hero__copy {
    max-inline-size: 620px;
}
.hero--finder .hero__eyebrow {
    gap: .55rem;
    margin-block-end: 1.15rem;
    padding: .45rem .85rem;
    border-color: rgba(43, 92, 214, .16);
    background: rgba(255, 255, 255, .74);
    box-shadow: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.hero--finder .hero__eyebrow .ico {
    inline-size: 18px;
    block-size: 18px;
    color: var(--brand);
}
.hero--finder .hero__title {
    max-inline-size: 12ch;
    font-size: clamp(2.35rem, 1.6rem + 3.4vw, 4.25rem);
    line-height: 1.14;
    letter-spacing: -.035em;
}
.hero--finder .hero__title .hl {
    display: inline-block;
    background: linear-gradient(90deg, #1f55d5 8%, #0e9aa7 92%);
    -webkit-background-clip: text;
    background-clip: text;
}
.hero--finder .hero__title .hl::after {
    inset-block-end: -.02em;
    block-size: .12em;
    opacity: .22;
}
.hero--finder .hero__lead {
    max-inline-size: 52ch;
    margin-block-start: 1.2rem;
    font-size: clamp(1rem, .93rem + .38vw, 1.2rem);
    line-height: 1.95;
}
.hero--finder .hero__lead strong {
    color: var(--ink);
    font-weight: 800;
}
.hero__benefits {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-block-start: 1.25rem;
}
.hero__benefits li {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-block-size: 36px;
    padding: .35rem .7rem;
    border: 1px solid rgba(43, 92, 214, .11);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: var(--ink-2);
    font-size: .86rem;
    font-weight: 700;
}
.hero__benefits .ico {
    inline-size: 16px;
    block-size: 16px;
    padding: 2px;
    border-radius: 50%;
    background: #def7eb;
    color: var(--ok);
    stroke-width: 2.5;
}

.hero__finder {
    position: relative;
    isolation: isolate;
    min-inline-size: 0;
    padding: 1.15rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 30px;
    background:
        radial-gradient(circle at 8% 0%, rgba(110, 231, 240, .18), transparent 30%),
        radial-gradient(circle at 96% 100%, rgba(82, 125, 232, .23), transparent 36%),
        linear-gradient(145deg, #102142 0%, #0a1730 76%);
    box-shadow: 0 28px 70px rgba(10, 23, 48, .22);
}
.hero__finder::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: 29px;
    background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}
.finder__top {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .3rem .3rem 1rem;
    color: #fff;
}
.finder__icon {
    display: grid;
    place-items: center;
    inline-size: 46px;
    block-size: 46px;
    flex: none;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 15px;
    background: rgba(255, 255, 255, .09);
    color: #8be4eb;
}
.finder__icon .ico { inline-size: 23px; block-size: 23px; }
.finder__kicker {
    margin: 0 0 .05rem;
    color: #9fb4d4;
    font-size: .76rem;
    font-weight: 700;
}
.finder__top h2 {
    color: #fff;
    font-size: 1.08rem;
}
.finder__live {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    margin-inline-start: auto;
    padding: .35rem .6rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: #d9e7fb;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}
.finder__live i {
    inline-size: 7px;
    block-size: 7px;
    border-radius: 50%;
    background: #44dfa1;
    box-shadow: 0 0 0 4px rgba(68, 223, 161, .14);
}
.hero__finder .search-panel {
    padding: .55rem;
    border-color: rgba(255, 255, 255, .48);
    border-radius: 22px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .22);
}
.hero__finder .tabs {
    border: 1px solid #e8edf5;
    background: #f3f6fb;
}
.hero__finder .tabpanel {
    padding-block-end: .7rem;
}
.hero__finder .combo input {
    min-block-size: 58px;
}
.hero__popular {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-inline-size: 0;
    padding: .85rem .25rem .75rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.hero__popular::-webkit-scrollbar { display: none; }
.hero__popular > span {
    color: #8fa5c6;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}
.hero__popular a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-block-size: 32px;
    padding: .25rem .58rem;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 999px;
    background: rgba(255, 255, 255, .065);
    color: #e8f0ff;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}
.hero__popular a:hover {
    border-color: rgba(139, 228, 235, .4);
    background: rgba(139, 228, 235, .1);
    color: #fff;
}
.hero__popular .ico { inline-size: 15px; block-size: 15px; color: #8be4eb; }
.hero__finder .hero__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 0;
    padding-block-start: .8rem;
    border-block-start: 1px solid rgba(255, 255, 255, .1);
}
.hero__finder .stat {
    position: relative;
    place-items: center;
    text-align: center;
}
.hero__finder .stat + .stat::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block: 18%;
    inline-size: 1px;
    background: rgba(255, 255, 255, .12);
}
.hero__finder .stat__n {
    color: #fff;
    font-size: 1.45rem;
}
.hero__finder .stat__l {
    color: #9fb4d4;
    font-size: .76rem;
}

@media (min-width: 1000px) {
    .hero--finder .hero__inner {
        grid-template-columns: minmax(0, .84fr) minmax(570px, 1.16fr);
        gap: clamp(2.5rem, 5vw, 5rem);
        padding-block: clamp(4.25rem, 7vh, 5.5rem) clamp(4.5rem, 8vh, 6rem);
    }
}
@media (max-width: 999px) {
    .hero--finder { min-block-size: auto; }
    .hero--finder .hero__copy { max-inline-size: 720px; }
    .hero--finder .hero__title { max-inline-size: 14ch; }
}
@media (max-width: 620px) {
    .hero--finder .hero__inner {
        gap: 1.65rem;
        padding-block: 2.1rem 3rem;
    }
    .hero--finder .hero__title {
        font-size: clamp(2.05rem, 8.8vw, 3rem);
    }
    .hero--finder .hero__lead { line-height: 1.8; }
    .hero__benefits { gap: .45rem; }
    .hero__benefits li { padding-inline: .58rem; font-size: .78rem; }
    .hero__finder {
        margin-inline: calc(var(--gutter) * -.25);
        padding: .75rem;
        border-radius: 24px;
    }
    .hero__finder::before { border-radius: 23px; }
    .finder__top { padding: .25rem .2rem .8rem; }
    .finder__icon { inline-size: 40px; block-size: 40px; border-radius: 13px; }
    .finder__top h2 { font-size: .98rem; }
    .finder__live { padding-inline: .48rem; font-size: .67rem; }
    .hero__finder .search-panel { border-radius: 18px; }
    .hero__popular { margin-inline: -.15rem; }
    .hero__finder .stat__n { font-size: 1.2rem; }
}
@media (max-width: 390px) {
    .finder__live { display: none; }
    .hero__benefits li:last-child { flex-basis: 100%; justify-content: center; }
}


/* Mobile polish - 2026-10-18 */
@media (max-width: 620px) {
    .hero--finder { overflow: clip; }
    .hero--finder .hero__inner { gap: 1.35rem; padding-block: 1.45rem 2.5rem; }
    .hero--finder .hero__copy { inline-size: 100%; text-align: center; }
    .hero--finder .hero__eyebrow { justify-content: center; max-inline-size: 100%; margin: 0 auto .85rem; padding: .32rem .68rem; font-size: .79rem; }
    .hero--finder .hero__eyebrow .ico { inline-size: 16px; block-size: 16px; flex: none; }
    .hero--finder .hero__title { max-inline-size: none; margin-inline: auto; font-size: clamp(2rem, 9.6vw, 2.7rem); line-height: 1.13; letter-spacing: -.025em; }
    .hero--finder .hero__title .hl { white-space: normal; }
    .hero--finder .hero__lead { max-inline-size: 38ch; margin: .85rem auto 0; font-size: .96rem; line-height: 1.78; }
    .hero__benefits { justify-content: center; gap: .4rem; margin-block-start: .9rem; }
    .hero__benefits li { min-block-size: 32px; padding: .28rem .55rem; font-size: .75rem; }
    .hero__finder { inline-size: 100%; margin-inline: 0; padding: .7rem; border-radius: 23px; }
    .hero__finder::before { border-radius: 22px; }
    .finder__top { min-inline-size: 0; gap: .58rem; padding: .2rem .15rem .72rem; }
    .finder__icon { inline-size: 38px; block-size: 38px; border-radius: 12px; }
    .finder__icon .ico { inline-size: 19px; block-size: 19px; }
    .finder__kicker { font-size: .69rem; }
    .finder__top h2 { font-size: .94rem; }
    .finder__live { display: none; }
    .hero__finder .search-panel { min-inline-size: 0; padding: .42rem; border-radius: 17px; }
    .hero__finder .tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row; grid-auto-columns: unset; gap: .12rem; padding: .22rem; border-radius: 14px; }
    .hero__finder .tab { min-inline-size: 0; min-block-size: 42px; padding-inline: .2rem; border-radius: 11px; }
    .hero__finder .tab span { overflow: hidden; font-size: clamp(.72rem, 3.35vw, .82rem); text-overflow: ellipsis; }
    .hero__finder .tabs__ink { inset-block: .22rem; border-radius: 11px; }
    .hero__finder .tabpanel { min-inline-size: 0; padding: .72rem .12rem .18rem; }
    .hero__finder .combo__field { min-inline-size: 0; }
    .hero__finder .combo input, .hero__finder .input, .hero__finder .select select { min-block-size: 50px; font-size: 16px; }
    .hero__finder .combo input { padding-inline-start: 2.35rem; padding-inline-end: 4.65rem; }
    .hero__finder .combo__field > .ico { inset-inline-start: 11px; inline-size: 19px; block-size: 19px; }
    .hero__finder .combo__submit { inset-inline-end: 5px; min-block-size: 40px; padding-inline: .72rem; }
    .hero__finder .combo__hint { margin-block-start: .45rem; font-size: .76rem; line-height: 1.5; }
    .hero__finder .sgrid { gap: .58rem; }
    .hero__finder .field > label { font-size: .8rem; }
    .hero__finder .sgrid__go, .hero__finder .sgrid__go .btn, .hero__finder .near-box .btn { inline-size: 100%; }
    .hero__finder .near-box { justify-items: stretch; text-align: center; }
    .hero__finder .near-box p { font-size: .9rem; line-height: 1.65; }
    .hero__popular { gap: .38rem; margin-inline: 0; padding: .72rem .05rem .62rem; scroll-snap-type: inline proximity; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
    .hero__popular > span, .hero__popular a { scroll-snap-align: start; }
    .hero__popular a { min-block-size: 30px; padding-inline: .5rem; font-size: .71rem; }
    .hero__finder .hero__stats { padding-block-start: .68rem; }
    .hero__finder .stat__n { font-size: 1.12rem; }
    .hero__finder .stat__l { font-size: .67rem; }
}
@media (max-width: 370px) {
    .hero--finder .hero__inner { padding-block-start: 1.15rem; }
    .hero--finder .hero__title { font-size: 1.9rem; }
    .hero__benefits li { font-size: .7rem; }
    .hero__finder { padding: .55rem; border-radius: 20px; }
    .hero__finder::before { border-radius: 19px; }
    .finder__icon { display: none; }
    .hero__finder .tab span { font-size: .7rem; }
    .hero__finder .combo__submit span { display: none; }
    .hero__finder .combo input { padding-inline-end: 3.25rem; }
}

/* ---------- Provider sections (radiology / labs / hospitals / clinics / health units) ---------- */
.type-tabs { margin-block: 1rem .25rem; }
.type-tabs ul { display: flex; gap: .5rem; overflow-x: auto; padding-block-end: .35rem; scrollbar-width: thin; }
.type-tabs a { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; padding: .5rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 700; font-size: .92rem; transition: border-color .2s, color .2s, background-color .2s; }
.type-tabs a .ico { inline-size: 18px; block-size: 18px; color: var(--brand); }
.type-tabs__n { color: var(--muted); font-weight: 600; font-size: .8rem; }
.type-tabs a:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.type-tabs a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.type-tabs a[aria-current="page"] .ico, .type-tabs a[aria-current="page"] .type-tabs__n { color: #fff; }
.badge--type { inset-block-start: 10px; inset-inline-end: 10px; background: rgba(255, 255, 255, .94); color: var(--ink); box-shadow: 0 1px 4px rgba(11, 22, 48, .12); }
.badge--type .ico { inline-size: 14px; block-size: 14px; color: var(--brand); }
.types-overview { display: grid; gap: 1rem; margin-block: 2rem; }
.types-overview .taglinks a span { color: var(--muted); font-weight: 600; font-size: .78rem; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
@media (max-width: 420px) { .type-tile { padding: .85rem; } .type-tile .tile__icon { inline-size: 40px; block-size: 40px; } .type-tile__name { font-size: .95rem; } }
.type-tile { display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem; border-radius: var(--radius, 16px); border: 1px solid var(--line); background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s, transform .2s; }
.type-tile:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(43, 92, 214, .12); transform: translateY(-2px); }
.type-tile .tile__icon { margin-block-end: .25rem; }
.type-tile__name { font-weight: 800; font-size: 1.05rem; }
.type-tile__n { color: var(--muted); font-weight: 600; font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .type-tile:hover { transform: none; } }
@media (min-width: 960px) { .sgrid--inline.sgrid--types { grid-template-columns: repeat(5, minmax(0, 1fr)) auto; } }
