/* ============================================================================
   Jiwark landing · styles.css
   Mobile-first and RTL-native. Spacing and positioning use logical properties
   (margin-inline-start, inset-inline-end, …) so the same file also works with dir="ltr".
   Naming: BEM-style blocks (.hero, .hero__title, .btn--primary).

   1. Fonts      2. Tokens      3. Base       4. Layout
   5. Components 6. Sections    7. Utilities  8. Motion
   ============================================================================ */

/* 1. Fonts ------------------------------------------------------------------
   Arabic: Almarai (Google Fonts). If "Almaria" referred to a different, licensed
   font, add it first in --font-sans. Tajawal stays in the stack as a fallback name
   only (it is not downloaded). Latin: Inter. Inter comes first in the stack: it has
   no Arabic letters, so the browser uses it for Latin text and digits and falls
   through to Almarai for every Arabic character.

   Self-hosted (public/site/fonts, Google Fonts files): only the subsets the site uses, Almarai
   for Arabic and Inter for Latin; the browser downloads a file only when the page has its characters.
*/

@font-face { font-family: "Almarai"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("fonts/almarai-arabic-400.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "Almarai"; font-style: normal; font-weight: 700; font-display: swap;
    src: url("fonts/almarai-arabic-700.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "Almarai"; font-style: normal; font-weight: 800; font-display: swap;
    src: url("fonts/almarai-arabic-800.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 800; font-display: swap;
    src: url("fonts/inter-latin-ext-var.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 800; font-display: swap;
    src: url("fonts/inter-latin-var.woff2") format("woff2");
    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; }

/* 2. Tokens ----------------------------------------------------------------- */
:root {
    /* Brand */
    --c-primary: #C62828;       /* white text on it: 5.6:1 */
    --c-primary-600: #B71C1C;
    --c-primary-700: #8E1616;
    --c-primary-100: #FFCDD2;
    --c-primary-50: #FFEBEE;
    --c-accent: #1976D2;        /* white text on it: 4.6:1 */
    --c-accent-700: #1565C0;    /* use for text on --c-accent-50 */
    --c-accent-100: #BBDEFB;
    --c-accent-50: #E3F2FD;

    /* Neutrals */
    --c-bg: #FFFFFF;
    --c-surface: #F5F5F5;
    --c-text: #212121;
    --c-muted: #555555;         /* 7.4:1 on white, 6.8:1 on --c-surface */
    --c-border: #E0E0E0;
    --c-field: #8A8A8A;         /* form control borders: 3.4:1 against white (WCAG 1.4.11) */

    /* Status (paired text colour + tint, all AA) */
    --c-ok: #2E7D32;
    --c-ok-700: #1B5E20;
    --c-ok-50: #E8F5E9;
    --c-low: #EF8F00;
    --c-low-700: #8A4B00;
    --c-low-50: #FFF3E0;

    /* Type */
    --font-sans: "Inter", "Almarai", "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;

    /* Shape & depth */
    --r-sm: 8px;
    --r: 12px;
    --r-lg: 20px;
    --r-pill: 999px;
    --shadow-sm: 0 1px 2px rgb(33 33 33 / .05), 0 1px 3px rgb(33 33 33 / .07);
    --shadow: 0 6px 20px rgb(33 33 33 / .08);
    --shadow-lg: 0 20px 48px -12px rgb(33 33 33 / .18);

    /* Layout */
    --container: 1200px;
    --gutter: 16px;
    --header-h: 68px;

    /* Stacking scale */
    --z-header: 20;
    --z-nav: 30;
    --z-skip: 100;
}

@media (min-width: 640px) {
    :root { --gutter: 24px; }
}

/* 3. Base ------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 16px); /* anchors land below the sticky header */
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;              /* never below 16px on mobile */
    line-height: 1.7;             /* Arabic needs generous leading */
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
h1, h2, h3 { text-wrap: balance; } /* no lone word on the last line of a heading */
ul[class], ol[class] { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-primary); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
    outline: 3px solid var(--c-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Note: never add letter-spacing to Arabic text; it breaks the joins between letters. */

/* 4. Layout ----------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section { padding-block: 64px; }
.section--tight { padding-block: 48px; }
.section--muted { background: var(--c-surface); }

.section__head { max-width: 720px; margin-block-end: 32px; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .section__lead { margin-inline: auto; }
.section__head--split { display: grid; gap: 20px; max-width: none; }

.section__title {
    margin-block-start: 8px;
    font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem);
    font-weight: 800;
    line-height: 1.35;
}

.section__lead {
    max-width: 62ch;
    margin-block-start: 12px;
    font-size: 1.0625rem;
    color: var(--c-muted);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .9375rem;
    font-weight: 700;
    color: var(--c-primary);
}

.subhead {
    margin-block-end: 16px;
    font-size: 1.25rem;
    font-weight: 800;
}

@media (min-width: 768px) {
    .section__head--split { grid-template-columns: 1fr auto; align-items: end; }
}

@media (min-width: 1024px) {
    .section { padding-block: 96px; }
    .section--tight { padding-block: 64px; }
    .section__head { margin-block-end: 44px; }
}

/* 5. Components --------------------------------------------------------------- */

/* Icons (inline SVG sprite) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.icon--solid { fill: currentColor; stroke: none; }
[dir="ltr"] .icon--dir { transform: scaleX(-1); } /* arrows point "forward" in either direction */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 22px;
    border: 2px solid transparent;
    border-radius: var(--r);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn .icon { width: 1.15em; height: 1.15em; }

.btn--primary {
    background: var(--c-primary);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgb(198 40 40 / .6);
}
.btn--primary:hover { background: var(--c-primary-600); }
.btn--primary:active { background: var(--c-primary-700); }

.btn--secondary { background: var(--c-accent); color: #fff; }
.btn--secondary:hover { background: var(--c-accent-700); }

.btn--outline { background: #fff; border-color: var(--c-primary); color: var(--c-primary); }
.btn--outline:hover { background: var(--c-primary-50); }

.btn--light { background: #fff; color: var(--c-primary); }
.btn--light:hover { background: var(--c-primary-50); }

.btn--sm { min-height: 44px; padding: 8px 16px; font-size: .9375rem; }
.btn--lg { min-height: 56px; padding-inline: 28px; font-size: 1.0625rem; }
.btn--block { width: 100%; }

.btn:disabled,
.btn[aria-busy="true"] { cursor: progress; opacity: .85; }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 28px; }

.spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgb(255 255 255 / .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

/* Cards */
.card {
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.card--interactive {
    position: relative;
    cursor: pointer;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card--interactive:hover {
    border-color: var(--c-primary-100);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}
.card--interactive:has(.stretched-link:focus-visible) {
    outline: 3px solid var(--c-accent);
    outline-offset: 2px;
}

/* Makes the whole card clickable through its one link. */
.stretched-link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    margin-block-start: 8px;
    font-weight: 700;
    color: var(--c-primary);
    text-decoration: none;
}
.link-arrow:hover { text-decoration: underline; text-underline-offset: 5px; }
.link-arrow .icon { width: 1em; height: 1em; }

/* Status badges: always icon + word, never colour alone */
.status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    font-size: .8125rem;
    font-weight: 700;
    line-height: 1.5;
}
.status .icon { width: 1em; height: 1em; }
.status--ok { background: var(--c-ok-50); color: var(--c-ok-700); }
.status--low { background: var(--c-low-50); color: var(--c-low-700); }
.status--critical { background: var(--c-primary-50); color: var(--c-primary-600); }

/* Level bars (decorative; the percentage is always written next to them) */
.bar {
    height: 8px;
    overflow: hidden;
    border-radius: var(--r-pill);
    background: #EEEEEE;
}
.bar__fill {
    display: block;
    width: var(--level, 0%);
    height: 100%;
    border-radius: inherit;
    background: var(--c-ok);
}
.bar__fill--low { background: var(--c-low); }
.bar__fill--critical { background: var(--c-primary); }

/* Blood type chips */
.blood-chip {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: var(--r);
    background: var(--c-primary-50);
    color: var(--c-primary-600);
    font-weight: 800;
}
.blood-chip--low { background: var(--c-low-50); color: var(--c-low-700); }
.blood-chip--ok { background: var(--c-ok-50); color: var(--c-ok-700); }

/* Pulsing "urgent" pill */
.alert-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    border: 1px solid var(--c-primary-100);
    border-radius: var(--r-pill);
    background: var(--c-primary-50);
    color: var(--c-primary-600);
    font-size: .9375rem;
    font-weight: 700;
}
.alert-pill__dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--c-primary);
    animation: pulse 2s ease-out infinite;
}

/* Forms */
.form { display: grid; gap: 18px; }
.form__row { display: grid; gap: 18px; }

.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
fieldset.field { min-inline-size: 0; margin: 0; padding: 0; border: 0; }

.field__label { padding: 0; font-size: .9375rem; font-weight: 700; }
.field__req { margin-inline-start: 2px; color: var(--c-primary); }
.field__optional { font-weight: 400; color: var(--c-muted); }
.field__hint { font-size: .8125rem; color: var(--c-muted); }

.field__input {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1.5px solid var(--c-field);
    border-radius: var(--r);
    background: #fff;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.field__input::placeholder { color: #757575; opacity: 1; }
.field__input:hover { border-color: #616161; }
.field__input:focus-visible {
    outline: none;
    border-color: var(--c-accent);
    box-shadow: 0 0 0 4px rgb(25 118 210 / .2);
}
[dir="rtl"] .field__input[dir="ltr"] { text-align: right; } /* phone and e-mail line up with the Arabic fields */
textarea.field__input { min-height: 112px; resize: vertical; }

select.field__input {
    appearance: none;
    padding-inline-end: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 18px;
    background-position: left 14px center;
    cursor: pointer;
}
[dir="ltr"] select.field__input { background-position: right 14px center; }

.field.is-invalid .field__input { border-color: var(--c-primary); background-color: #FFFBFB; }
.field.is-invalid .field__input:focus-visible { box-shadow: 0 0 0 4px rgb(198 40 40 / .18); }
.field.is-valid .field__input { border-color: var(--c-ok); }

.field__error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: .875rem;
    font-weight: 700;
    color: var(--c-primary-600);
}
.field__error:empty { display: none; }
.field__error::before {
    content: "";
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-block-start: 3px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

.form__success {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--r);
    background: var(--c-ok-50);
    color: var(--c-ok-700);
    font-weight: 700;
}

@media (min-width: 640px) {
    .form__row { grid-template-columns: 1fr 1fr; }
}

/* Honeypot field: off-screen for people, still in the form for bots */
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Language switch (in the menu) */
.lang-switch {
    display: inline-flex;
    padding: 4px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-pill);
    background: #fff;
    font-size: .875rem;
    font-weight: 700;
}
.lang-switch__link {
    display: grid;
    place-items: center;
    min-height: 36px;
    padding-inline: 14px;
    border-radius: var(--r-pill);
    color: var(--c-muted);
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.lang-switch__link:hover { color: var(--c-text); }
.lang-switch__link[aria-current="true"] { background: var(--c-primary); color: #fff; }
.lang-switch__short { display: none; }

@media (min-width: 1024px) and (max-width: 1535px) {
    /* Compact on laptops so the menu fits on one line; the full name stays for screen readers. */
    .lang-switch__full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .lang-switch__short { display: inline; }
    .lang-switch__link { padding-inline: 10px; }
}

/* "Nothing to show" line, e.g. no emergency requests */
.empty-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    border: 1px dashed var(--c-ok);
    border-radius: var(--r-lg);
    background: var(--c-ok-50);
    color: var(--c-ok-700);
    font-weight: 700;
}

/* 6. Sections ----------------------------------------------------------------- */

/* Skip link */
.skip-link {
    position: absolute;
    inset-inline-start: 16px;
    top: -100px;
    z-index: var(--z-skip);
    padding: 10px 16px;
    border-radius: var(--r);
    background: #fff;
    color: var(--c-text);
    font-weight: 700;
    box-shadow: var(--shadow);
}
.skip-link:focus { top: 16px; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    border-block-end: 1px solid transparent;
    background: rgb(255 255 255 / .94);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-color: var(--c-border); box-shadow: 0 2px 14px rgb(0 0 0 / .06); }

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--c-text);
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
}
.brand__logo {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 4px 8px rgb(198 40 40 / .25));
}
.brand--light { color: #fff; }

.site-header__actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }

.nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--c-border);
    border-radius: var(--r);
    background: #fff;
    cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle__close,
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }
html:not(.js) .nav-toggle { display: none; }

/* Mobile menu: a panel under the header (JS on), or a plain wrapped row (JS off). */
.nav { order: 3; width: 100%; }
.nav__list { display: flex; flex-wrap: wrap; gap: 2px; }
.nav__link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 12px;
    border-radius: 10px;
    color: var(--c-text);
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.nav__link:hover { background: var(--c-surface); color: var(--c-primary); }
.nav__link[aria-current="true"] { background: var(--c-primary-50); color: var(--c-primary-600); }

.js .nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    z-index: var(--z-nav);
    display: none;
    padding: 8px var(--gutter) 16px;
    border-block-end: 1px solid var(--c-border);
    background: #fff;
    box-shadow: var(--shadow);
}
.js .nav.is-open { display: block; }
.nav__extras {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-block-start: 8px;
    padding-block-start: 12px;
    border-block-start: 1px solid var(--c-border);
}
.nav__link .icon { width: 1.1em; height: 1.1em; margin-inline-end: 6px; }
.js .nav__list { flex-direction: column; }
.js .nav__link { min-height: 48px; }

/* "More" exists only on wide screens, and only when some links do not fit (site/script.js). */
.nav__more { display: none; }

@media (max-width: 359px) {
    .site-header .btn--sm .icon { display: none; }
    .brand { font-size: 1.125rem; }
}

@media (min-width: 1024px) {
    .site-header__inner { flex-wrap: nowrap; gap: 24px; }
    .nav,
    .js .nav {
        position: static;
        order: 0;
        display: block;
        flex: 1;
        width: auto;
        padding: 0;
        border: 0;
        background: none;
        box-shadow: none;
    }
    .nav,
    .js .nav { display: flex; align-items: center; gap: 12px; }
    .nav__list,
    .js .nav__list { flex: 1; flex-direction: row; justify-content: center; gap: 4px; }
    .nav__extras { flex-wrap: nowrap; margin: 0; padding: 0; border: 0; }
    .nav__link,
    .js .nav__link { min-height: 44px; padding-inline: 14px; }
    .nav-toggle { display: none; }
    .site-header__actions { margin-inline-start: 0; }

    /* One line on laptops and desktops: links never wrap; the ones that do not fit go into "More". */
    .site-header__inner { gap: 20px; }
    .brand,
    .nav__extras,
    .site-header__actions { flex-shrink: 0; }
    .nav,
    .js .nav { min-width: 0; }
    .js .nav__list { min-width: 0; flex-wrap: nowrap; gap: 2px; }
    .nav__link,
    .js .nav__link { padding-inline: 10px; font-size: .9375rem; white-space: nowrap; }

    .nav__more:not([hidden]) { position: relative; display: block; flex-shrink: 0; }
    .nav__more-btn {
        gap: 4px;
        border: 0;
        background: none;
        font: inherit;
        font-weight: 700;
        cursor: pointer;
    }
    .nav__more-btn .nav__chevron { width: 16px; height: 16px; margin: 0; transition: transform .2s ease; }
    .nav__more-btn[aria-expanded="true"] .nav__chevron { transform: rotate(180deg); }
    .nav__more-btn[aria-expanded="true"],
    .nav__more:has([aria-current]) .nav__more-btn { background: var(--c-primary-50); color: var(--c-primary-600); }
    .nav__more-list {
        position: absolute;
        top: calc(100% + 10px);
        inset-inline-end: 0;
        z-index: var(--z-nav);
        display: grid;
        gap: 2px;
        min-width: 220px;
        padding: 6px;
        border: 1px solid var(--c-border);
        border-radius: var(--r);
        background: #fff;
        box-shadow: var(--shadow-lg);
        animation: nav-more-in .16s ease-out;
    }
    .nav__more-list[hidden] { display: none; }
    .nav__more-list .nav__link { width: 100%; }
}

@keyframes nav-more-in { from { opacity: 0; transform: translateY(-4px); } }

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    padding-block: 40px 56px;
    background:
        radial-gradient(900px 420px at 100% 0%, var(--c-primary-50), transparent 65%),
        linear-gradient(180deg, #fff 0%, var(--c-surface) 100%);
}
.hero__grid { display: grid; gap: 40px; align-items: center; }

.hero__title {
    margin-block-start: 20px;
    font-size: clamp(2rem, 1.3rem + 3.2vw, 3.375rem);
    font-weight: 800;
    line-height: 1.25;
}
.hero__accent { color: var(--c-primary); }

.hero__lead {
    max-width: 56ch;
    margin-block-start: 16px;
    font-size: 1.125rem;
    color: var(--c-muted);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 28px; }

.hero__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-block-start: 36px;
    padding-block-start: 24px;
    border-block-start: 1px solid var(--c-border);
}
.stat { display: flex; flex-direction: column-reverse; gap: 2px; }
.stat dt { font-size: .875rem; color: var(--c-muted); }
.stat dd { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }

.hero__visual { position: relative; }

.panel {
    position: relative;
    padding: 22px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    background: #fff;
    box-shadow: var(--shadow-lg);
}
.panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.panel__title { font-size: 1.125rem; font-weight: 800; }
.panel__updated { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--c-muted); }
.panel__updated .icon { width: 1em; height: 1em; }

.need-list { display: grid; gap: 16px; margin-block-start: 20px; }
.need { display: flex; align-items: center; gap: 14px; }
.need__body { flex: 1; min-width: 0; }
.need__row { display: flex; justify-content: space-between; margin-block-end: 6px; font-size: .875rem; font-weight: 700; }

.hero__float {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-block-start: 16px;
    padding: 12px 16px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    background: #fff;
    box-shadow: var(--shadow);
    font-weight: 800;
}
.hero__float-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--r);
    background: var(--c-accent-50);
    color: var(--c-accent-700);
}
.hero__float-label { display: block; font-size: .8125rem; font-weight: 400; color: var(--c-muted); }

@media (min-width: 768px) {
    .stat dd { font-size: 1.875rem; }
}

@media (min-width: 960px) {
    .hero { padding-block: 72px 104px; }
    .hero__grid { grid-template-columns: 1.15fr .85fr; gap: 64px; }
    .panel { padding: 28px; }
    .hero__float {
        position: absolute;
        inset-inline-end: -12px;    /* stays inside the 24px gutter at every width */
        bottom: -36px;
        margin: 0;
    }
}

@media (min-width: 1280px) {
    .hero__float { inset-inline-end: -28px; }
}

/* Features */
.feature-grid { display: grid; gap: 16px; }
.feature { height: 100%; }
.feature__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--c-primary-50);
    color: var(--c-primary);
}
.feature__icon .icon { width: 26px; height: 26px; }
.feature__icon--blue { background: var(--c-accent-50); color: var(--c-accent-700); }
.feature__title { margin-block-start: 18px; font-size: 1.125rem; font-weight: 800; }
.feature__text { margin-block-start: 8px; font-size: .9375rem; color: var(--c-muted); }

@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feature-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

/* Blood stock */
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .875rem; color: var(--c-muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend__swatch { width: 12px; height: 12px; border-radius: 4px; }
.legend__swatch--ok { background: var(--c-ok); }
.legend__swatch--low { background: var(--c-low); }
.legend__swatch--critical { background: var(--c-primary); }

.stock-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stock {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--c-border);
    border-block-start: 4px solid var(--c-ok);
    border-radius: var(--r-lg);
    background: #fff;
}
.stock--low { border-block-start-color: var(--c-low); }
.stock--critical { border-block-start-color: var(--c-primary); }
.stock__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.stock__type { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.stock__meta { font-size: .8125rem; color: var(--c-muted); }

@media (min-width: 768px) { .stock-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

/* Emergency requests */
.eyebrow--alert { color: var(--c-primary-600); }

.request-grid { display: grid; gap: 16px; }
.request {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
    border-inline-start: 4px solid var(--c-low);
}
.request--critical { border-inline-start-color: var(--c-primary); }
.request__head { display: flex; align-items: flex-start; gap: 14px; }
.request__title { margin-block-start: 8px; font-size: 1.125rem; font-weight: 800; line-height: 1.45; }

.drop-badge {
    position: relative;
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 56px;
    height: 64px;
    color: var(--c-primary);
}
.drop-badge .icon { position: absolute; inset: 0; width: 100%; height: 100%; }
.drop-badge span { position: relative; margin-block-start: 14px; font-size: .9375rem; font-weight: 800; color: #fff; }

.request__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    padding: 16px;
    border-radius: var(--r);
    background: var(--c-surface);
    font-size: .9375rem;
}
.request__meta dt { font-size: .8125rem; color: var(--c-muted); }
.request__meta dd { font-weight: 700; }

.request__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-block-start: auto;
}
.request__time { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; color: var(--c-muted); }
.request__time .icon { width: 1em; height: 1em; }

@media (min-width: 768px) { .request-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .request-grid { grid-template-columns: repeat(3, 1fr); } }

/* About + steps */
.about { display: grid; gap: 40px; }

.trust-list { display: grid; gap: 14px; margin-block-start: 28px; }
.trust-list li { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.trust-list__icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--r);
    background: var(--c-accent-50);
    color: var(--c-accent-700);
}

.steps { display: grid; gap: 12px; counter-reset: step; }
.step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    background: #fff;
    counter-increment: step;
}
.step::before {
    content: counter(step);
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--c-primary);
    color: #fff;
    font-size: 1.125rem;
    font-weight: 800;
}
.step__title { font-size: 1.0625rem; font-weight: 800; }
.step__text { margin-block-start: 4px; font-size: .9375rem; color: var(--c-muted); }

@media (min-width: 1024px) {
    .about { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
}

/* Donate */
.donate { display: grid; gap: 32px; }

.checklist { display: grid; gap: 12px; margin-block-start: 24px; }
.checklist li { display: flex; align-items: flex-start; gap: 12px; font-weight: 700; }
.checklist__icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--c-ok-50);
    color: var(--c-ok);
}
.checklist__icon .icon { width: 16px; height: 16px; stroke-width: 3; }

.info-card {
    padding: 24px;
    border: 1px solid var(--c-accent-100);
    border-radius: var(--r-lg);
    background: var(--c-accent-50);
}
.info-card__title { display: flex; align-items: center; gap: 10px; font-size: 1.125rem; font-weight: 800; color: var(--c-accent-700); }
.info-card__list { display: grid; gap: 10px; margin-block-start: 16px; }
.info-card__list li { position: relative; padding-inline-start: 20px; }
.info-card__list li::before {
    content: "";
    position: absolute;
    inset-inline-start: 2px;
    top: .7em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c-accent);
}
.info-card__note {
    margin-block-start: 18px;
    padding-block-start: 16px;
    border-block-start: 1px solid var(--c-accent-100);
    font-size: .9375rem;
    font-weight: 700;
    color: var(--c-accent-700);
}

@media (min-width: 1024px) {
    .donate { grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: center; }
    .info-card { padding: 32px; }
}

/* Request blood band */
.cta-band {
    position: relative;
    display: grid;
    gap: 28px;
    overflow: hidden;
    padding: 32px 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-700) 100%);
    color: #fff;
}
.cta-band::after { /* decorative drop */
    content: "";
    position: absolute;
    inset-inline-start: -60px;
    bottom: -90px;
    width: 280px;
    height: 280px;
    background: rgb(255 255 255 / .07);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6c-.3 0-.6.2-.8.4-3.4 4.3-6.2 7.4-6.2 11.1a7 7 0 0 0 14 0c0-3.7-2.8-6.8-6.2-11.1a1 1 0 0 0-.8-.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6c-.3 0-.6.2-.8.4-3.4 4.3-6.2 7.4-6.2 11.1a7 7 0 0 0 14 0c0-3.7-2.8-6.8-6.2-11.1a1 1 0 0 0-.8-.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band__title { font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem); font-weight: 800; line-height: 1.3; }
.cta-band__text { max-width: 54ch; margin-block-start: 10px; font-size: 1.0625rem; color: rgb(255 255 255 / .92); }

.cta-band__steps { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 22px; counter-reset: band; }
.cta-band__steps li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 10px;
    border-radius: var(--r-pill);
    background: rgb(255 255 255 / .14);
    font-size: .9375rem;
    font-weight: 700;
    counter-increment: band;
}
.cta-band__steps li::before {
    content: counter(band);
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    color: var(--c-primary);
    font-size: .8125rem;
}

.cta-band__aside { display: grid; gap: 14px; }

.hotline {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgb(255 255 255 / .28);
    border-radius: var(--r-lg);
    color: #fff;
    text-decoration: none;
    transition: background-color .2s ease;
}
.hotline:hover { background: rgb(255 255 255 / .1); }
.hotline__icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: var(--c-primary);
}
.hotline__label { display: block; font-size: .875rem; color: rgb(255 255 255 / .9); }
.hotline__number { font-size: 1.25rem; font-weight: 800; }
.hotline:focus-visible { outline-color: #fff; }

@media (min-width: 1024px) {
    .cta-band { grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; padding: 52px 56px; }
}

/* Success stories */
.story-grid { display: grid; gap: 16px; }
.story { display: flex; flex-direction: column; gap: 22px; height: 100%; }
.story__quote { position: relative; padding-block-start: 30px; font-size: 1.0625rem; line-height: 1.85; }
.story__quote::before {
    content: "”";
    position: absolute;
    inset-inline-start: 0;
    top: -14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 4rem;
    line-height: 1;
    color: var(--c-primary-100);
}
.story__person { display: flex; align-items: center; gap: 12px; margin-block-start: auto; }
.story__name { display: block; font-weight: 800; }
.story__role { display: block; font-size: .875rem; color: var(--c-muted); }

.avatar {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--c-primary-50);
    color: var(--c-primary-600);
    font-size: 1.125rem;
    font-weight: 800;
}
.avatar--blue { background: var(--c-accent-50); color: var(--c-accent-700); }
.avatar--green { background: var(--c-ok-50); color: var(--c-ok-700); }

@media (min-width: 900px) { .story-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

/* Contact */
.contact { display: grid; gap: 32px; }
.contact-list { display: grid; gap: 12px; margin-block-start: 28px; }
.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    background: #fff;
}
.contact-item__icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--r);
    background: var(--c-accent-50);
    color: var(--c-accent-700);
}
.contact-item__label { display: block; font-size: .8125rem; color: var(--c-muted); }
.contact-item__value { font-weight: 800; color: var(--c-text); text-decoration: none; }
a.contact-item__value { display: inline-flex; align-items: center; min-height: 44px; margin-block: -10px; } /* full touch target, same visual rhythm */
a.contact-item__value:hover { color: var(--c-primary); text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 1024px) {
    .contact { grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
    .contact--single { grid-template-columns: 1fr; }
    .contact--single .contact-list { grid-template-columns: repeat(2, 1fr); }
    .contact__form { padding: 32px; }
}

/* Internal pages */
.preview-bar { background: #FFF8E1; border-block-end: 1px solid #FFE082; color: #6D4C00; font-weight: 700; font-size: .9375rem; }
.preview-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 52px; }
.preview-bar__inner span { display: inline-flex; align-items: center; gap: 8px; }
.preview-bar a { color: #6D4C00; }

.page { padding-block-end: 72px; }
.page__container { max-width: 820px; }
.page__head {
    margin-block-end: 40px;
    padding-block: 40px 36px;
    border-block-end: 1px solid var(--c-border);
    background: linear-gradient(180deg, #fff 0%, var(--c-surface) 100%);
}
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .875rem; color: var(--c-muted); }
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-primary); }
.page__title { margin-block-start: 12px; font-size: clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem); font-weight: 800; line-height: 1.3; }
.page__summary { max-width: 62ch; margin-block-start: 10px; font-size: 1.125rem; color: var(--c-muted); }
.page__meta { margin-block-start: 14px; font-size: .875rem; color: var(--c-muted); }

/* Rendered Markdown */
.prose { font-size: 1.0625rem; line-height: 1.9; }
.prose > * + * { margin-block-start: 1em; }
.prose h2 { margin-block-start: 1.8em; font-size: 1.5rem; font-weight: 800; line-height: 1.4; }
.prose h3 { margin-block-start: 1.5em; font-size: 1.25rem; font-weight: 800; line-height: 1.4; }
.prose h2 + *, .prose h3 + * { margin-block-start: .6em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li + li { margin-block-start: .4em; }
.prose li::marker { color: var(--c-primary); }
.prose a { color: var(--c-accent-700); text-underline-offset: 4px; }
.prose a:hover { color: var(--c-primary); }
.prose strong { font-weight: 800; }
.prose blockquote {
    padding: 12px 18px;
    border-inline-start: 4px solid var(--c-primary-100);
    border-radius: var(--r-sm);
    background: var(--c-surface);
    color: var(--c-muted);
}
.prose hr { border: 0; border-block-start: 1px solid var(--c-border); margin-block: 2em; }
.prose code { padding: 2px 6px; border-radius: 6px; background: var(--c-surface); font-size: .9em; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--c-border); text-align: start; }
.prose th { background: var(--c-surface); font-weight: 800; }
.prose img { border-radius: var(--r); }

@media (min-width: 1024px) {
    .page__head { padding-block: 56px 48px; }
}

/* Footer */
.site-footer { background: #1C1C1C; color: #E0E0E0; }
.footer-grid { display: grid; gap: 36px; padding-block: 56px 36px; }
.footer__about p { max-width: 38ch; margin-block-start: 14px; color: #BDBDBD; }
.footer__title { margin-block-end: 12px; font-size: 1rem; font-weight: 800; color: #fff; }

.footer__links a,
.footer__contact a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #E0E0E0;
    text-decoration: none;
    transition: color .2s ease;
}
.footer__links a:hover,
.footer__contact a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

.footer__contact li { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.footer__contact .icon { color: #EF9A9A; }

.social { display: flex; gap: 8px; margin-block-start: 20px; }
.social a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgb(255 255 255 / .2);
    border-radius: var(--r);
    color: #fff;
    transition: background-color .2s ease, border-color .2s ease;
}
.social a:hover { border-color: var(--c-primary); background: var(--c-primary); }

.site-footer :focus-visible { outline-color: #90CAF9; }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    padding-block: 20px;
    border-block-start: 1px solid rgb(255 255 255 / .12);
    font-size: .875rem;
    color: #BDBDBD;
}
.footer-bottom a { color: #E0E0E0; }

@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 48px; padding-block: 72px 48px; } }

/* 7. Utilities ---------------------------------------------------------------- */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* 8. Motion ------------------------------------------------------------------- */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgb(198 40 40 / .55); }
    70% { box-shadow: 0 0 0 10px rgb(198 40 40 / 0); }
    100% { box-shadow: 0 0 0 0 rgb(198 40 40 / 0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Blog: /blog and /blog/{slug} ---------------------------------------------------
   Editorial layout: a soft hero, the newest post large, then an even grid of cards.
   The post page reads in one centred 720 px column under a wide cover. */

/* Heroes (list and post): warm gradient with a fine dot grid that fades out */
.blog-hero,
.post-hero {
    position: relative;
    overflow: hidden;
    border-block-end: 1px solid var(--c-border);
    background:
        radial-gradient(720px 340px at 100% 0%, rgb(198 40 40 / .10), transparent 70%),
        radial-gradient(560px 280px at 0% 100%, rgb(25 118 210 / .06), transparent 70%),
        linear-gradient(180deg, #fff 0%, var(--c-surface) 100%);
}
.blog-hero::before,
.post-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgb(198 40 40 / .16) 1px, transparent 1.4px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
    pointer-events: none;
}
.blog-hero > .container,
.post-hero > .container { position: relative; }

.blog-hero { padding-block-start: 36px; }
.blog-hero__row { display: grid; gap: 20px; align-items: end; margin-block-start: 24px; }
.blog-hero__title {
    margin-block-start: 10px;
    font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
}
.blog-hero__sub { max-width: 58ch; margin-block-start: 14px; font-size: 1.125rem; line-height: 1.8; color: var(--c-muted); }
.blog-hero__count {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    width: fit-content;
    padding: 10px 20px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-pill);
    background: rgb(255 255 255 / .85);
    box-shadow: var(--shadow-sm);
    color: var(--c-muted);
    font-weight: 700;
}
.blog-hero__count strong { color: var(--c-primary); font-size: 1.5rem; font-weight: 800; line-height: 1; }

@media (min-width: 768px) {
    .blog-hero__row { grid-template-columns: minmax(0, 1fr) auto; }
}

/* Category filter: one scrollable row of pills on phones, wrapping on desktop */
.blog-filter { margin-block-start: 28px; margin-inline: calc(var(--gutter) * -1); }
.blog-filter__track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px var(--gutter) 24px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.blog-filter__track::-webkit-scrollbar { display: none; }
.blog-filter__item {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding-block: 6px;
    padding-inline: 18px 7px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-pill);
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--c-text);
    font-size: .9375rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    scroll-snap-align: start;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.blog-filter__item:hover { border-color: var(--c-primary-100); color: var(--c-primary-600); }
.blog-filter__count {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding-inline: 8px;
    border-radius: var(--r-pill);
    background: var(--c-surface);
    color: var(--c-muted);
    font-size: .8125rem;
    font-weight: 800;
}
.blog-filter__item[aria-current="page"] {
    border-color: var(--c-primary);
    background: var(--c-primary);
    box-shadow: 0 10px 20px -12px rgb(198 40 40 / .9);
    color: #fff;
}
.blog-filter__item[aria-current="page"] .blog-filter__count { background: rgb(255 255 255 / .22); color: #fff; }

@media (min-width: 1024px) {
    .blog-filter { margin-inline: 0; }
    .blog-filter__track { flex-wrap: wrap; overflow: visible; padding-inline: 0; }
}

/* List body */
.blog-body { padding-block: 40px 8px; }
.blog-label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-block: 56px 22px;
    font-size: 1.25rem;
    font-weight: 800;
}
.blog-label::before {
    content: "";
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c-primary);
    box-shadow: 0 0 0 5px var(--c-primary-50);
}
.blog-label::after { content: ""; flex: 1; height: 1px; background: var(--c-border); }

/* Featured post */
.post-feature {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--c-border);
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}
.post-feature__media { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--c-primary-50); }
.post-feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.post-feature:hover .post-feature__media img { transform: scale(1.04); }
.post-feature__body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 24px; }
.post-feature__title { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); font-weight: 800; line-height: 1.3; text-wrap: balance; }
.post-feature__title a { color: inherit; text-decoration: none; transition: color .2s ease; }
.post-feature:hover .post-feature__title a { color: var(--c-primary-600); }
.post-feature__excerpt {
    display: -webkit-box;
    overflow: hidden;
    color: var(--c-muted);
    font-size: 1.0625rem;
    line-height: 1.8;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}
.post-feature__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-block-start: 8px;
    padding: 12px 22px;
    border-radius: var(--r);
    background: var(--c-primary);
    color: #fff;
    font-weight: 700;
    transition: background-color .2s ease, gap .2s ease;
}
.post-feature__more .icon { width: 1.1em; height: 1.1em; }
.post-feature:hover .post-feature__more { gap: 12px; background: var(--c-primary-600); }

.post-badge {
    position: absolute;
    top: 16px;
    inset-inline-start: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--r-pill);
    background: rgb(255 255 255 / .94);
    box-shadow: var(--shadow-sm);
    color: var(--c-primary-700);
    font-size: .8125rem;
    font-weight: 800;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.post-badge .icon { width: 14px; height: 14px; color: var(--c-primary); }

@media (min-width: 900px) {
    .post-feature { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
    .post-feature__media { aspect-ratio: auto; min-height: 400px; }
    .post-feature__body { justify-content: center; padding: 48px 52px; }
}

/* Grid of cards: 3 per row on desktop; "wide" cards make rows of 2 so rows come out even */
.post-grid { display: grid; gap: 24px; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
    .post-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px; }
    .post-grid > * { grid-column: span 2; }
    .post-grid > .post-card--wide { grid-column: span 3; }
}

.post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.post-card__cover { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--c-primary-50); }
.post-card--wide .post-card__cover { aspect-ratio: 16 / 9; }
.post-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.post-card:hover .post-card__cover img { transform: scale(1.05); }
.post-card__chip {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    padding: 5px 12px;
    border-radius: var(--r-pill);
    background: rgb(255 255 255 / .94);
    box-shadow: var(--shadow-sm);
    color: var(--c-primary-700);
    font-size: .8125rem;
    font-weight: 800;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.post-card__placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, #fff 0%, var(--c-primary-50) 65%);
    color: var(--c-primary-100);
}
.post-card__placeholder img { width: 72px; height: 72px; filter: drop-shadow(0 6px 12px rgb(198 40 40 / .2)); }
.post-card__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 20px 22px 22px; }
.post-card__title { font-size: 1.1875rem; font-weight: 800; line-height: 1.45; }
.post-card--wide .post-card__title { font-size: 1.375rem; }
.post-card__title a { color: inherit; text-decoration: none; transition: color .2s ease; }
.post-card:hover .post-card__title a { color: var(--c-primary-600); }
.post-card__excerpt {
    display: -webkit-box;
    overflow: hidden;
    color: var(--c-muted);
    font-size: .96875rem;
    line-height: 1.75;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.post-card__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-block-start: auto;
    padding-block-start: 10px;
    color: var(--c-primary-600);
    font-size: .9375rem;
    font-weight: 800;
    transition: gap .2s ease;
}
.post-card__more .icon { width: 1em; height: 1em; }
.post-card:hover .post-card__more { gap: 10px; }

/* Small shared pieces */
.post-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 12px;
    border-radius: var(--r-pill);
    background: var(--c-primary-50);
    color: var(--c-primary-700);
    font-size: .8125rem;
    font-weight: 800;
}
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--c-muted); font-size: .875rem; }
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-meta .icon { width: 16px; height: 16px; }
.post-meta__dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .55; }
.post-card .post-meta { gap: 6px 10px; font-size: .8125rem; font-weight: 600; }

/* Paging */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-block-start: 48px; }
.pager__pages { display: flex; flex-wrap: wrap; gap: 6px; }
.pager__page,
.pager__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    padding-inline: 14px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-pill);
    background: #fff;
    color: var(--c-text);
    font-weight: 700;
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.pager a:hover { border-color: var(--c-primary-100); color: var(--c-primary-600); }
.pager__page[aria-current="page"] { border-color: var(--c-primary); background: var(--c-primary); color: #fff; }
.pager__step .icon { width: 1em; height: 1em; }

/* Nothing in this category yet */
.blog-empty {
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 56px 24px;
    border: 1px dashed var(--c-field);
    border-radius: var(--r-lg);
    background: #fff;
    color: var(--c-muted);
    text-align: center;
}
.blog-empty__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--c-primary-50); color: var(--c-primary); }
.blog-empty__icon .icon { width: 28px; height: 28px; }
.blog-empty__text { max-width: 42ch; font-size: 1.0625rem; }

/* From reading to donating */
.blog-cta { padding-block: 32px 72px; }
.blog-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.blog-cta__ghost { border-color: rgb(255 255 255 / .6); background: transparent; color: #fff; }
.blog-cta__ghost:hover { border-color: #fff; background: rgb(255 255 255 / .12); }
.blog-cta :focus-visible { outline-color: #fff; }
@media (min-width: 1024px) { .blog-cta__actions { justify-content: flex-end; } }

/* Post page ------------------------------------------------------------------- */
.read-progress {
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: calc(var(--z-header) + 1);
    height: 3px;
    background: linear-gradient(90deg, var(--c-primary), #EF5350);
    transform: scaleX(var(--progress, 0));
    transform-origin: left;
    pointer-events: none;
}
[dir="rtl"] .read-progress { background: linear-gradient(270deg, var(--c-primary), #EF5350); transform-origin: right; }

.post-hero { padding-block: 36px 64px; }
.post-hero__inner { display: grid; justify-items: center; gap: 16px; max-width: 880px; text-align: center; }
.post-hero .breadcrumb { justify-content: center; margin-block-end: 6px; }
.post-hero__title { font-size: clamp(2rem, 1.35rem + 2.8vw, 3.25rem); font-weight: 800; line-height: 1.25; text-wrap: balance; }
.post-hero__dek { max-width: 60ch; color: var(--c-muted); font-size: 1.1875rem; line-height: 1.8; text-wrap: pretty; }
.post-hero__meta {
    justify-content: center;
    margin-block-start: 4px;
    padding: 8px 18px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-pill);
    background: rgb(255 255 255 / .85);
}

.post-cover-wrap { position: relative; max-width: 1100px; margin-block-start: -36px; }
.post-cover {
    margin: 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: var(--c-surface);
    box-shadow: var(--shadow-lg);
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1024px) { .post-cover { aspect-ratio: 21 / 9; } }   /* the text starts higher on laptops */

.post-body { max-width: calc(720px + var(--gutter) * 2); padding-block: 52px 16px; }

/* The article itself, on top of .prose */
.prose--article { color: #2B2B2B; font-size: 1.125rem; line-height: 1.95; }
.prose--article > p:first-child { color: var(--c-text); font-size: 1.25rem; line-height: 1.9; }
.prose--article h2 { position: relative; margin-block-start: 2em; padding-inline-start: 18px; font-size: 1.625rem; }
.prose--article h2::before {
    content: "";
    position: absolute;
    inset-block: .25em;
    inset-inline-start: 0;
    width: 5px;
    border-radius: 5px;
    background: linear-gradient(180deg, var(--c-primary), #EF5350);
}
.prose--article h3 { font-size: 1.3125rem; }
.prose--article li > p { margin: 0; }
.prose--article a { color: var(--c-primary-600); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.prose--article a:hover { color: var(--c-primary-700); text-decoration-thickness: 2px; }
.prose--article blockquote {
    position: relative;
    margin-block: 1.8em;
    padding: 22px 26px;
    padding-inline-start: 64px;
    border: 0;
    border-radius: var(--r-lg);
    background: var(--c-primary-50);
    color: var(--c-primary-700);
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.8;
}
.prose--article blockquote::before { /* quote mark */
    content: "";
    position: absolute;
    top: 22px;
    inset-inline-start: 22px;
    width: 28px;
    height: 28px;
    background: var(--c-primary);
    opacity: .55;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z'/%3E%3Cpath d='M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z'/%3E%3Cpath d='M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prose--article blockquote > * + * { margin-block-start: .6em; }
.prose--article img { display: block; width: 100%; height: auto; margin-block: 1.8em; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.prose--article hr { height: 0; margin-block: 2.6em; border: 0; overflow: visible; text-align: center; }
.prose--article hr::before { content: "• • •"; color: var(--c-primary); font-size: 1.25rem; opacity: .45; }

/* Share */
.post-share {
    display: grid;
    gap: 6px;
    margin-block-start: 56px;
    padding: 24px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, #fff 0%, var(--c-surface) 100%);
}
.post-share__title { font-size: 1.125rem; font-weight: 800; }
.post-share__text { color: var(--c-muted); font-size: .9375rem; }
.post-share__buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 12px; }
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding-inline: 16px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-pill);
    background: #fff;
    color: var(--c-text);
    font: inherit;
    font-size: .9375rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease, transform .2s ease;
}
.share-btn[hidden] { display: none; }
.share-btn .icon { width: 18px; height: 18px; }
.share-btn:hover { border-color: currentColor; transform: translateY(-1px); }
.share-btn--whatsapp:hover { color: #0B7A3B; }
.share-btn--facebook:hover { color: #1565C0; }
.share-btn--x:hover { color: #000; }
.share-btn.is-done { border-color: var(--c-ok); background: var(--c-ok-50); color: var(--c-ok-700); }

.post-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-block-start: 28px; color: var(--c-primary-600); font-weight: 700; }
[dir="rtl"] .icon--back { transform: scaleX(-1); }

.post-related { margin-block-start: 48px; padding-block: 56px 24px; border-block-start: 1px solid var(--c-border); background: var(--c-surface); }
.post-related .blog-label { margin-block-start: 0; }

@media (prefers-reduced-motion: reduce) {
    .post-card__cover img,
    .post-feature__media img { transition: none; }
    .post-card:hover .post-card__cover img,
    .post-feature:hover .post-feature__media img,
    .share-btn:hover { transform: none; }
}

/* 9. Free tools (can I donate, next donation, child's blood type) ---------------- */
.tool { display: grid; gap: 24px; max-width: 860px; margin-inline: auto; }
.tool__disclaimer {
    display: flex; gap: 10px; align-items: flex-start;
    font-size: .875rem; color: var(--c-muted);
}
.tool__disclaimer .icon { width: 18px; height: 18px; margin-block-start: 3px; flex-shrink: 0; }

.tool-form { gap: 22px; padding: 24px; }
.tool-form__title { font-size: 1.125rem; font-weight: 800; }
.tool-form__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tool-grid { display: grid; gap: 18px; }
.tool-grid__wide { grid-column: 1 / -1; }
@media (min-width: 640px) { .tool-grid { grid-template-columns: 1fr 1fr; } }

.form__error {
    display: flex; gap: 8px; align-items: center;
    padding: 12px 16px; border-radius: var(--r); font-weight: 700;
    background: var(--c-primary-50); color: var(--c-primary-700);
}
.form__error .icon { width: 20px; height: 20px; flex-shrink: 0; }

.ticks { margin: 0; padding: 6px 12px 10px; border: 1px solid var(--c-border); border-radius: var(--r); min-inline-size: 0; }
.ticks legend { padding-inline: 8px; font-size: .9375rem; font-weight: 800; color: var(--c-primary-600); }
.tick {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 10px 8px; min-height: 44px; border-radius: var(--r-sm); cursor: pointer;
    line-height: 1.6;
}
.tick:hover { background: var(--c-surface); }
.tick input { flex-shrink: 0; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--c-primary); cursor: pointer; }

/* The answer */
.tool-result {
    display: grid; gap: 14px;
    padding: 24px; border-radius: var(--r-lg); border: 2px solid var(--c-border); background: #fff;
    scroll-margin-top: calc(var(--header-h) + 16px);
}
.tool-result:focus-visible { outline-offset: 4px; }
.tool-result__head { display: flex; gap: 16px; align-items: flex-start; }
.tool-result__head > .icon { width: 36px; height: 36px; flex-shrink: 0; margin-block-start: 2px; }
.tool-result__title { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); font-weight: 800; line-height: 1.35; }
.tool-result__sub { margin-block-start: 6px; font-size: 1.0625rem; font-weight: 800; }
.tool-result--eligible { border-color: var(--c-ok); background: var(--c-ok-50); }
.tool-result--eligible .tool-result__head > .icon { color: var(--c-ok-700); }
.tool-result--temporary { border-color: var(--c-low); background: var(--c-low-50); }
.tool-result--temporary .tool-result__head > .icon { color: var(--c-low-700); }
.tool-result--doctor { border-color: var(--c-accent); background: var(--c-accent-50); }
.tool-result--doctor .tool-result__head > .icon { color: var(--c-accent-700); }
.tool-result--permanent { border-color: var(--c-primary); background: var(--c-primary-50); }
.tool-result--permanent .tool-result__head > .icon { color: var(--c-primary-700); }

.reasons { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.reasons__item {
    display: grid; gap: 4px; padding: 12px 16px;
    border-radius: var(--r); background: #fff; border-inline-start: 5px solid var(--c-low);
}
.reasons__item--permanent { border-inline-start-color: var(--c-primary); }
.reasons__item--doctor { border-inline-start-color: var(--c-accent); }
.reasons__item span { color: var(--c-muted); }
.reasons__item em { font-style: normal; font-weight: 700; color: var(--c-low-700); }
.steps-links { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.steps-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

.progress { height: 14px; border-radius: var(--r-pill); background: #fff; overflow: hidden; border: 1px solid var(--c-border); }
.progress__bar { display: block; height: 100%; border-radius: var(--r-pill); background: var(--c-low); }
.tool-result--eligible .progress__bar { background: var(--c-ok); }
.progress__text { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .9375rem; color: var(--c-muted); }

.schedule { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.schedule li { display: flex; gap: 14px; align-items: center; padding: 10px 14px; border-radius: var(--r); background: #fff; }
.schedule__n {
    display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0;
    border-radius: 50%; background: var(--c-primary); color: #fff; font-weight: 800; font-size: .9375rem;
}
.schedule__date { font-weight: 700; }
.tool-remind { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r); background: #fff; }
.tool-remind .icon { width: 28px; height: 28px; color: var(--c-primary); flex-shrink: 0; }
.tool-remind p { color: var(--c-muted); }

.chances { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.chances__item {
    display: grid; grid-template-columns: 64px 1fr auto; gap: 8px 14px; align-items: center;
    padding: 14px 16px; border-radius: var(--r); background: #fff;
}
.chances__type { font-size: 1.5rem; font-weight: 800; color: var(--c-primary); }
.chances__bar { position: relative; height: 12px; border-radius: var(--r-pill); background: var(--c-surface); overflow: hidden; }
.chances__fill, .chances__min { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: var(--r-pill); }
.chances__fill { background: var(--c-primary-100); }
.chances__min { background: var(--c-primary); }
.chances__value { font-weight: 800; white-space: nowrap; }
.chances__link { grid-column: 1 / -1; font-size: .9375rem; }
@media (min-width: 640px) {
    .chances__item { grid-template-columns: 64px 1fr 150px auto; }
    .chances__link { grid-column: auto; }
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pills__item { padding: 6px 16px; border-radius: var(--r-pill); background: #fff; border: 1px solid var(--c-border); font-weight: 800; color: var(--c-muted); }

.tool-note { padding: 14px 16px; border-radius: var(--r); background: #fff; border-inline-start: 5px solid var(--c-accent); }
.tool-note--alert { border-inline-start-color: var(--c-primary); background: var(--c-primary-50); }
.tool-note p { color: var(--c-muted); }

/* Explanation and questions under a tool */
.tool-prose { max-width: 760px; }
.tool-prose .section__title { margin-block: 28px 8px; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); }
.tool-prose .section__title:first-child { margin-block-start: 0; }
.tool-prose p { max-width: 68ch; }
.tool-list { display: grid; gap: 6px; margin: 10px 0 0; padding-inline-start: 22px; }

.faq { display: grid; gap: 10px; margin-block-start: 18px; }
.faq details { border: 1px solid var(--c-border); border-radius: var(--r); background: #fff; }
.faq summary {
    display: flex; justify-content: space-between; gap: 12px; align-items: center;
    padding: 14px 18px; min-height: 52px; font-weight: 800; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: ""; width: 20px; height: 20px; flex-shrink: 0; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { padding: 0 18px 16px; color: var(--c-muted); }

.tool-cards { display: grid; gap: 16px; margin: 20px 0 0; padding: 0; list-style: none; }
.tool-cards__item p { margin-block-start: 6px; color: var(--c-muted); }
.tool-cards__title { font-size: 1.125rem; font-weight: 800; }
.tool-cards__title a { color: var(--c-text); text-decoration: none; }
@media (min-width: 768px) { .tool-cards { grid-template-columns: repeat(3, 1fr); } }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* Child tool: inheritance tables -------------------------------------------- */
.inherit-wrap { margin-block: 14px 8px; overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--r); background: #fff; }
.inherit { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.inherit th, .inherit td { padding: 10px 14px; border-block-end: 1px solid var(--c-border); text-align: start; vertical-align: middle; }
.inherit thead th { background: var(--c-surface); font-size: .875rem; font-weight: 800; }
.inherit tbody tr:last-child > * { border-block-end: 0; }
.inherit tbody th { font-weight: 800; white-space: nowrap; }
.inherit tr.is-current > * { background: #FDECEC; }
.inherit tr.is-current > th { box-shadow: inset 4px 0 0 var(--c-primary); }
[dir="rtl"] .inherit tr.is-current > th { box-shadow: inset -4px 0 0 var(--c-primary); }
.inherit__type { display: inline-block; min-width: 2.6em; margin: 2px; padding: 2px 8px; border-radius: 999px; background: #FDECEC; color: var(--c-primary-700); font-weight: 800; text-align: center; }
.inherit__type--no { background: var(--c-surface); color: var(--c-muted); font-weight: 700; }
.inherit tr.is-current .inherit__type { background: #fff; }
.inherit__none { color: var(--c-muted); }
/* Tool sources -------------------------------------------------------------- */
.sources { display: grid; gap: 10px; margin: 10px 0 12px; padding-inline-start: 22px; }
.sources a { font-weight: 700; overflow-wrap: anywhere; }
.sources__by { display: block; font-size: .875rem; color: var(--c-muted); }
/* Tool infographics ---------------------------------------------------------- */
.infographic { margin: 22px 0 8px; max-width: 560px; }
.infographic a { display: block; border-radius: var(--r); }
.infographic img { display: block; width: 100%; height: auto; border: 1px solid var(--c-border); border-radius: var(--r); background: #fff; }
.infographic figcaption { margin-top: 8px; font-size: .8125rem; color: var(--c-muted); }
/* Medical reviewer ------------------------------------------------------------ */
.reviewer { display: flex; gap: 20px; align-items: center; margin-block: 8px 28px; padding: 20px; border: 1px solid var(--c-border); border-radius: var(--r); background: #fff; }
.reviewer__photo { flex: none; width: 112px; height: 112px; border-radius: 50%; object-fit: cover; }
.reviewer__name { margin: 0; font-size: 1.375rem; font-weight: 800; }
.reviewer__role { margin: 4px 0 0; font-weight: 700; color: var(--c-primary-700); }
.reviewer__meta { margin: 6px 0 0; font-size: .875rem; color: var(--c-muted); }
.byline a { font-weight: 700; }
.reviewer__bio { margin: 10px 0 0; font-size: .9375rem; }
/* Guides ---------------------------------------------------------------------- */
.answer { margin-block: 0 24px; padding: 18px 20px; border: 1px solid var(--c-primary-100); border-inline-start: 4px solid var(--c-primary); border-radius: var(--r); background: var(--c-primary-50); }
.answer__label { display: block; margin-block-end: 6px; font-size: .8125rem; font-weight: 800; letter-spacing: .02em; color: var(--c-primary-700); }
.answer p { margin: 0; font-size: 1.0625rem; line-height: 1.75; max-width: none; }
.guide-toc { margin-block: 0 8px; padding: 14px 18px; border: 1px solid var(--c-border); border-radius: var(--r); background: #fff; }
.guide-toc__title { margin: 0 0 6px; font-size: .9375rem; font-weight: 800; }
.guide-toc ol { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; font-size: .9375rem; }
.guide .section__title { scroll-margin-top: 88px; }
.guide .tool-list a, .guide p a { font-weight: 700; }
.guides-more { margin: 22px 0 0; text-align: center; }
@media (max-width: 479px) { .inherit th, .inherit td { padding: 8px 10px; } .inherit thead th { font-size: .8125rem; } }
