/* =========================================================
   Long Island Dermatological Society
   Stylesheet — modern, accessible, print-friendly
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Color */
  --color-bg: #ffffff;
  --color-surface: #f6f3ec;
  --color-surface-2: #faf8f3;
  --color-text: #15202b;
  --color-text-muted: #475461;       /* darkened slightly for AAA contrast on cream */
  --color-border: #e5e7eb;           /* uniform per audit spec */
  --color-primary: #0d4f6e;          /* deep medical teal */
  --color-primary-dark: #083749;
  --color-primary-tint: #e6eff3;
  --color-accent: #b8864b;           /* warm gold — used sparingly: hover, badge, eyebrow */
  --color-accent-dark: #8e641f;
  --color-accent-tint: #f4ead4;
  --color-slate: #475569;            /* slate-blue — used for directory language tags */
  --color-slate-tint: #e2e8f0;
  --color-focus: #2563eb;
  --color-danger: #b3261e;
  --color-link: #0d4f6e;
  --color-link-hover: #b8864b;       /* gold hover for inline links */

  /* Type */
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Layout */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --container: 72rem;                /* legacy alias */
  --container-max: 1200px;           /* single source of truth for max content width */
  --container-narrow: 48rem;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-header: 0 1px 3px rgba(15, 23, 42, 0.04);

  /* Section rhythm — replaces ad-hoc 4rem/6rem block padding */
  --section-pad: clamp(56px, 8vw, 96px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;       /* 17px */
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--color-link-hover); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0 0 var(--space-4);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }
li + li { margin-top: var(--space-2); }

blockquote {
  margin: var(--space-5) 0;
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--color-accent);
  background: var(--color-accent-tint);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-text);
}

hr {
  border: 0;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-7) 0;
}

::selection { background: var(--color-primary); color: #fff; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transform: translateY(-150%);
  transition: transform 0.2s;
  z-index: 1000;
}
.skip-link:focus { transform: translateY(0); color: #fff; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-pad); }
.section--tight { padding-block: calc(var(--section-pad) * 0.6); }
.section--surface { background: var(--color-surface); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-header);              /* subtle separation from hero */
}
.site-header__inner {
  display: flex;
  align-items: center;                           /* logo + nav share vertical center */
  justify-content: space-between;
  gap: var(--space-5);
  min-height: 80px;                              /* generous room for the larger brand text */
  padding-block: var(--space-3);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
  max-width: 60ch;                               /* prevent runaway brand text on wide screens */
}
.brand:hover { color: var(--color-text); }
.brand__mark {
  /* Official LIDS crest used as the header mark.
     Background-image keeps the per-page HTML markup unchanged across all 11 pages —
     the inline "LIDS" text is collapsed via font-size:0 but still exists in DOM as fallback. */
  flex-shrink: 0;
  width: 48px; height: 48px;
  background: url('../img/lids-logo.png') center/contain no-repeat;
  color: transparent;
  font-size: 0;
  line-height: 0;
}
.brand__text { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; min-width: 0; }
.brand__title {
  font-family: var(--font-serif);
  font-size: 1.1875rem;                            /* bumped from 1.0625rem for readability */
  font-weight: 600;
  letter-spacing: -0.005em;
  /* Wrap to at most two lines on desktop */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.brand__sub   { font-size: 0.75rem; color: var(--color-text-muted); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }

/* Nav */
.primary-nav { display: flex; align-items: center; gap: var(--space-2); }
.primary-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-1);
  align-items: center;
}
.primary-nav__link {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;                            /* keep "For Patients" on one line */
  border-bottom: 2px solid transparent;           /* reserve space so :hover/active don't shift */
}
.primary-nav__link:hover { background: var(--color-surface); color: var(--color-primary-dark); }
.primary-nav__link[aria-current="page"] {
  color: var(--color-primary-dark);
  background: transparent;                        /* replaces filled pill */
  border-bottom-color: var(--color-primary);      /* 2px underline indicator */
  border-radius: 0;
  font-weight: 600;
}

/* Mobile menu */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  align-items: center;
  gap: var(--space-2);
}
.nav-toggle__icon {
  width: 18px; height: 2px;
  background: currentColor;
  position: relative;
}
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px; height: 2px;
  background: currentColor;
}
.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after  { top:  6px; }

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-4) var(--space-5);
    display: none;
    box-shadow: var(--shadow-md);
  }
  .primary-nav[data-open="true"] { display: block; }
  .primary-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav__link {
    padding: var(--space-3);
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
  }
  .primary-nav__list li:last-child .primary-nav__link { border-bottom: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  /* Normalized per audit: identical padding + 48px hit target for both primary and ghost */
  padding: 0.875rem 1.5rem;
  min-height: 48px;
  background: var(--color-primary);
  color: #fff;
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-md);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);              /* 1.5px navy outline */
}
.btn--ghost:hover { background: var(--color-primary-tint); color: var(--color-primary-dark); border-color: var(--color-primary-dark); }
.btn--accent {
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.btn--accent:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;                               /* clip decorative SVG */
  padding-block: clamp(3rem, 5vw + 1rem, 6rem);
  background:
    radial-gradient(1200px 500px at 90% -10%, var(--color-accent-tint) 0%, transparent 60%),
    radial-gradient(900px 600px at -10% 110%, var(--color-primary-tint) 0%, transparent 55%),
    var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
}
.hero .container { position: relative; z-index: 1; }   /* keep copy above the decoration */
.hero__inner {
  /* Balanced two-column grid: copy ~58%, seal ~42% — feels paired, not lopsided. */
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr);
  align-items: center;
  gap: var(--space-7);
}
@media (max-width: 768px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-5); text-align: center; }
  .hero__inner .hero__title,
  .hero__inner .hero__lead { margin-inline: auto; }
  .hero__inner .hero__actions { justify-content: center; }
  .hero__decoration { display: none; }
}
.hero__decoration {
  /* Legacy abstract coastline SVG kept for any other page that might reuse it. */
  width: clamp(220px, 28vw, 360px);
  height: auto;
  opacity: 0.9;
  justify-self: end;
}
.hero__logo-frame {
  /* Soft circular halo in the site's primary navy tint — ties the B&W crest to the palette
     (point 3) and gives the seal a visual container (point 2). */
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3vw, 36px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 79, 110, 0.10) 0%, rgba(184, 134, 75, 0.06) 55%, transparent 75%);
}
.hero__logo {
  display: block;
  /* Smaller than before (was clamp(180px, 22vw, 280px)) so it pairs with the headline (point 4). */
  width: clamp(160px, 18vw, 240px);
  height: auto;
}
.hero__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin-bottom: var(--space-4);
  font-weight: 600;
}
.hero__title { max-width: 36ch; margin-bottom: var(--space-4); }
.hero__lead {
  max-width: 60ch;
  font-size: 1.1875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------- Card grids ---------- */
.card-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch;                             /* paired with .card height:100% */
}
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  /* Even card heights — children stretch and CTA pins to bottom */
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card--link { text-decoration: none; color: inherit; }
.card--link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
  color: inherit;
}
.card__icon {
  /* 24px lucide-style stroke icon in primary navy, sits above the title */
  width: 24px; height: 24px;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.card__title { margin-bottom: var(--space-2); font-size: 1.125rem; }
.card__meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: var(--space-3); }
.card__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: auto;                                /* push to bottom for even card heights */
  padding-top: var(--space-4);
  font-weight: 500;                                /* per audit — distinct from heavier .btn */
  color: var(--color-link);
  text-decoration: none;
}
.card--link:hover .card__cta { color: var(--color-link-hover); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Upcoming meeting cards (announcements) ---------- */
.card--event {
  border-top: 3px solid var(--color-primary);       /* event "ticket" accent */
  transition: transform 0.15s, box-shadow 0.15s, border-top-color 0.15s;
}
.card--event:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--color-accent);
}
.event__date {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent-dark);                  /* warm gold date line */
  margin-bottom: var(--space-2);
}
.event__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.25;
  margin-bottom: var(--space-2);
}
.event__speaker { margin-bottom: var(--space-3); }
.event__venue {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.event__venue svg { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--color-primary); }
.event__venue p { margin: 0; }
.event__badge {
  display: inline-flex;
  align-self: flex-start;                            /* hug content, don't stretch */
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-primary-dark);
  background: var(--color-primary-tint);
  border-radius: 999px;
}
.event__cta {
  margin-top: auto;                                  /* pin button to bottom, even heights */
  align-self: flex-start;
}

/* ---------- Next Meeting card (home) ---------- */
.meeting-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-5);
  align-items: center;
  background: var(--color-accent-tint);
  border: 1px solid #e9d8a4;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 540px) {
  .meeting-card { grid-template-columns: 1fr; }
  .meeting-card .date-badge { justify-self: start; }
}
.date-badge {
  /* Stacked month/day pill, used for Next Meeting */
  display: inline-grid;
  grid-template-rows: auto auto;
  text-align: center;
  width: 72px;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-serif);
}
.date-badge__month {
  background: var(--color-accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0;
  line-height: 1;
}
.date-badge__day {
  font-size: 2rem;
  font-weight: 700;
  padding: 0.4rem 0 0.5rem;
  line-height: 1;
}
.meeting-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-3);
  align-items: center;
}
.meeting-card__link {
  font-weight: 500;
  color: var(--color-link);
  text-decoration: none;
}
.meeting-card__link:hover { color: var(--color-link-hover); text-decoration: underline; text-underline-offset: 3px; }
.meeting-card__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--color-accent-dark);                /* accent-on-accent eyebrow */
  margin-bottom: var(--space-2);
}

/* ---------- Page header ---------- */
.page-header {
  padding-block: var(--space-7) var(--space-6);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.page-header__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.page-header__title { margin-bottom: var(--space-3); }
.page-header__lead { max-width: 65ch; color: var(--color-text-muted); font-size: 1.125rem; margin: 0; }

/* ---------- Prose ---------- */
.prose { max-width: 65ch; }
.prose h2 { margin-top: var(--space-7); }
.prose h3 { margin-top: var(--space-6); }
.prose ul li::marker { color: var(--color-primary); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: var(--space-5) 0;
}
caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: var(--space-3);
  color: var(--color-text-muted);
}
th, td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
thead th {
  background: var(--color-surface);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
tbody tr:hover { background: var(--color-surface-2); }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-4); max-width: 36rem; }
.form__row { display: grid; gap: var(--space-2); }
.form__row--two { display: grid; gap: var(--space-4); grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .form__row--two { grid-template-columns: 1fr; } }
.form label { font-weight: 600; font-size: 0.95rem; }
.form .hint { font-size: 0.85rem; color: var(--color-text-muted); }
.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form textarea,
.form select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-tint);
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}
.form textarea { min-height: 9rem; resize: vertical; }

/* ---------- Callout / notices ---------- */
.callout {
  padding: var(--space-5);
  background: var(--color-primary-tint);
  border: 1px solid #cfe0e8;
  border-radius: var(--radius-md);
  margin: var(--space-5) 0;
}
.callout--warning {
  background: var(--color-accent-tint);
  border-color: #e9d8a4;
}
.callout strong { color: var(--color-primary-dark); }

/* ---------- Timeline (history) ---------- */
.timeline {
  list-style: none;
  margin: var(--space-6) 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 0; bottom: 0;
  width: 2px;
  background: var(--color-border);
}
.timeline li {
  position: relative;
  padding-left: var(--space-6);
  padding-bottom: var(--space-5);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 16px; height: 16px;
  background: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 0 4px #fff;
}
.timeline time {
  display: block;
  font-weight: 700;
  color: var(--color-primary-dark);
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: #d6e4ec;
  padding-block: var(--space-7) var(--space-5);
  margin-top: var(--space-9);
}
.site-footer a { color: #ffffff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer__contact-item {
  /* Two-column row: 16px icon + text, vertically centered */
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.site-footer__icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  opacity: 0.85;
}
.site-footer__grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: var(--space-6);
}
.site-footer h2 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
  font-family: var(--font-sans);
  font-weight: 700;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: var(--space-2); }
.site-footer__seal-wrap {
  /* Ceremonial sign-off: centered LIDS crest acts as a quiet visual anchor for the footer.
     Sits between the link columns and the copyright row on every page. */
  text-align: center;
  padding-block: var(--space-5) var(--space-4);
}
.site-footer__seal {
  display: inline-block;
  width: 96px;
  height: auto;
  /* Transparent PNG: invert flips the black crest to white for the dark navy footer.
     Background is already transparent, so no blend-mode hack needed. */
  filter: invert(1) brightness(1.05);
  opacity: 0.9;
}
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #aebccb;
}

/* ---------- Membership directory ---------- */
.directory-toolbar {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.directory-search {
  position: relative;
  max-width: 32rem;
}
.directory-search__input {
  width: 100%;
  padding: 0.7rem 0.85rem 0.7rem 2.5rem;
  font: inherit;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.directory-search__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-tint);
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}
.directory-search__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
}
.directory-filters {
  display: grid;
  gap: var(--space-3);
}
.directory-filters__group { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.directory-filters__label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-right: var(--space-2);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  background: #fff;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.chip:hover { border-color: var(--color-primary); }
.chip[aria-pressed="true"] {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.chip__count {
  font-size: 0.75rem;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

.directory-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
  font-size: 0.95rem;
}
.directory-status__count { font-weight: 600; color: var(--color-text); }

.member-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.member-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.member-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.member-card__header {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.member-card__heading { flex: 1; min-width: 0; }
.member-card__avatar {
  flex-shrink: 0;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
}
.member-card__name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.25;
}
.member-card__practice {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-top: 2px;
}
.member-card__block { display: grid; gap: 6px; font-size: 0.95rem; }
.member-card__row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: var(--space-2);
  align-items: start;
}
.member-card__row svg {
  width: 16px; height: 16px;
  color: var(--color-text-muted);
  margin-top: 3px;
}
.member-card__row a { word-break: break-word; }
.member-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.member-card__tag {
  font-size: 0.78rem;
  background: var(--color-primary-tint);
  color: var(--color-primary-dark);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.member-card__tag--lang {
  background: var(--color-slate-tint);
  color: var(--color-slate);
}
.member-card__notes {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-style: italic;
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
}

/* Tighter top padding so the toolbar sits close to the page header */
.directory-section { padding-block: var(--space-5) var(--section-pad); }

/* Centered call-to-action band at the bottom of the directory */
.directory-cta-band {
  margin-top: var(--space-7);
  padding: var(--space-6) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
}
.directory-cta-band h2 {
  font-size: 1.375rem;
  margin-bottom: var(--space-2);
}
.directory-cta-band p {
  color: var(--color-text-muted);
  max-width: 50ch;
  margin: 0 auto var(--space-4);
}
.directory-cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

.directory-empty,
.directory-error,
.directory-loading {
  padding: var(--space-6);
  text-align: center;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
}
.directory-error { border-color: var(--color-danger); color: var(--color-danger); }

.directory-preview-banner {
  /* Visible only when DIRECTORY_SOURCE is empty (i.e. running on sample data) */
  background: var(--color-accent-tint);
  border: 1px solid #e9d8a4;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
  font-size: 0.9rem;
  color: var(--color-text);
}

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

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .hero__actions { display: none !important; }
  body { font-size: 11pt; color: #000; }
  a { color: #000; text-decoration: underline; }
  .section, .page-header { padding-block: 1rem; }
}
