/* ==========================================================================
   CAPER Egypt — public website
   Design tokens, layout, components. No external fonts or CDNs.
   RTL support uses CSS logical properties throughout.
   ========================================================================== */

:root {
  --brand-navy: #0b2545;
  --brand-blue: #1766c2;
  --brand-blue-soft: #e6effa;
  --brand-gold: #b8893b;
  --brand-ink: #12233a;
  --brand-muted: #4a5b6e;
  --brand-danger: #b3261e;

  /* Compatibility names retained so component rules keep one token source. */
  --teal-900: var(--brand-navy);
  --teal-800: var(--brand-navy);
  --teal-700: var(--brand-blue);
  --teal-600: var(--brand-blue);
  --teal-500: var(--brand-blue);
  --teal-100: var(--brand-blue-soft);
  --teal-050: #f6f9fd;

  --gold-600: #76521d;
  --gold-500: var(--brand-gold);
  --gold-300: #f2e7d2;

  --coral-600: var(--brand-danger);

  --ink: var(--brand-ink);
  --ink-2: var(--brand-muted);
  --muted: var(--brand-muted);
  --line: #d3deec;
  --white: #ffffff;
  --bg-soft: #f6f9fd;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.05), 0 10px 24px -20px rgba(11, 37, 69, 0.28);
  --shadow-md: 0 24px 48px -32px rgba(11, 37, 69, 0.38);

  --container: 1180px;
  --gutter: clamp(1.15rem, 4vw, 2rem);
  --section-y: clamp(3rem, 6vw, 5.25rem);

  --font-sans: "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system,
    "Helvetica Neue", Arial, "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, sans-serif;

  --step--1: clamp(0.85rem, 0.82rem + 0.15vw, 0.95rem);
  --step-0: clamp(1rem, 0.97rem + 0.2vw, 1.075rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.4vw, 1.35rem);
  --step-2: clamp(1.4rem, 1.25rem + 0.8vw, 1.8rem);
  --step-3: clamp(1.7rem, 1.4rem + 1.4vw, 2.4rem);
  --step-4: clamp(2.05rem, 1.55rem + 2.4vw, 3.2rem);

  /* Motion: strong custom curves — built-in easings feel sluggish. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* Homepage-only refinements; other page families retain their current styling. */
.home-page {
  --home-navy-deep: #06152b;
  --home-navy: #081e34;
  --home-navy-elevated: #11325d;
  --home-teal: #57d0c2;
  --home-teal-deep: #0e7470;
  --home-teal-glow: rgba(87, 208, 194, 0.28);
  --home-mist: #f1f8f7;
  --home-sand: #d9b978;
  --home-gold-glow: rgba(217, 185, 120, 0.22);
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/IBMPlexSansArabic-Regular.891662a6e9d2.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/IBMPlexSansArabic-SemiBold.452ddb9edea6.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/IBMPlexSansArabic-Bold.8640fa458316.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

/* --- Reset ---------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Keep anchor targets and the skip link clear of the sticky header. */
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.6em;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--teal-600);
  text-decoration-color: color-mix(in srgb, var(--teal-600) 35%, transparent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--teal-800);
  text-decoration-color: currentColor;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-inline-start: 1.4em;
}

button {
  font: inherit;
}

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

::selection {
  background: var(--gold-300);
  color: var(--teal-900);
}

/* --- Layout utilities ----------------------------------------------------- */

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

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

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--brand-navy);
  color: var(--white);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top 0.18s var(--ease-out);
}

.skip-link:focus {
  top: 0;
  color: var(--white);
}

.icon {
  display: inline-flex;
  width: 1.25em;
  height: 1.25em;
  flex: 0 0 auto;
}

.icon svg {
  width: 100%;
  height: 100%;
}

[dir="rtl"] .icon--directional {
  transform: scaleX(-1);
}

/* --- Type helpers --------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-600);
}

.eyebrow--light {
  color: var(--gold-300);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: var(--step--1);
  color: var(--muted);
}

.meta--row {
  margin-block: 1rem 0;
}

.lede {
  font-size: var(--step-1);
  color: var(--ink-2);
  max-width: 62ch;
}

.empty-state {
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.35rem;
  border: 1px solid transparent;
  min-height: 48px;
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s var(--ease-out), color 0.16s var(--ease-out),
    border-color 0.16s var(--ease-out), transform 0.16s var(--ease-out),
    box-shadow 0.16s var(--ease-out);
}

/* Press feedback: the interface must answer the finger/cursor instantly. */
.btn:active {
  transform: scale(0.97);
}

.btn .icon {
  width: 1.05em;
  height: 1.05em;
  transition: transform 0.16s var(--ease-out);
}

.btn:hover .icon--directional,
.btn:focus-visible .icon--directional {
  transform: translateX(3px);
}

[dir="rtl"] .btn:hover .icon--directional,
[dir="rtl"] .btn:focus-visible .icon--directional {
  transform: scaleX(-1) translateX(3px);
}

.btn--primary {
  background: var(--teal-700);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--teal-800);
  color: var(--white);
  transform: translateY(-1px);
}

.btn--secondary {
  background: var(--white);
  color: var(--teal-800);
  border-color: var(--teal-100);
}

.btn--secondary:hover {
  border-color: var(--teal-600);
  color: var(--teal-800);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--teal-700);
  border-color: transparent;
  padding-inline: 0.35rem;
}

.btn--ghost:hover {
  color: var(--teal-900);
}

.btn--light {
  background: var(--white);
  color: var(--teal-800);
}

.btn--light:hover {
  background: var(--gold-300);
  color: var(--teal-900);
}

.btn--sm {
  padding: 0.5rem 0.95rem;
  font-size: 0.82rem;
}

.btn--lg {
  padding: 0.9rem 1.7rem;
  font-size: var(--step-0);
}

.btn--text {
  background: transparent;
  color: var(--teal-700);
  padding-inline: 0;
  border-radius: 0;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--teal-050);
  border: 1px solid var(--teal-100);
  color: var(--teal-700);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s var(--ease-out),
    border-color 0.15s var(--ease-out), color 0.15s var(--ease-out),
    transform 0.15s var(--ease-out);
}

a.chip:active {
  transform: scale(0.97);
}

.chip--active,
a.chip:hover {
  background: var(--teal-700);
  border-color: var(--teal-700);
  color: var(--white);
}

.chip--event {
  background: #fdf3e3;
  border-color: #f2dcae;
  color: #8a5c10;
}

.chip--screening {
  background: #eaf4f2;
  border-color: #cfe6e2;
  color: #0f5a52;
}

.chip--research {
  background: #eef1fa;
  border-color: #d9dff2;
  color: #35488c;
}

.chip--awareness {
  background: #fdeee9;
  border-color: #f6d6cb;
  color: #9c3f22;
}

/* --- Announcement --------------------------------------------------------- */

.announcement {
  background: var(--teal-900);
  color: #e8f3f1;
  font-size: var(--step--1);
}

.announcement__inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-block: 0.55rem;
}

.announcement p,
.announcement a {
  margin: 0;
  color: inherit;
}

.announcement a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.announcement__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--gold-500);
  flex: 0 0 auto;
}

/* --- Header --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--white) 94%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px -24px rgba(11, 37, 69, 0.35);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}

.site-header .header__inner {
  max-width: 1440px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--teal-800);
}

.brand__mark {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--brand-navy);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--brand-navy);
  unicode-bidi: isolate;
}

.brand__country {
  color: var(--brand-blue);
}

.brand__tagline {
  font-size: 0.72rem;
  color: var(--muted);
  max-width: 24ch;
}

/* Mobile-first disclosure navigation. */
.nav__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  min-height: 48px;
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--teal-800);
  cursor: pointer;
  list-style: none;
  transition: border-color 0.15s var(--ease-out),
    background-color 0.15s var(--ease-out), transform 0.15s var(--ease-out);
}

.nav__toggle:hover {
  border-color: var(--teal-500);
  background: var(--teal-050);
}

.nav__toggle:active {
  transform: scale(0.97);
}

.nav__toggle::-webkit-details-marker {
  display: none;
}

.nav__toggle-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 1rem;
}

.nav__toggle-icon span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav__panel {
  display: none;
  padding-block: 1rem 1.4rem;
}

.nav[open] .nav__panel {
  display: block;
}

.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.nav__list a {
  display: block;
  padding: 0.55rem 0.2rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.nav__list a:hover,
.nav__list a[aria-current="page"] {
  color: var(--teal-700);
}

.nav__utility {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.portal-entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.portal-entry-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--brand-navy);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s var(--ease-out),
    background-color 0.15s var(--ease-out), color 0.15s var(--ease-out);
}

.portal-entry-links a:hover {
  border-color: var(--brand-blue);
  background: var(--brand-blue-soft);
  color: var(--brand-navy);
}

.portal-entry-links__gateway {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  border-color: transparent !important;
  color: var(--muted) !important;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s var(--ease-out),
    background-color 0.15s var(--ease-out), color 0.15s var(--ease-out);
}

.portal-entry-links__gateway:hover {
  border-color: var(--line) !important;
  background: transparent !important;
  color: var(--brand-navy) !important;
}

.nav__search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding-inline: 0.9rem 0.25rem;
  background: var(--bg-soft);
}

.nav__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.55rem 0;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
}

.nav__search input:focus {
  outline: none;
}

.nav__search:focus-within {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal-500) 18%, transparent);
}

.nav__search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--teal-700);
  cursor: pointer;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
}

.lang-switch a {
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  color: var(--ink-2);
}

.lang-switch a:hover {
  border-color: var(--teal-500);
  color: var(--teal-700);
}

@media (min-width: 1400px) {
  .nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
  }

  .nav__toggle {
    display: none;
  }

  .nav__panel,
  .nav[open] .nav__panel {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.6rem;
    width: 100%;
    padding-block: 0;
  }

  .nav__list {
    flex-direction: row;
    gap: clamp(0.65rem, 1vw, 1.45rem);
  }

  .nav__list a {
    padding: 0.4rem 0;
    font-size: 0.93rem;
    border-bottom: 2px solid transparent;
  }

  .nav__list a[aria-current="page"] {
    border-bottom-color: var(--gold-500);
  }

  .nav__utility {
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .nav__search {
    width: 11rem;
  }

  .portal-entry-links {
    gap: 0.25rem;
  }

  .portal-entry-links a {
    padding-inline: 0.55rem;
    font-size: 0.76rem;
  }

  .brand__tagline {
    font-size: 0.74rem;
  }
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-blue) 100%);
  color: #eaf4f2;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(38rem 38rem at 88% 8%, rgba(184, 137, 59, 0.12), transparent 65%),
    radial-gradient(30rem 30rem at 8% 92%, rgba(23, 102, 194, 0.22), transparent 70%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  padding-block: clamp(3rem, 7vw, 5.5rem);
  align-items: center;
}

.hero__content {
  max-width: 40rem;
}

.hero__title {
  font-size: var(--step-4);
  line-height: 1.12;
  color: var(--white);
  margin-bottom: 1rem;
}

.hero__lead {
  font-size: var(--step-1);
  color: var(--brand-blue-soft);
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__review {
  margin-top: 1.6rem;
  font-size: 0.8rem;
  color: var(--brand-blue-soft);
}

.hero__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero__media img {
  width: 100%;
  aspect-ratio: 11 / 9;
  object-fit: cover;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1.08fr 1fr;
  }
}

/* --- Page hero / breadcrumbs ---------------------------------------------- */

.breadcrumbs {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.85rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
  padding-block: 0.8rem;
  list-style: none;
  color: #4a5b6e;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-inline-end: 0.45rem;
  color: #94a3b8;
}

[dir="rtl"] .breadcrumbs li + li::before {
  content: "\\";
}

.breadcrumbs a {
  color: #4a5b6e;
  text-decoration: none;
  transition: color 0.18s var(--ease-out);
}

.breadcrumbs a:hover {
  color: var(--brand-navy);
  font-weight: 600;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 18%, rgba(87, 208, 194, 0.12), transparent 45%),
    radial-gradient(circle at 12% 82%, rgba(217, 185, 120, 0.08), transparent 50%),
    linear-gradient(135deg, #06152b 0%, #0b2545 60%, #0e3456 100%);
  color: #eaf4f2;
  border-bottom: 1px solid rgba(14, 116, 112, 0.22);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.page-hero--slim {
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(1.75rem, 4vw, 3rem);
}

.page-hero__inner {
  position: relative;
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2.5rem, 6vw, 4.25rem);
  align-items: center;
}

.page-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.85rem;
  background: rgba(87, 208, 194, 0.1);
  border: 1px solid rgba(87, 208, 194, 0.25);
  border-radius: 999px;
  color: #c0ece5;
  font-size: 0.825rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  letter-spacing: 0.02em;
}

.page-hero__title {
  font-size: clamp(2.2rem, 1.8rem + 1.8vw, 3.2rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.page-hero__lead {
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.25rem);
  color: #dceaf7;
  max-width: 46rem;
  line-height: 1.75;
  margin: 0;
}

.page-hero__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.page-hero__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (min-width: 900px) {
  .page-hero__inner {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

/* --- Sections ------------------------------------------------------------- */

.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: clamp(2rem, 4vw, 3rem);
}

.section--soft {
  background: var(--bg-soft);
}

.section__head {
  max-width: 46rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.section__head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  max-width: none;
}

.section__title {
  font-size: var(--step-3);
  margin-bottom: 0.4rem;
}

.section__title--sm {
  font-size: var(--step-2);
}

.section__lead {
  font-size: var(--step-0);
  color: var(--ink-2);
  margin: 0;
}

.page-body {
  padding-block: clamp(2rem, 5vw, 3.5rem);
}

/* Nested sections inside page bodies must not double the gutters. */
.page-body > .section,
.article__body > .section {
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
}

.page-body .container,
.article__body .container {
  max-width: none;
  padding-inline: 0;
}

.article__body .section--soft,
.page-body .section--soft {
  background: transparent;
}

/* --- Prose ---------------------------------------------------------------- */

.prose {
  max-width: 68ch;
  color: var(--ink-2);
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2,
.prose h3,
.prose h4 {
  color: var(--ink);
  margin-top: 1.9em;
  margin-bottom: 0.5em;
}

.prose h2 {
  font-size: var(--step-2);
}

.prose h3 {
  font-size: var(--step-1);
}

.prose ul,
.prose ol {
  padding-inline-start: 1.3em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: 2rem;
}

.prose a {
  text-decoration: underline;
}

/* --- Cards ---------------------------------------------------------------- */

.card-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.6rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-out), border-color 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}

/* Lift only where a real pointer hovers — touch devices get a sticky hover. */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-3px);
    border-color: var(--teal-100);
    box-shadow: var(--shadow-md);
  }
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 14px;
  background: var(--teal-050);
  color: var(--teal-600);
  margin-bottom: 0.35rem;
}

.card__icon .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.card__title {
  font-size: var(--step-1);
  margin: 0;
}

.card__text {
  margin: 0;
  color: var(--ink-2);
  font-size: var(--step--1);
  line-height: 1.65;
}

.card__action {
  margin: auto 0 0;
  padding-top: 0.75rem;
}

/* --- Stats ---------------------------------------------------------------- */

.stats-band {
  background: linear-gradient(120deg, var(--teal-900), var(--teal-800));
  color: var(--line);
  padding-block: clamp(2.25rem, 5vw, 3.5rem);
}

.stats-band :focus-visible,
.hero :focus-visible,
.cta-panel :focus-visible,
.portal-band:not(.portal-band--utility) :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--white);
}

.stats-band__heading {
  color: var(--gold-300);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.stats-band__list {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-inline-start: 1rem;
  border-inline-start: 2px solid rgba(184, 137, 59, 0.55);
}

.stat__value {
  font-size: var(--step-2);
  font-weight: 700;
  color: var(--gold-300);
  line-height: 1.1;
}

.stat__label {
  font-size: var(--step--1);
  color: var(--line);
}

/* --- Partners ------------------------------------------------------------- */

.partner-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.partner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  align-items: center;
}

.partner__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.5rem;
  width: 100%;
}

.partner__logo img {
  max-height: 4.5rem;
  width: auto;
  object-fit: contain;
}

.partner__logo--placeholder .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0.75rem;
  border-radius: 50%;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}

.partner__name {
  font-size: 1rem;
  margin: 0;
}

.partner__name a {
  text-decoration: none;
}

.partner__text {
  margin: 0;
  font-size: var(--step--1);
  color: var(--muted);
}

/* --- People --------------------------------------------------------------- */

.people-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.people-grid--large {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.person {
  position: relative;
  overflow: hidden;
  padding: 2.25rem 1.8rem;
  background: var(--white);
  border: 1px solid rgba(11, 37, 69, 0.09);
  border-top: 3.5px solid var(--brand-navy);
  border-radius: 1.25rem;
  box-shadow: 0 4px 20px rgba(11, 37, 69, 0.04);
  text-align: center;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.person:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 36px -8px rgba(11, 37, 69, 0.1);
  border-top-color: var(--home-teal-deep);
}

.person__photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 7rem;
  height: 7rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #eef9f7 0%, #dcf4f0 100%);
  border: 3px solid rgba(14, 116, 112, 0.2);
  box-shadow: 0 6px 16px rgba(11, 37, 69, 0.08);
}

.person__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person__photo--initial {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--home-teal-deep);
}

.person__name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin: 0 0 0.35rem;
}

.person__role {
  margin: 0 0 0.75rem;
  font-size: 0.925rem;
  color: var(--home-teal-deep);
  font-weight: 600;
}

.person__bio {
  margin: 0;
  font-size: 0.95rem;
  color: #4a5b6e;
  line-height: 1.68;
  text-align: start;
}

.person__contact {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

/* --- News ----------------------------------------------------------------- */

.news-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
  }
}

.news-card__media {
  display: block;
  background: var(--teal-050);
  color: var(--teal-100);
}

.news-card__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.news-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  color: var(--teal-100);
  background: linear-gradient(140deg, var(--teal-700), var(--teal-500));
}

.news-card__placeholder svg {
  width: 4rem;
  height: 4rem;
  opacity: 0.7;
}

.news-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem 1.35rem 1.4rem;
}

.news-card__body .chip {
  align-self: flex-start;
}

.news-card__title {
  font-size: 1.1rem;
  margin: 0;
  line-height: 1.4;
}

.news-card__title a {
  color: var(--ink);
  text-decoration: none;
}

.news-card__title a:hover {
  color: var(--teal-700);
}

.news-card__excerpt {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-2);
}

.news-card__body .meta {
  margin: auto 0 0;
  padding-top: 0.5rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 2.25rem;
  padding: 0.4rem 0.55rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-pill);
  width: fit-content;
  max-width: 100%;
}

.filter-bar .chip {
  padding: 0.45rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  border-radius: var(--radius-pill);
  transition: all 0.18s var(--ease-out);
}

.filter-bar .chip:hover {
  background: #edf2f7;
  color: var(--brand-navy);
  border-color: #cbd5e1;
}

.filter-bar .chip--active {
  background: var(--brand-navy) !important;
  border-color: var(--brand-navy) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(11, 37, 69, 0.18);
}

/* --- Article -------------------------------------------------------------- */

.article {
  padding-block: 1rem 3rem;
}

.article__inner {
  max-width: 52rem;
  margin-inline: auto;
}

.article__head {
  margin-bottom: 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.article__head .chip {
  margin-bottom: 1rem;
}

.article__title {
  font-size: clamp(2rem, 1.8rem + 1.5vw, 2.75rem);
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 0.85rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.article__lead {
  font-size: clamp(1.1rem, 1.02rem + 0.3vw, 1.25rem);
  color: #334155;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.article__cover {
  margin: 0 0 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(11, 37, 69, 0.08);
  border: 1px solid rgba(11, 37, 69, 0.08);
}

.article__cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article__body {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #1e293b;
}

.article__body h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-navy);
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.article__body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

.article__body p {
  margin-bottom: 1.4rem;
}

.article__body ul,
.article__body ol {
  margin-bottom: 1.5rem;
  padding-inline-start: 1.5rem;
}

.article__body li {
  margin-bottom: 0.5rem;
}

.article__back {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.article__back .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

/* --- Accordion ------------------------------------------------------------ */

.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 54rem;
}

.accordion__item {
  border: 1px solid #dce5ef;
  border-radius: 12px;
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(11, 37, 69, 0.03);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.accordion__item:hover {
  border-color: #cbd5e1;
}

.accordion__item[open] {
  border-color: var(--brand-blue);
  box-shadow: 0 8px 24px rgba(11, 37, 69, 0.07);
}

.accordion__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.4rem;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  color: var(--brand-navy);
  transition: background-color 0.18s var(--ease-out), color 0.18s var(--ease-out);
}

.accordion__summary::-webkit-details-marker {
  display: none;
}

.accordion__summary:hover {
  color: var(--teal-700);
}

.accordion__item[open] .accordion__summary {
  background: #f8fafc;
  border-bottom: 1px solid #eef2f6;
  color: var(--brand-navy);
}

.accordion__chevron {
  width: 0.7rem;
  height: 0.7rem;
  border-inline-end: 2.5px solid currentColor;
  border-block-end: 2.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease-out);
  flex: 0 0 auto;
  margin-block-start: -0.25rem;
}

.accordion__item[open] .accordion__chevron {
  transform: rotate(-135deg);
  margin-block-start: 0.25rem;
}

.accordion__answer {
  padding: 1.25rem 1.4rem 1.4rem;
  color: #334155;
  line-height: 1.7;
}

.accordion__answer > :last-child {
  margin-bottom: 0;
}

/* --- Timeline ------------------------------------------------------------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 48rem;
}

.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1.25rem;
  padding-block: 0 1.85rem;
}

.timeline__item::before {
  content: "";
  position: absolute;
  inset-block: 1.6rem 0;
  inset-inline-start: 2.45rem;
  width: 2px;
  background: linear-gradient(180deg, var(--teal-300), #e2e8f0);
}

.timeline__item:last-child::before {
  display: none;
}

.timeline__marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 2.75rem;
  border-radius: var(--radius-pill);
  background: #f0fdfa;
  border: 1.5px solid #99f6e4;
  color: #0f766e;
  font-weight: 800;
  font-size: 0.88rem;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.08);
}

.timeline__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin: 0.25rem 0 0.35rem;
}

.timeline__text {
  margin: 0;
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.65;
}

/* --- Documents ------------------------------------------------------------ */

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  max-width: 54rem;
}

.doc {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.15rem 1.4rem;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(11, 37, 69, 0.02);
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}

.doc:hover {
  transform: translateY(-2px);
  border-color: #5eead4;
  box-shadow: 0 8px 20px rgba(11, 37, 69, 0.06);
}

.doc__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  color: var(--teal-600);
  flex: 0 0 auto;
}

.doc__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.doc__title a {
  color: var(--brand-navy);
  text-decoration: none;
}

.doc__title a:hover {
  color: var(--teal-700);
}

.doc__text {
  margin: 0;
  font-size: 0.88rem;
  color: #475569;
}

/* --- Quote / callout / figure --------------------------------------------- */

.quote {
  margin: 2.25rem 0;
  padding: 2rem 2.25rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdfa 100%);
  border: 1px solid #e2e8f0;
  border-inline-start: 5px solid var(--gold-500);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(11, 37, 69, 0.03);
}

[dir="rtl"] .quote {
  border-radius: 14px;
}

.quote__mark {
  display: block;
  font-size: 3.5rem;
  line-height: 0.5;
  color: var(--gold-500);
  margin-bottom: 0.75rem;
}

.quote blockquote {
  margin: 0;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
  font-weight: 500;
  color: var(--brand-navy);
  line-height: 1.65;
}

.quote figcaption {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.9rem;
}

.quote__name {
  font-weight: 700;
  color: var(--brand-navy);
}

.quote__role {
  color: #475569;
}

.callout {
  display: flex;
  gap: 1.1rem;
  margin: 2rem 0;
  padding: 1.35rem 1.6rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  border-inline-start: 5px solid var(--teal-600);
  background: #f8fafc;
  box-shadow: 0 4px 14px rgba(11, 37, 69, 0.03);
}

.callout__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  color: var(--teal-600);
  flex: 0 0 auto;
}

.callout__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.callout__body .prose {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.65;
}

.callout__body .prose > :last-child {
  margin-bottom: 0;
}

.callout--warning {
  background: #fffdf5;
  border-color: #fef3c7;
  border-inline-start-color: var(--gold-600);
}

.callout--warning .callout__icon {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.callout--success {
  background: #f0fdf4;
  border-color: #dcfce7;
  border-inline-start-color: #16a34a;
}

.callout--success .callout__icon {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #15803d;
}

.figure {
  margin: 2.5rem 0;
}

.figure img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(11, 37, 69, 0.06);
  border: 1px solid rgba(11, 37, 69, 0.06);
}

.figure--wide {
  margin-inline: calc(var(--gutter) * -1);
}

.figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: #475569;
  text-align: center;
}

@media (min-width: 900px) {
  .figure--full {
    width: min(100vw - 2rem, 72rem);
    margin-inline: 50%;
    transform: translateX(-50%);
  }

  [dir="rtl"] .figure--full {
    transform: translateX(50%);
  }
}

/* --- CTA / portal band ---------------------------------------------------- */

.cta-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  padding: clamp(2rem, 5vw, 3.25rem);
  border-radius: 16px;
  background:
    radial-gradient(circle at 90% 20%, rgba(87, 208, 194, 0.18), transparent 40%),
    linear-gradient(135deg, #0d1b2a 0%, #162a45 55%, #1c3d5a 100%);
  color: #e8f3f1;
  border: 1px solid rgba(87, 208, 194, 0.2);
  box-shadow: 0 16px 36px rgba(11, 37, 69, 0.14);
}

.cta-panel__title {
  color: var(--white);
  font-size: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cta-panel__text {
  margin: 0;
  color: #c7ded9;
  max-width: 48ch;
  line-height: 1.65;
  font-size: 1.02rem;
}

.cta-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cta-panel .btn--primary {
  background: var(--brand-blue);
  color: var(--white);
}

.cta-panel .btn--primary:hover {
  background: var(--brand-navy);
  color: var(--white);
}

.portal-band {
  background: var(--teal-900);
  color: #e8f3f1;
  padding-block: clamp(2.5rem, 5vw, 3.75rem);
}

.portal-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.portal-band__title {
  color: var(--white);
  font-size: var(--step-2);
  margin-bottom: 0.35rem;
}

.portal-band__text {
  margin: 0;
  color: #c7ded9;
  max-width: 50ch;
}

.portal-band--utility {
  padding-block: 1.5rem;
  background: var(--bg-soft);
  color: var(--ink);
  border-block: 1px solid var(--line);
}

.portal-band--utility .portal-band__title {
  margin: 0;
  color: var(--ink);
  font-size: var(--step-1);
}

.portal-band--utility .portal-band__text {
  color: var(--muted);
}

.portal-band--utility .btn--light {
  background: var(--brand-blue);
  color: var(--white);
}

.portal-band--utility .btn--light:hover {
  background: var(--brand-navy);
  color: var(--white);
}

.portal-auth {
  width: min(100%, 36rem);
  margin-inline: auto;
}

.portal-auth__panel,
.portal-dashboard__panel {
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(11, 37, 69, 0.06);
}

.portal-auth__panel h2,
.portal-dashboard__panel h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-navy);
  margin-bottom: 0.5rem;
}

.portal-auth__intro,
.portal-dashboard__intro {
  color: #475569;
  line-height: 1.6;
}

.portal-auth__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.portal-auth__form .btn {
  align-self: flex-start;
  min-width: 10rem;
}

.portal-auth__notice {
  margin-block: 1.25rem;
  padding: 1rem 1.25rem;
  border-inline-start: 4px solid var(--brand-blue);
  border-radius: 10px;
  background: #f0f7ff;
  border: 1px solid #dbeafe;
  border-inline-start-width: 4px;
  color: #1e3a8a;
  font-size: 0.92rem;
  line-height: 1.6;
}

.portal-dashboard {
  width: min(100%, 54rem);
  margin-inline: auto;
}

.portal-dashboard__empty {
  margin: 1.5rem 0;
  padding: 1.75rem;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  line-height: 1.7;
}

/* Account bar: identity first, sign-out always reachable. */
.portal-dashboard__topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}

.portal-dashboard__identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.portal-dashboard__avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: #eef4ff;
  color: var(--brand-blue);
}

.portal-dashboard__avatar .icon {
  width: 1.4rem;
  height: 1.4rem;
}

.portal-dashboard__user {
  font-weight: 700;
  color: var(--brand-navy);
  overflow-wrap: anywhere;
}

.portal-dashboard__role {
  font-size: 0.85rem;
  color: #64748b;
}

.portal-dashboard__section-title {
  margin-top: 1.6rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-navy);
}

/* Updates & resources feed. */
.portal-updates {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.portal-update {
  padding: 1.15rem 1.35rem;
  border: 1px solid #e2e8f0;
  border-inline-start: 4px solid var(--brand-blue);
  border-radius: 12px;
  background: #fbfdff;
}

.portal-update--resource {
  border-inline-start-color: var(--home-teal-deep, #0e7470);
}

.portal-update--update {
  border-inline-start-color: var(--brand-gold);
}

.portal-update__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  margin-bottom: 0.45rem;
}

.portal-update__kind {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
}

.portal-update__kind .icon {
  width: 1.05rem;
  height: 1.05rem;
}

.portal-update__pinned {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 700;
}

.portal-update__pinned .icon {
  width: 0.95rem;
  height: 0.95rem;
}

.portal-update__title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 0.35rem;
}

.portal-update__body {
  color: #475569;
  line-height: 1.7;
  white-space: pre-line;
}

.portal-update__link {
  margin-top: 0.85rem;
}

.portal-update__date {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: #64748b;
}

.portal-update__link + .portal-update__date {
  margin-top: 0.65rem;
}

/* Quick links to public programme pages. */
.portal-dashboard__links {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.portal-dashboard__links h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-navy);
}

.portal-quicklinks {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.portal-quicklinks a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--brand-blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.portal-quicklinks a .icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

/* Dashboard with sidebar navigation and sectioned workspace. */
.portal-dashboard {
  width: min(100%, 54rem);
  margin-inline: auto;
}

.portal-dashboard--workspace {
  width: min(100%, 72rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.portal-dashboard--workspace .portal-dashboard__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(11, 37, 69, 0.06);
}

.portal-dashboard__greeting {
  min-width: 0;
}

.portal-dashboard__display-name {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
  color: var(--brand-navy);
  overflow-wrap: anywhere;
}

.portal-dashboard__meta {
  margin: 0.15rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  font-size: 0.9rem;
  color: #475569;
}

.portal-dashboard__meta-separator {
  color: #94a3b8;
}

.portal-dashboard__user {
  font-weight: 700;
  color: var(--brand-navy);
}

.portal-dashboard__role {
  color: #64748b;
}

.portal-dashboard__date {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

.portal-dashboard__logout {
  flex: 0 0 auto;
}

.portal-dashboard__nav {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(11, 37, 69, 0.06);
  overflow: hidden;
}

.portal-dashboard__nav-list {
  list-style: none;
  margin: 0;
  padding: 0.65rem;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.portal-dashboard__nav-list::-webkit-scrollbar {
  display: none;
}

.portal-dashboard__nav-list li {
  flex: 0 0 auto;
}

.portal-dashboard__nav-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  color: #475569;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s var(--ease-out), color 0.15s var(--ease-out);
}

.portal-dashboard__nav-list a:hover,
.portal-dashboard__nav-list a:focus-visible {
  background: #f1f5f9;
  color: var(--brand-navy);
  outline: none;
}

.portal-dashboard__nav-list a:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-blue) 25%, transparent);
}

.portal-dashboard__nav-list a .icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.portal-dashboard__body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.portal-dashboard__section {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(11, 37, 69, 0.06);
}

.portal-dashboard__section-title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-navy);
}

.portal-status {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  border-inline-start-width: 4px;
  border-inline-start-color: var(--brand-blue);
  background: #f0f7ff;
  color: #1e3a8a;
  line-height: 1.7;
}

.portal-status__title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
  font-weight: 700;
}

.portal-status__title .icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.portal-workflow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.portal-workflow__item {
  padding: 1rem 1.15rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.portal-workflow__name {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.portal-workflow__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.45rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: #e3f5f3;
  color: var(--home-teal-deep, #0e7470);
  font-size: 0.78rem;
  font-weight: 700;
}

.portal-workflow__status .icon {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
}

.portal-workflow__desc {
  margin: 0;
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.6;
}

.portal-quicklinks__logout {
  display: inline;
  margin: 0;
}

.portal-quicklinks__logout .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.portal-quicklinks__logout .btn .icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

@media (min-width: 901px) {
  .portal-dashboard--workspace {
    grid-template-columns: 15.5rem 1fr;
    align-items: start;
    gap: 1.75rem;
  }

  .portal-dashboard--workspace .portal-dashboard__header {
    grid-column: 1 / -1;
  }

  .portal-dashboard--workspace .portal-dashboard__nav {
    position: sticky;
    top: 1.5rem;
  }

  .portal-dashboard--workspace .portal-dashboard__nav-list {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: visible;
    gap: 0.2rem;
  }

  .portal-dashboard--workspace .portal-dashboard__nav-list li {
    width: 100%;
  }

  .portal-dashboard--workspace .portal-dashboard__nav-list a {
    width: 100%;
    border-radius: 10px;
    justify-content: flex-start;
  }
}

@media (max-width: 639px) {
  .portal-update {
    padding: 1rem 1.05rem;
  }

  .portal-dashboard__topbar .btn,
  .portal-dashboard--workspace .portal-dashboard__header .btn {
    width: 100%;
  }

  .portal-dashboard--workspace .portal-dashboard__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-dashboard--workspace .portal-dashboard__logout {
    width: 100%;
  }
}

/* --- Forms ---------------------------------------------------------------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form__row {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.field__req {
  color: var(--coral-600);
}

.field__hint {
  color: #475569;
  font-weight: 400;
  font-size: 0.85rem;
}

.input {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 1.5px solid #d8e2ec;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}

.input:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal-500) 20%, transparent);
}

.input--area {
  resize: vertical;
  min-height: 8.5rem;
}

.field--error .input {
  border-color: var(--coral-600);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.field__error {
  margin: 0;
  font-size: 0.82rem;
  color: var(--coral-600);
  font-weight: 600;
}

.field--check {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.field--check label {
  flex: 1;
  min-width: 12rem;
  font-weight: 500;
  color: #334155;
  line-height: 1.5;
}

.checkbox {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  accent-color: var(--teal-600);
}

.form__note {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
}

.hp {
  position: absolute;
  inset-inline-start: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  display: flex;
  gap: 0.95rem;
  padding: 1.15rem 1.35rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
}

.alert p {
  margin: 0 0 0.35rem;
  line-height: 1.6;
}

.alert p:last-child {
  margin-bottom: 0;
}

.alert__icon {
  flex: 0 0 auto;
  margin-top: 0.1rem;
}

.alert__title {
  font-weight: 700;
  font-size: 1.02rem;
}

.alert--success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #14532d;
}

.alert--info {
  background: #f0fdfa;
  border-color: #ccfbf1;
  color: #0f766e;
}

.alert--error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.search-form {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
  max-width: 38rem;
}

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1.35rem;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 1.05rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: all 0.18s var(--ease-out);
}

.search-form input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--teal-400);
  box-shadow: 0 0 0 3px rgba(87, 208, 194, 0.35);
}

.search-form .btn {
  border-radius: var(--radius-pill);
  padding-inline: 1.5rem;
}

/* --- Contact / donation --------------------------------------------------- */

.contact-layout {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

.contact-layout__details {
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  background:
    radial-gradient(circle at 85% 15%, rgba(87, 208, 194, 0.12), transparent 45%),
    linear-gradient(145deg, #0d1b2a 0%, #162a45 100%);
  border-radius: 16px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 36px rgba(11, 37, 69, 0.12);
}

.contact-layout__details .section__title {
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.contact-list {
  list-style: none;
  margin: 1.25rem 0 1.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.contact-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-list .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0.45rem;
  border-radius: 10px;
  background: rgba(87, 208, 194, 0.12);
  border: 1px solid rgba(87, 208, 194, 0.25);
  color: #5eead4;
  flex: 0 0 auto;
}

.contact-list__label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #cbd5e1;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.contact-list a {
  overflow-wrap: anywhere;
  color: #f1f5f9;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.18s;
}

.contact-list a:hover {
  color: #5eead4;
  text-decoration: underline;
}

.contact-layout__details .btn--ghost {
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.05);
}

.contact-layout__details .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
}

.contact-layout__form {
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(11, 37, 69, 0.04);
}

.contact-layout__form .section__title {
  margin-bottom: 0.5rem;
}

.panel {
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: var(--white);
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(11, 37, 69, 0.03);
}

.panel--soft {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.detail-list {
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.85rem;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #edf2f7;
}

.detail-list dt {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
  font-weight: 700;
}

.detail-list dd {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand-navy);
  overflow-wrap: anywhere;
}

.review-note {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-top: 3rem;
  padding: 1rem 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.85rem;
  color: #334155;
}

.review-note p {
  margin: 0;
}

.review-note__icon {
  color: var(--teal-600);
  flex: 0 0 auto;
  margin-top: 0.1rem;
}

.review-note__date {
  display: block;
  color: #475569;
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

/* --- Search results ------------------------------------------------------- */

.result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 54rem;
}

.result {
  padding: 1.35rem 1.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 6px rgba(11, 37, 69, 0.02);
  transition: border-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}

.result:hover {
  border-color: #5eead4;
  box-shadow: 0 6px 18px rgba(11, 37, 69, 0.05);
}

.result__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.result__title a {
  text-decoration: none;
  color: var(--brand-navy);
}

.result__title a:hover {
  color: var(--teal-700);
}

.result__text {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.65;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}

.pagination__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1.25rem;
  border: 1.5px solid #d8e2ec;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  text-decoration: none;
  font-weight: 700;
  color: var(--brand-navy);
  background: var(--white);
  box-shadow: 0 2px 6px rgba(11, 37, 69, 0.03);
  transition: all 0.18s var(--ease-out);
}

.pagination__link:hover {
  border-color: var(--teal-500);
  background: #f0fdfa;
  color: var(--teal-800);
}

.pagination__status {
  font-size: 0.92rem;
  font-weight: 600;
  color: #475569;
}

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  background: var(--teal-900);
  color: var(--line);
  padding-block: clamp(2.5rem, 5vw, 4rem) 1.5rem;
  margin-top: auto;
}

.footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.footer__name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.footer__tagline {
  font-size: var(--step--1);
  color: #c5d4e5;
  margin-bottom: 0.9rem;
  max-width: 30ch;
}

.footer__note {
  font-size: 0.8rem;
  color: #a8bed8;
}

.footer__heading {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 0.9rem;
}

.footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: var(--step--1);
}

.footer__list a {
  color: var(--line);
  text-decoration: none;
}

.footer__list a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer__contact li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  overflow-wrap: anywhere;
}

.footer__contact .icon {
  color: var(--gold-500);
  margin-top: 0.15rem;
  width: 1rem;
  height: 1rem;
}

.footer__link {
  display: block;
  width: fit-content;
  margin-top: 0.9rem;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--gold-300);
  text-decoration: none;
}

.footer__link:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer__social {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
}

.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--line);
}

.footer__social a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.footer__portal-text {
  font-size: var(--step--1);
  color: #c5d4e5;
  margin-bottom: 1rem;
}

.footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #a8bed8;
}

.footer__bottom p {
  margin: 0;
}

.footer__disclaimer {
  max-width: 48ch;
}

/* --- Responsive tweaks ---------------------------------------------------- */

@media (max-width: 639px) {
  .hero__actions .btn,
  .cta-panel__actions .btn {
    width: 100%;
  }

  .section__head--row {
    align-items: flex-start;
  }

  .breadcrumbs {
    font-size: 0.75rem;
  }
}

/* --- Entrance motion ------------------------------------------------------ */

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Menus fall from their trigger, not up from below. */
@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero: the first impression, staggered 60ms per line. */
.hero__content > *,
.page-hero__inner > div > * {
  animation: rise-in 300ms var(--ease-out) both;
}

/* The homepage hero moves as one visible block rather than fading out its text. */
@keyframes home-content-rise {
  from {
    transform: translateY(8px);
  }
  to {
    transform: translateY(0);
  }
}

.hero__content > *:nth-child(2),
.page-hero__inner > div > *:nth-child(2) {
  animation-delay: 60ms;
}

.hero__content > *:nth-child(3),
.page-hero__inner > div > *:nth-child(3) {
  animation-delay: 120ms;
}

.hero__content > *:nth-child(4),
.page-hero__inner > div > *:nth-child(4) {
  animation-delay: 180ms;
}

.hero__content > *:nth-child(5) {
  animation-delay: 240ms;
}

/* Mobile menu opens like a panel dropping from the toggle. */
@media (max-width: 1399px) {
  .site-header .header__inner {
    flex-wrap: wrap;
  }

  .site-header .nav[open] {
    flex: 0 0 100%;
  }

  .nav[open] .nav__panel {
    animation: drop-in 180ms var(--ease-out);
  }
}

/* FAQ answers fade up when opened (the chevron already rotates). */
.accordion__item[open] .accordion__answer {
  animation: rise-in 200ms var(--ease-out);
}

/* Form feedback (sent / errors) arrives once, per render. */
.alert {
  animation: rise-in 250ms var(--ease-out) both;
}

/* Keep legacy reveal behavior unchanged outside the homepage. */
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}

html.js-reveal .reveal[data-visible] {
  opacity: 1;
  transform: translateY(0);
}

/* Homepage content is visible even if an observer callback is skipped. The
   observer only removes a small transform; it never gates the text itself. */
body.home-page .reveal {
  opacity: 1;
  transform: translateY(8px);
  transition: transform 360ms var(--ease-out);
}

body.home-page .reveal[data-visible] {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  body.home-page .reveal,
  body.home-page .reveal[data-visible] {
    transform: none;
    transition: none;
  }
}

/* --- Motion / print ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .home-page .hero__content > * {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .announcement,
  .skip-link,
  .nav__toggle,
  .btn {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}

/* ==========================================================================
   CAPER homepage experience
   ========================================================================= */

.home-page .site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: rgba(11, 37, 69, 0.1);
  backdrop-filter: none;
}

.home-page .hero {
  isolation: isolate;
  background:
    radial-gradient(32rem 32rem at 47% 52%, rgba(87, 208, 194, 0.12), transparent 70%),
    linear-gradient(124deg, #071b30 0%, #0b2a49 54%, #135b92 100%);
}

.home-page .hero::before {
  background:
    radial-gradient(35rem 35rem at 11% 18%, rgba(87, 208, 194, 0.12), transparent 68%),
    radial-gradient(28rem 28rem at 92% 92%, rgba(233, 199, 121, 0.09), transparent 70%);
}

.home-page .hero__inner--with-art {
  grid-template-columns: minmax(0, 1.04fr) minmax(19rem, 0.96fr);
  gap: clamp(1rem, 4vw, 3.5rem);
  max-width: 1440px;
  min-height: 35rem;
  padding-block: clamp(3.75rem, 7vw, 6rem);
}

.home-page .hero__content {
  position: relative;
  z-index: 1;
  max-width: 44rem;
  animation: none;
}

.home-page .hero__content > * {
  animation: none;
}

@media (prefers-reduced-motion: no-preference) {
  .home-page .hero__content {
    animation: home-content-rise 300ms var(--ease-out) both;
  }
}

.home-page .hero__title {
  max-width: 14ch;
  font-size: clamp(2.55rem, 4.8vw, 4.65rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.home-page .hero__lead {
  max-width: 39ch;
  font-size: clamp(1.08rem, 1.45vw, 1.3rem);
  line-height: 1.75;
  color: #e3f2f1;
}

.home-page .hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, rgba(217, 185, 120, 0.09), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(14, 116, 112, 0.18), transparent 50%),
    linear-gradient(135deg, #06152b 0%, #0b2545 60%, #0e3456 100%);
  color: #eaf4f2;
}

.home-page .hero__grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

.home-page .hero__ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.home-page .hero__ambient-glow--teal {
  width: 32rem;
  height: 32rem;
  background: rgba(87, 208, 194, 0.14);
  inset-inline-end: 5%;
  top: 15%;
}

.home-page .hero__ambient-glow--gold {
  width: 22rem;
  height: 22rem;
  background: rgba(217, 185, 120, 0.08);
  inset-inline-start: 10%;
  bottom: 10%;
}

.home-page .hero__badge-row {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.95rem;
  background: rgba(87, 208, 194, 0.08);
  border: 1px solid rgba(87, 208, 194, 0.24);
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.home-page .hero__badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--home-teal);
  box-shadow: 0 0 10px var(--home-teal);
}

.home-page .hero__eyebrow-text {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #c0ece5;
  letter-spacing: 0.02em;
}

.home-page .hero__title {
  font-size: clamp(2.35rem, 1.95rem + 2.1vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 1.25rem;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.home-page .hero__lead {
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.25rem);
  color: #dceaf7;
  max-width: 38rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.home-page .hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}

.home-page .hero__actions .btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 0.85rem 1.8rem;
  font-size: 1.025rem;
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out), filter 0.22s var(--ease-out), background-color 0.22s var(--ease-out);
}

.home-page .hero__actions .btn:active {
  transform: translateY(1px);
}

.home-page .hero__actions .btn--primary {
  background: linear-gradient(135deg, #0e7470 0%, #149c96 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px -4px rgba(14, 116, 112, 0.45);
  color: var(--white);
}

.home-page .hero__actions .btn--primary:hover {
  background: linear-gradient(135deg, #108782 0%, #17aba5 100%);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 12px 28px -4px rgba(14, 116, 112, 0.65);
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.home-page .hero__actions .btn--ghost,
.home-page .hero__actions .btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--white);
}

.home-page .hero__actions .btn--ghost:hover,
.home-page .hero__actions .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.38);
  transform: translateY(-2px);
  color: var(--white);
}

.home-page .hero__review-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.8rem;
  padding: 0.45rem 0.95rem;
  background: rgba(11, 37, 69, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.home-page .hero__review-icon {
  display: inline-flex;
  align-items: center;
  color: var(--home-teal);
}

.home-page .hero__review {
  margin: 0;
  font-size: 0.825rem;
  color: #c4d7ec;
}

.home-page .hero__review-tag {
  display: inline-block;
  font-weight: 600;
  color: var(--home-sand);
  margin-inline-end: 0.4rem;
}

.home-page .hero__trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.home-page .hero__trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #b0cce7;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.32rem 0.8rem;
  border-radius: 8px;
}

.home-page .hero__trust-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--home-teal);
}

.home-hero-art {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(100%, 34rem);
  aspect-ratio: 1;
  color: var(--home-teal);
}

.home-hero-art::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(226, 248, 244, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 6rem rgba(87, 208, 194, 0.16), 0 0 3rem rgba(217, 185, 120, 0.08);
  pointer-events: none;
}

.home-hero-art__card {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.1rem;
  background: rgba(6, 21, 43, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.55);
  color: var(--white);
  pointer-events: auto;
}

.home-hero-art__card--top {
  top: 8%;
  inset-inline-start: -2%;
}

.home-hero-art__card--bottom {
  bottom: 8%;
  inset-inline-end: -2%;
}

.home-hero-art__card-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(87, 208, 194, 0.14);
  color: var(--home-teal);
  flex-shrink: 0;
}

.home-hero-art__card-icon--gold {
  background: rgba(217, 185, 120, 0.14);
  color: var(--home-sand);
}

.home-hero-art__card-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
}

.home-hero-art__card-sub {
  display: block;
  font-size: 0.735rem;
  color: #a4c4e2;
  margin-top: 0.1rem;
}

.home-hero-art__svg {
  position: relative;
  width: 100%;
  max-width: 33rem;
  overflow: visible;
}

.home-hero-art__orbit {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

.home-hero-art__orbit-counter {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

@media (prefers-reduced-motion: no-preference) {
  .home-hero-art__orbit {
    animation: home-orbit-rotate 40s linear infinite;
  }

  .home-hero-art__orbit-counter {
    animation: home-orbit-rotate 32s linear infinite reverse;
  }

  .home-hero-art__sonar {
    animation: home-sonar-pulse 3s ease-out infinite;
  }

  .home-hero-art__ring-pulse {
    animation: home-ring-glow 4s ease-in-out infinite alternate;
  }

  .home-hero-art__card--top {
    animation: home-card-float-top 5s ease-in-out infinite alternate;
  }

  .home-hero-art__card--bottom {
    animation: home-card-float-bottom 5.5s ease-in-out infinite alternate;
  }
}

@keyframes home-orbit-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes home-sonar-pulse {
  0% {
    r: 45;
    opacity: 0.7;
    stroke-width: 2;
  }
  70% {
    opacity: 0.3;
  }
  100% {
    r: 95;
    opacity: 0;
    stroke-width: 0.5;
  }
}

@keyframes home-ring-glow {
  0% {
    opacity: 0.2;
    transform: scale(0.96);
  }
  100% {
    opacity: 0.5;
    transform: scale(1.04);
  }
}

@keyframes home-card-float-top {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-8px);
  }
}

@keyframes home-card-float-bottom {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(8px);
  }
}

.home-page .w-block-heading {
  padding-top: clamp(2rem, 4vw, 3.5rem);
}

.home-page .w-block-heading .section__head {
  max-width: 58rem;
  margin-inline: auto;
  text-align: center;
}

.home-page .w-block-heading .section__title {
  font-size: clamp(1.85rem, 1.55rem + 1.2vw, 2.5rem);
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 0.85rem;
  letter-spacing: -0.015em;
}

.home-page .w-block-heading .section__lead {
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  color: #4a5b6e;
  max-width: 44rem;
  margin-inline: auto;
  line-height: 1.75;
}

.home-page .w-block-paragraph {
  position: relative;
  max-width: 68ch;
  margin-inline: auto;
  margin-bottom: 3.5rem;
  padding: 2.25rem 2.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(11, 37, 69, 0.08);
  border-radius: 1.25rem;
  box-shadow: 0 10px 30px -10px rgba(11, 37, 69, 0.05);
  color: var(--ink);
  font-size: clamp(1.02rem, 1.15vw, 1.12rem);
  line-height: 1.88;
}

.home-page .w-block-paragraph::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 35%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--home-sand), transparent);
  border-radius: 2px;
}

.home-page .w-block-cards .section,
.home-page .w-block-partners .section,
.home-page .w-block-stats .stats-band {
  position: relative;
}

.home-page .w-block-cards .section__title,
.home-page .w-block-partners .section__title {
  letter-spacing: -0.02em;
  font-size: clamp(1.85rem, 1.55rem + 1.2vw, 2.5rem);
  color: var(--brand-navy);
}

.home-page .w-block-cards .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-page .w-block-cards .card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(11, 37, 69, 0.09);
  border-radius: 1.25rem;
  padding: 2.25rem 1.8rem;
  box-shadow: 0 4px 20px rgba(11, 37, 69, 0.035);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.home-page .w-block-cards .card::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--home-teal), var(--home-sand));
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
}

.home-page .w-block-cards .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 36px -8px rgba(11, 37, 69, 0.1);
  border-color: rgba(14, 116, 112, 0.3);
}

.home-page .w-block-cards .card:hover::after {
  opacity: 1;
}

.home-page .w-block-cards .card__icon {
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #eef9f7 0%, #dcf4f0 100%);
  color: var(--home-teal-deep);
  box-shadow: 0 4px 12px rgba(14, 116, 112, 0.1);
  margin-bottom: 1.4rem;
  transition: transform 0.25s var(--ease-out);
}

.home-page .w-block-cards .card:hover .card__icon {
  transform: scale(1.06);
}

.home-page .w-block-cards .card__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.home-page .w-block-cards .card__text {
  font-size: 0.95rem;
  color: #4a5b6e;
  line-height: 1.7;
  margin: 0;
}

.home-page .w-block-stats .stats-band {
  position: relative;
  overflow: hidden;
  padding-block: 4.5rem;
  background:
    radial-gradient(circle at 12% 45%, rgba(87, 208, 194, 0.12), transparent 45%),
    radial-gradient(circle at 88% 55%, rgba(217, 185, 120, 0.1), transparent 45%),
    linear-gradient(135deg, #071b30 0%, #0b2545 50%, #0e3456 100%);
  color: #ffffff;
}

.home-page .w-block-stats .stats-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.home-page .w-block-stats .stats-band__heading {
  font-size: clamp(1.6rem, 1.35rem + 1vw, 2.2rem);
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin-bottom: 2.75rem;
  letter-spacing: -0.01em;
}

.home-page .w-block-stats .stats-band__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-page .w-block-stats .stat {
  position: relative;
  padding: 2rem 1.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1.1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: center;
  transition: transform 0.22s var(--ease-out), background-color 0.22s var(--ease-out), border-color 0.22s var(--ease-out);
}

.home-page .w-block-stats .stat:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(87, 208, 194, 0.35);
}

.home-page .w-block-stats .stat__value {
  display: block;
  font-size: clamp(1.65rem, 1.45rem + 0.8vw, 2.25rem);
  font-weight: 700;
  color: var(--home-sand);
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.home-page .w-block-stats .stat__label {
  display: block;
  font-size: 0.925rem;
  color: #c4d7ec;
  line-height: 1.6;
}

.home-page .w-block-partners .section--soft {
  background: var(--home-mist);
}

.home-page .w-block-partners .partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-page .w-block-partners .partner {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 14rem;
  padding: 2.25rem 2rem;
  background: #ffffff;
  border: 1px solid rgba(11, 37, 69, 0.09);
  border-radius: 1.25rem;
  box-shadow: 0 4px 20px rgba(11, 37, 69, 0.04);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.home-page .w-block-partners .partner:nth-child(1) {
  border-top: 3.5px solid var(--brand-navy);
}

.home-page .w-block-partners .partner:nth-child(2) {
  border-top: 3.5px solid var(--home-teal-deep);
}

.home-page .w-block-partners .partner:nth-child(3) {
  border-top: 3.5px solid var(--brand-gold);
}

.home-page .w-block-partners .partner:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px -6px rgba(11, 37, 69, 0.1);
  border-color: rgba(14, 116, 112, 0.25);
}

.home-page .w-block-partners .partner__logo {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  margin-bottom: 1.25rem;
}

.home-page .w-block-partners .partner:nth-child(1) .partner__logo--placeholder {
  background: rgba(11, 37, 69, 0.08);
  color: var(--brand-navy);
}

.home-page .w-block-partners .partner:nth-child(2) .partner__logo--placeholder {
  background: rgba(14, 116, 112, 0.1);
  color: var(--home-teal-deep);
}

.home-page .w-block-partners .partner:nth-child(3) .partner__logo--placeholder {
  background: rgba(184, 137, 59, 0.12);
  color: var(--brand-gold);
}

.home-page .w-block-partners .partner__name {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.4;
  margin-bottom: 0.65rem;
}

.home-page .w-block-partners .partner__name a {
  color: var(--brand-navy);
  text-decoration: none;
}

.home-page .w-block-partners .partner__name a:hover {
  color: var(--home-teal-deep);
}

.home-page .w-block-partners .partner__text {
  font-size: 0.925rem;
  color: #4a5b6e;
  line-height: 1.68;
  margin: 0;
}

.home-page .news-card {
  background: #ffffff;
  border: 1px solid rgba(11, 37, 69, 0.09);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(11, 37, 69, 0.04);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.home-page .news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px -8px rgba(11, 37, 69, 0.1);
  border-color: rgba(14, 116, 112, 0.25);
}

.home-page .news-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.home-page .news-card__placeholder {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(232, 249, 246, 0.95);
}

.home-page .news-card__placeholder--announcement {
  background:
    radial-gradient(circle at 75% 30%, rgba(217, 185, 120, 0.35), transparent 50%),
    linear-gradient(135deg, #07192f 0%, #102e52 55%, #76521d 100%);
}

.home-page .news-card__placeholder--awareness {
  background:
    radial-gradient(circle at 25% 70%, rgba(87, 208, 194, 0.38), transparent 50%),
    linear-gradient(135deg, #051427 0%, #0c3848 50%, #0e7470 100%);
}

.home-page .news-card__placeholder--screening {
  background:
    radial-gradient(circle at 80% 25%, rgba(87, 208, 194, 0.35), transparent 50%),
    linear-gradient(135deg, #06152b 0%, #0e3456 55%, #137a7f 100%);
}

.home-page .news-card__placeholder svg {
  width: 65%;
  max-width: 180px;
  height: auto;
  opacity: 0.95;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s var(--ease-out);
}

.home-page .news-card:hover .news-card__placeholder svg {
  transform: scale(1.06);
}

.home-page .news-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.5rem 1.6rem 1.65rem;
}

.home-page .news-card__body .chip {
  align-self: flex-start;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.home-page .news-card__title {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

.home-page .news-card__title a {
  color: var(--brand-navy);
  text-decoration: none;
  transition: color 0.18s var(--ease-out);
}

.home-page .news-card__title a:hover {
  color: var(--home-teal-deep);
}

.home-page .news-card__excerpt {
  font-size: 0.925rem;
  color: #4a5b6e;
  line-height: 1.65;
  margin: 0;
}

.home-page .news-card__body .meta {
  font-size: 0.825rem;
  color: #4a5b6e;
  margin: 0;
  padding-top: 0.35rem;
}

.home-page .portal-band--utility {
  position: relative;
  overflow: hidden;
  margin-block: 2.5rem;
  background:
    radial-gradient(circle at 95% 15%, rgba(87, 208, 194, 0.1), transparent 35%),
    linear-gradient(135deg, #ffffff 0%, #f4f9f8 100%);
  border: 1px solid rgba(14, 116, 112, 0.18);
  border-radius: 1.5rem;
  box-shadow: 0 12px 32px -8px rgba(11, 37, 69, 0.08);
}

.home-page .portal-band--utility::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-navy), var(--home-teal), var(--brand-gold));
}

.home-page .portal-band--utility .portal-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(2rem, 4vw, 3rem);
}

.home-page .portal-band--utility .portal-band__title {
  font-size: clamp(1.4rem, 1.25rem + 0.6vw, 1.85rem);
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 0.5rem;
}

.home-page .portal-band--utility .portal-band__text {
  font-size: 1rem;
  color: #4a5b6e;
  max-width: 42rem;
  line-height: 1.7;
  margin: 0;
}

.home-page .portal-band--utility .btn--light {
  background: var(--brand-navy);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(11, 37, 69, 0.22);
  transition: all 0.22s var(--ease-out);
}

.home-page .portal-band--utility .btn--light:hover {
  background: #11325d;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(11, 37, 69, 0.32);
}

.home-page .site-footer {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 6vw, 5rem) 2rem;
  background:
    radial-gradient(32rem 24rem at 92% 5%, rgba(87, 208, 194, 0.08), transparent 70%),
    linear-gradient(135deg, #051427 0%, #091f3a 60%, #0b2545 100%);
  color: #ffffff;
}

.home-page .site-footer::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--home-teal), var(--home-sand), transparent);
  opacity: 0.9;
}

.home-page .footer__heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: #bfece6;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.home-page .footer__list a {
  color: #d2e4f7;
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.18s var(--ease-out);
}

.home-page .footer__list a:hover {
  color: var(--home-sand);
}

.home-page .footer__contact span,
.home-page .footer__contact a {
  color: #d2e4f7;
  font-size: 0.92rem;
}

.home-page .footer__bottom {
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: #8faec9;
  font-size: 0.85rem;
}

.home-page .footer__disclaimer {
  max-width: 48rem;
  line-height: 1.6;
  color: #7f9ebc;
}

/* Site-wide editorial masthead at desktop widths; narrower screens retain the
   native disclosure menu and its existing keyboard flow. */
.home-desktop-nav {
  display: none;
}

@media (min-width: 1360px) {
  .site-header .header__inner {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    padding-block: 0.55rem 0.65rem;
  }

  .nav {
    display: none;
  }

  .home-desktop-nav {
    display: flex;
    flex: 0 0 100%;
    order: 2;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    padding-block: 0.5rem 0;
    border-top: 1px solid rgba(11, 37, 69, 0.08);
  }

  .home-desktop-nav__pages {
    flex: 1 1 auto;
    min-width: 0;
  }

  .home-desktop-nav__list {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
  }

  .home-desktop-nav__list a {
    display: block;
    min-height: 44px;
    padding: 0.5rem 0.45rem;
    border-bottom: 2px solid transparent;
    color: #27384c;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color 150ms var(--ease-out), border-color 150ms var(--ease-out);
  }

  .home-desktop-nav__list a:hover,
  .home-desktop-nav__list a[aria-current="page"] {
    color: var(--brand-navy);
    border-bottom-color: var(--home-teal-deep, #0e7470);
  }

  .home-desktop-nav__utility {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.45rem;
  }

  .home-desktop-nav__search {
    width: 8rem;
    padding-inline: 0.6rem 0.2rem;
    background: #f8fafc;
    border: 1px solid #d3deec;
    border-radius: 8px;
    transition: width 0.22s var(--ease-out);
  }

  .home-desktop-nav__search:focus-within {
    width: 10.5rem;
    border-color: var(--brand-blue);
  }

  .home-desktop-nav__search input {
    font-size: 0.8rem;
  }

  .home-desktop-nav__search .nav__search-button {
    width: 2rem;
  }

  .home-desktop-nav .portal-entry-links {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .home-desktop-nav .portal-entry-links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s var(--ease-out);
  }

  .home-desktop-nav .portal-entry-links a[href*="doctor"] {
    background: rgba(14, 116, 112, 0.08);
    color: #0e7470;
    border: 1px solid rgba(14, 116, 112, 0.22);
  }

  .home-desktop-nav .portal-entry-links a[href*="doctor"]:hover {
    background: rgba(14, 116, 112, 0.16);
    border-color: rgba(14, 116, 112, 0.4);
  }

  .home-desktop-nav .portal-entry-links a[href*="patient"] {
    background: rgba(23, 102, 194, 0.08);
    color: #1766c2;
    border: 1px solid rgba(23, 102, 194, 0.22);
  }

  .home-desktop-nav .portal-entry-links a[href*="patient"]:hover {
    background: rgba(23, 102, 194, 0.16);
    border-color: rgba(23, 102, 194, 0.4);
  }

  .home-desktop-nav .participant-gateway-link {
    margin-inline-start: 0.25rem;
  }

  .home-desktop-nav .portal-entry-links__gateway {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, #0b2545 0%, #153762 100%);
    color: #ffffff !important;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 6px rgba(11, 37, 69, 0.18);
    transition: all 0.18s var(--ease-out);
  }

  .home-desktop-nav .portal-entry-links__gateway:hover {
    background: linear-gradient(135deg, #11325d 0%, #1d4678 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 37, 69, 0.28);
  }

  .home-desktop-nav .lang-switch a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0.35rem 0.65rem;
    background: #f1f5f9;
    border: 1px solid #d8e2ec;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #12233a;
    transition: all 0.18s var(--ease-out);
  }

  .home-desktop-nav .lang-switch a:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
  }
}

@media (min-width: 800px) and (max-width: 1359px) {
  .home-page .hero__inner--with-art {
    grid-template-columns: minmax(0, 1.08fr) minmax(15rem, 0.92fr);
  }
}

@media (max-width: 799px) {
  .home-page .hero__inner--with-art {
    position: relative;
    display: block;
    min-height: 0;
    padding-block: clamp(2.5rem, 10vw, 4.5rem);
  }

  .home-page .hero__content {
    max-width: 42rem;
  }

  .home-page .home-hero-art {
    position: absolute;
    z-index: -1;
    inset-block: 0;
    inset-inline-start: -15%;
    width: 80%;
    opacity: 0.16;
  }

  .home-page .home-hero-art__card {
    display: none;
  }

  .home-page .hero__title {
    max-width: 16ch;
    font-size: clamp(2rem, 1.7rem + 2vw, 2.6rem);
  }

  .home-page .hero__lead {
    max-width: 38ch;
  }

  .home-page .hero__trust-pills {
    gap: 0.45rem;
  }

  .home-page .hero__trust-pill {
    font-size: 0.75rem;
    padding: 0.28rem 0.65rem;
  }

  .home-page .w-block-paragraph {
    max-width: 64ch;
    padding: 1.6rem 1.5rem;
    margin-bottom: 2.5rem;
  }

  .home-page .footer__grid {
    gap: 1.6rem;
  }
}

@media (max-width: 639px) {
  .home-page .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .home-page .hero__actions .btn {
    min-height: 48px;
    justify-content: center;
    width: 100%;
  }

  .home-page .news-card__body {
    padding: 1.15rem 1.2rem 1.35rem;
  }

  .home-page .portal-band--utility .btn--light {
    width: 100%;
    justify-content: center;
  }

  .home-page .w-block-cards .card {
    padding: 1.75rem 1.4rem;
  }

  .home-page .w-block-partners .partner {
    padding: 1.75rem 1.4rem;
    min-height: auto;
  }

  .home-page .w-block-stats .stat {
    padding: 1.5rem 1.25rem;
  }
}

@media (max-width: 360px) {
  .home-page .hero__badge-row {
    padding: 0.25rem 0.65rem;
    max-width: 100%;
  }

  .home-page .hero__eyebrow-text {
    font-size: 0.75rem;
  }

  .home-page .hero__title {
    font-size: 1.85rem;
  }

  .home-page .w-block-paragraph {
    padding: 1.25rem 1rem;
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   Doctor Workspace — patient directory and patient record
   ========================================================================== */

.portal-clinic {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.portal-clinic__notice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--gold-300);
  border-radius: 12px;
  background: #fdf8ef;
  color: var(--gold-600);
  font-size: 0.92rem;
  line-height: 1.7;
}

.portal-clinic__notice .icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  margin-top: 0.2rem;
}

.portal-clinic__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.portal-clinic__search {
  flex: 1 1 22rem;
  min-width: 0;
}

.portal-clinic__label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
  color: var(--brand-navy);
  font-size: 0.95rem;
}

.portal-clinic__field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--white);
  transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}

.portal-clinic__field:focus-within {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-blue) 22%, transparent);
}

.portal-clinic__field-icon {
  display: inline-flex;
  color: var(--brand-muted);
}

.portal-clinic__field-icon .icon {
  width: 1.05rem;
  height: 1.05rem;
}

.portal-clinic__field input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
  padding: 0.45rem 0.25rem;
}

.portal-clinic__field input:focus {
  outline: none;
}

.portal-clinic__field .btn {
  flex: 0 0 auto;
}

.portal-clinic__count {
  margin: 0;
  font-size: 0.92rem;
  color: var(--brand-muted);
}

.portal-clinic__count strong {
  color: var(--brand-navy);
}

.portal-clinic__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.patient-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) auto;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: clamp(1rem, 2.5vw, 1.35rem);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(11, 37, 69, 0.06);
}

.patient-card__identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.patient-card__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--teal-050);
  color: var(--brand-blue);
}

.patient-card__avatar .icon {
  width: 1.35rem;
  height: 1.35rem;
}

.patient-card__who {
  min-width: 0;
}

.patient-card__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-navy);
  overflow-wrap: anywhere;
}

.patient-card__name a {
  color: inherit;
  text-decoration: none;
}

.patient-card__name a:hover,
.patient-card__name a:focus-visible {
  color: var(--brand-blue);
}

.patient-card__name a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-blue) 25%, transparent);
  border-radius: 4px;
}

.patient-card__code {
  margin: 0.2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--brand-muted);
  font-variant-numeric: tabular-nums;
}

.patient-card__facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.patient-card__fact dt {
  font-size: 0.78rem;
  color: var(--brand-muted);
  margin-bottom: 0.15rem;
}

.patient-card__fact dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-ink);
  overflow-wrap: anywhere;
}

.patient-card__open {
  justify-self: end;
  white-space: nowrap;
}

/* Badges ---------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: #f1f5f9;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: anywhere;
}

.badge--info {
  border-color: #cfe4fb;
  background: var(--brand-blue-soft);
  color: #1e4f9c;
}

.badge--ok {
  border-color: #c8ead8;
  background: #eaf7f1;
  color: #10694b;
}

.badge--warn {
  border-color: #f5dcc0;
  background: #fdf3e7;
  color: #8a4b12;
}

.badge--muted {
  border-color: var(--gold-300);
  background: #fdf8ef;
  color: var(--gold-600);
}

/* Empty states, pager, back link ---------------------------------------- */

.portal-clinic__empty {
  margin: 0;
}

.portal-clinic__pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.portal-clinic__pager-status {
  font-size: 0.9rem;
  color: var(--brand-muted);
  font-variant-numeric: tabular-nums;
}

.portal-clinic__back {
  margin: 0;
}

.portal-clinic__back .btn .icon {
  width: 1rem;
  height: 1rem;
}

/* Patient record -------------------------------------------------------- */

.patient-record__code {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.patient-panel {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(11, 37, 69, 0.06);
}

.patient-panel__title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-navy);
}

.patient-panel__intro {
  margin: -0.5rem 0 1rem;
  color: var(--brand-muted);
  font-size: 0.95rem;
}

.patient-panel__grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1rem 1.25rem;
}

.patient-panel__item {
  min-width: 0;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed var(--line);
}

.patient-panel__item dt {
  font-size: 0.8rem;
  color: var(--brand-muted);
  margin-bottom: 0.2rem;
}

.patient-panel__item dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-ink);
  overflow-wrap: anywhere;
}

.patient-panel__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
}

.patient-panel__status-label {
  font-weight: 700;
  color: var(--brand-ink);
}

.patient-panel__note {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--teal-050);
  border: 1px solid #dbeafe;
  color: #1e3a8a;
  font-size: 0.92rem;
  line-height: 1.7;
}

.patient-panel__note .icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  margin-top: 0.2rem;
}

.patient-panel__note + .portal-status {
  margin-top: 0.85rem;
}

/* Timeline -------------------------------------------------------------- */

.patient-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.patient-timeline::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.4rem;
  inset-block: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--brand-blue), color-mix(in srgb, var(--brand-blue) 15%, transparent));
  border-radius: 2px;
}

.patient-timeline__item {
  position: relative;
  padding-inline-start: 1.85rem;
}

.patient-timeline__marker {
  position: absolute;
  inset-inline-start: 0;
  top: 0.4rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 2px solid var(--brand-blue);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--white);
}

.patient-timeline__body {
  padding: 0.9rem 1.05rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fbfdff;
}

.patient-timeline__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  color: var(--brand-muted);
}

.patient-timeline__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand-navy);
  overflow-wrap: anywhere;
}

.patient-timeline__text {
  margin: 0.4rem 0 0;
  color: var(--brand-ink);
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.patient-timeline__author {
  margin: 0.55rem 0 0;
  font-size: 0.83rem;
  color: var(--brand-muted);
}

/* Responsive ------------------------------------------------------------ */

@media (max-width: 900px) {
  .patient-card {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .patient-card__facts {
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  }

  .patient-card__open {
    justify-self: stretch;
    text-align: center;
  }
}

@media (max-width: 700px) {
  .portal-clinic__field {
    flex-wrap: wrap;
    border-radius: 16px;
    padding: 0.5rem;
  }

  .portal-clinic__field input {
    flex: 1 1 8rem;
  }

  .portal-clinic__field .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .portal-clinic__toolbar {
    align-items: stretch;
  }

  .patient-panel__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-clinic__field {
    transition: none;
  }
}

/* Registration form ------------------------------------------------------ */

.portal-clinic__action {
  margin: 0;
}

.portal-clinic__action .btn .icon {
  width: 1.05rem;
  height: 1.05rem;
}

.portal-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.portal-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem 1.25rem;
}

.portal-form__field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.portal-form__field--wide {
  grid-column: 1 / -1;
}

.portal-form label {
  font-weight: 700;
  color: var(--brand-navy);
  font-size: 0.95rem;
}

.portal-form .req {
  color: var(--brand-danger);
  text-decoration: none;
  border: 0;
}

.portal-form .input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  font: inherit;
  color: var(--ink);
  min-height: 2.75rem;
}

.portal-form .input:focus-visible {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-blue) 22%, transparent);
}

.portal-form__consent {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.portal-form__consent label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--brand-ink);
  line-height: 1.8;
}

.portal-form__consent .checkbox {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  margin-top: 0.2rem;
  accent-color: var(--brand-blue);
}

.portal-form__error {
  margin: 0;
  color: var(--brand-danger);
  font-size: 0.9rem;
  font-weight: 600;
}

.portal-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.portal-dup {
  padding: clamp(1rem, 2.5vw, 1.35rem);
  border: 1px solid #f5dcc0;
  border-radius: 14px;
  background: #fdf8ef;
}

.portal-dup__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gold-600);
}

.portal-dup__title .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.portal-dup__text {
  margin: 0 0 1rem;
  color: #5a4315;
  line-height: 1.8;
}

@media (max-width: 700px) {
  .portal-form__actions .btn {
    flex: 1 1 100%;
    justify-content: center;
    text-align: center;
  }
}

/* Portal account administration ----------------------------------------- */

.portal-accounts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.portal-accounts__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.portal-accounts__bar form {
  margin: 0;
}

.portal-accounts__identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
}

.portal-accounts__name {
  font-weight: 800;
  color: var(--brand-navy);
  overflow-wrap: anywhere;
}

.portal-accounts__messages {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-accounts__message {
  padding: 0.7rem 1rem;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 700;
  line-height: 1.7;
}

.portal-accounts__message--error {
  border-color: #f5c6c6;
  background: #fdf1f1;
  color: #991b1b;
}

.portal-accounts__panel {
  padding: clamp(1rem, 2.5vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white, #fff);
}

.portal-accounts__panel > h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-navy);
}

.portal-accounts__intro {
  margin: 0 0 1.25rem;
  color: #475569;
  line-height: 1.8;
}

.portal-accounts__hint {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.75;
}

.portal-account-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-account {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
}

.portal-account--disabled {
  border-style: dashed;
}

.portal-account__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.portal-account__username {
  font-weight: 800;
  color: var(--brand-navy);
  overflow-wrap: anywhere;
}

.portal-account__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.5rem 1rem;
  margin: 0;
  font-size: 0.88rem;
}

.portal-account__facts dt {
  color: #64748b;
  font-weight: 600;
}

.portal-account__facts dd {
  margin: 0;
  font-weight: 700;
  color: var(--brand-ink);
  overflow-wrap: anywhere;
}

.portal-account__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.portal-account__actions form {
  margin: 0;
}

/* Account administration audit trail ------------------------------------ */

.portal-activity {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-activity__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.6rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 0.9rem;
}

.portal-activity__when {
  color: #64748b;
  font-weight: 600;
}

.portal-activity__label {
  font-weight: 700;
  color: var(--brand-navy);
}

.portal-activity__target {
  font-weight: 700;
  color: var(--brand-ink);
  overflow-wrap: anywhere;
}

.portal-activity__who {
  color: #64748b;
  overflow-wrap: anywhere;
}

/* Assignment management --------------------------------------------------- */

.portal-accounts__bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.portal-accounts__bar-actions form {
  margin: 0;
}

.portal-accounts__notice {
  margin: 0;
}

.portal-form--inline {
  flex-direction: row;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}

.portal-form--inline .portal-form__field {
  flex: 1 1 12rem;
  max-width: 20rem;
}

.portal-assign__result {
  margin: 1rem 0 0;
}

.portal-assign__loads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-assign__load {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
}

/* Patient appointments (from the stored event history) ------------------- */

.patient-panel__subtitle {
  margin: 1rem 0 0.4rem;
  font-size: 1rem;
  color: var(--brand-navy);
}

.patient-appointments {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.patient-appointments__item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  overflow-wrap: anywhere;
}

.patient-appointments__item time {
  font-weight: 700;
  color: var(--brand-navy);
}

@media (max-width: 700px) {
  .portal-accounts__bar {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-account__actions .btn {
    flex: 1 1 100%;
    justify-content: center;
    text-align: center;
  }
}
