/* ============================================================
   Components — header, nav, sections, cards, footer
   ============================================================ */

/* ----- Utility bar ----- */
/* Lit navy, like the banners, over a gilt hairline: HAM blue is kept for the crest and actions, not wide flat strips (white at 92%: 12:1 or more) */
.utility-bar { background-color: var(--navy-surface); background-image: linear-gradient(180deg, var(--navy-lit), var(--navy-surface)); border-bottom: 1px solid rgba(var(--brass-rgb), 0.45); color: rgba(255, 255, 255, 0.92); font-family: var(--f-manrope); font-size: 0.85rem; font-weight: 500; }
.utility-wrap { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 4%; max-width: var(--container-max); margin: 0 auto; }
.util-left p { margin: 0; }
.util-nav { display: flex; gap: 1.5rem; }
.util-nav a { transition: color 0.2s; }
.util-nav a:hover { color: #fff; }
.util-nav a[aria-current="page"] { color: #fff; text-decoration: underline 1px var(--gold-brass); text-underline-offset: 0.35em; }
.util-toggle { display: none; background: none; border: none; color: rgba(255, 255, 255, 0.85); cursor: pointer; padding: 0.25rem; align-items: center; gap: 0.4rem; font-family: var(--f-manrope); font-size: 0.85rem; font-weight: 500; }
.util-toggle svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ----- Main header ----- */
.site-header { position: sticky; top: 0; background: rgba(248, 247, 244, 0.97); z-index: 1000; padding: 0.9rem 0; border-bottom: 1px solid var(--rule); transition: box-shadow 0.3s ease; }
.is-scrolled .site-header { box-shadow: 0 1px 0 rgba(var(--navy-rgb), 0.04), 0 10px 24px -18px rgba(var(--navy-rgb), 0.35); }
.main-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.header-left { display: flex; align-items: center; gap: 2rem; }
/* The Academy's own lockup: crest, a gilt fillet, the full name in HAM blue */
.brand { display: flex; align-items: center; gap: 0.85rem; }
.brand-emblem { width: 54px; height: 54px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--slate-navy); }
.brand-emblem svg, .brand-emblem img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand-wordmark { display: flex; flex-direction: column; padding-left: 0.85rem; border-left: 1px solid var(--rule-gilt); }
.brand-text { font-family: var(--f-cormorant); color: var(--slate-navy); font-weight: 600; font-size: 1.32rem; line-height: 0.98; white-space: nowrap; }
.brand-text span { display: block; }
.brand-sub { font-family: var(--f-manrope); color: var(--gold-deep); text-transform: uppercase; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.18em; line-height: 1; margin-top: 6px; }
.membership-actions { display: flex; gap: 0.75rem; }

.main-nav { display: flex; justify-content: center; gap: 1.8rem; margin: 0 1rem; list-style: none; }
.main-nav > li { position: relative; }
.main-nav > li > a { font-family: var(--f-manrope); font-weight: 600; color: var(--slate-navy); font-size: 0.95rem; opacity: 0.85; transition: opacity 0.3s, color 0.3s; display: inline-block; padding: 0.5rem 0; }
.main-nav > li > a:hover { opacity: 1; color: var(--ham-blue); }
.main-nav > li.is-active > a { opacity: 1; color: var(--ham-blue); text-decoration: underline 2px #a17d32; text-underline-offset: 0.55em; }

.has-dropdown > a::after { content: "▾"; display: inline-block; font-size: 1em; margin-left: 5px; opacity: 0.6; position: relative; top: -1px; }
.dropdown-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px); background: #fff; border-radius: 14px; box-shadow: var(--shadow-3); border: 1px solid var(--rule); border-top: 2px solid var(--gold-brass); padding: 0.45rem; width: max-content; min-width: 210px; opacity: 0; visibility: hidden; transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s; z-index: 100; list-style: none; }
/* Opening shows the links at once (so a quick Tab reaches them); closing waits for the fade */
@media (hover: hover) { .main-nav > li:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); transition-delay: 0s; } }
.main-nav > li:focus-within .dropdown-menu, .dropdown-menu.open { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); transition-delay: 0s; }
.dropdown-menu a { display: block; padding: 0.65rem 1.1rem; border-radius: 9px; font-family: var(--f-manrope); font-weight: 500; font-size: 0.9rem; color: var(--charcoal-ink); transition: background 0.2s, color 0.2s; }
.dropdown-menu a:hover { background: var(--paper-cream); color: var(--ham-blue); }
.dropdown-menu a[aria-current="page"] { color: var(--ham-blue); font-weight: 700; }


/* ----- Hero ----- */
.hero { padding-top: 2.5rem; padding-bottom: 2rem; }
.hero-top-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 4%; margin-bottom: 1.75rem; flex-wrap: wrap; }
.hero-headline-wrap { flex: 1; min-width: 55%; max-width: 850px; }
.hero-sub-text-wrap { flex-basis: 380px; font-family: var(--f-manrope); color: var(--charcoal-ink); padding-bottom: 0.5rem; }
.hero-sub-text-wrap p { margin-bottom: 1.5rem; opacity: 0.8; font-size: 1.05rem; line-height: 1.55; }
.hero-visual { width: 100%; height: 58vh; min-height: 400px; max-height: 640px; border-radius: var(--br-image); background-color: var(--slate-navy); background-position: center 40%; background-size: cover; background-repeat: no-repeat; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), var(--shadow-3); }

/* ----- Section header ----- */
.layout-pad { padding-top: 4.5rem; padding-bottom: 4.5rem; } /* longhand so it never clobbers .container's horizontal padding */
.section-header-block { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 3.5rem; gap: 1.5rem; }
.section-header-block h2 { margin-bottom: 0; }

/* ----- Editorial / gateway cards ----- */
.cards-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.editorial-card { position: relative; background-color: var(--card-white); border-radius: var(--br-card); padding: 3.5rem 3rem; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--rule); box-shadow: var(--shadow-1); transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); height: 100%; }
.editorial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); }
@media (prefers-reduced-motion: reduce) { .editorial-card { transition: none; } .editorial-card:hover { transform: none; } }
.editorial-card h3 { font-size: 1.9rem; margin-bottom: 1.25rem; color: var(--slate-navy); }
.editorial-card p { opacity: 0.85; font-size: 1.1rem; line-height: 1.6; margin-bottom: 3rem; font-family: var(--f-spectral); }
.editorial-card--bordered { background: transparent; border: 1px solid var(--rule-strong); box-shadow: none; }
.editorial-card--dark { color: #fff; border-color: transparent; box-shadow: var(--shadow-2); }
.editorial-card--dark h3 { color: #fff; }
.editorial-card--dark p { opacity: 0.9; }
.editorial-card--dark .card-topic-label { color: var(--gold-brass); }
.card-topic-label { font-family: var(--f-manrope); text-transform: uppercase; letter-spacing: 0.14em; font-feature-settings: 'case'; color: var(--gold-deep); font-weight: 800; font-size: 0.78rem; margin-bottom: 1.5rem; display: block; } /* deep gold = WCAG AA on light cards; brass on dark */
/* Icon medallion: a double ring, like the Academy's seal */
.icon-stamp { width: 70px; height: 70px; background: var(--paper-cream); color: var(--slate-navy); border-radius: 50%; border: 1px solid rgba(var(--brass-rgb), 0.9); outline: 1px solid rgba(var(--brass-rgb), 0.45); outline-offset: 4px; display: flex; align-items: center; justify-content: center; margin-bottom: 2rem; }
.icon-stamp svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.editorial-card--bordered .icon-stamp { background: var(--card-white); }
.editorial-card--dark .icon-stamp { background: rgba(255, 255, 255, 0.04); border-color: rgba(var(--brass-rgb), 0.75); outline-color: rgba(var(--brass-rgb), 0.35); color: var(--gold-brass); }

/* ----- Surfaces -----
   Lit navy / HAM blue: light falls from the top left, so large fields never read flat.
   A framed dark panel gets a gilt fillet, the fine gold line inside a certificate's frame. */
.surface-navy, .split-feature, .editorial-card--dark {
  background-color: var(--navy-surface);
  background-image: url("../images/engraved-field.svg"), radial-gradient(ellipse 85% 110% at 0% 0%, rgba(255, 255, 255, 0.05), transparent 62%), linear-gradient(180deg, var(--navy-lit), var(--navy-surface));
}
/* HAM blue at the top, settling into its deep shade, so HAM blue stays the brightest tone and white text holds 5:1 or more */
.surface-blue, .newsletter-panel {
  background-color: var(--ham-blue-deep);
  background-image: linear-gradient(180deg, var(--ham-blue), var(--ham-blue-deep));
}
.gilt-fillet::after, .split-feature::after, .newsletter-panel::after, .editorial-card--dark::after {
  content: ""; position: absolute; inset: 12px; pointer-events: none; z-index: 2;
  border: 1px solid rgba(var(--brass-rgb), 0.42); border-radius: calc(var(--br-card) - 12px);
}
.split-feature::after, .newsletter-panel::after { inset: 14px; border-radius: calc(var(--br-image) - 14px); }

/* ----- Split feature (Clinical Day) ----- */
.split-feature { position: relative; border-radius: var(--br-image); color: #fff; display: flex; overflow: hidden; align-items: stretch; margin: 6rem 0; box-shadow: var(--shadow-3); }
.sf-content { padding: 6rem 5.5rem; flex: 1.1; display: flex; flex-direction: column; justify-content: center; }
.sf-content .eyebrow { color: var(--gold-brass); margin-bottom: 1rem; }
.sf-content h2 { color: #fff; font-size: clamp(2rem, 3.5vw, 3rem); line-height: 1.1; margin-bottom: 1.5rem; }
.sf-content p { font-family: var(--f-spectral); font-weight: 500; font-size: 1.15rem; opacity: 0.85; max-width: 550px; margin-bottom: 2rem; }
.sf-content .btn { align-self: flex-start; }
.sf-image { flex: 0.9; background-position: center center; background-size: cover; background-repeat: no-repeat; min-height: 100%; }

/* ----- News cards ----- */
.editorial-card.news-card { padding: 0; overflow: hidden; align-items: stretch; }
.news-card > a { display: block; overflow: hidden; }
.news-card img { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform 0.7s var(--ease); }
.news-card:hover img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .news-card img { transition: none; } .news-card:hover img { transform: none; } }
.news-card-body { padding: 2rem 2.5rem 2.5rem; display: flex; flex-direction: column; flex: 1; }
.news-card-date { font-family: var(--f-manrope); font-weight: 800; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; font-feature-settings: 'case'; color: var(--gold-deep); font-variant-numeric: lining-nums; }
.news-card-body h2, .news-card-body h3 { font-size: 1.5rem; line-height: 1.2; margin: 0.75rem 0; }
.news-card-body p { font-size: 1rem; margin-bottom: 1.5rem; opacity: 0.85; }
.news-card-body .pathway-link { align-self: flex-start; }
.news-card-body h2 a, .news-card-body h3 a { transition: color 0.2s; }
.news-card:hover .news-card-body h2 a, .news-card:hover .news-card-body h3 a { color: var(--ham-blue); }

/* ----- Events list ----- */
.events-list { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: var(--br-card); overflow: hidden; background: var(--card-white); box-shadow: var(--shadow-1); }
.event-row { display: flex; justify-content: space-between; align-items: center; padding: 1.75rem 2.5rem; border-bottom: 1px solid rgba(var(--navy-rgb), 0.06); transition: background 0.2s; gap: 1.5rem; }
.event-row:last-child { border-bottom: none; }
.event-row:hover { background: var(--paper-cream); }
.event-row:focus-visible { outline-offset: -3px; background: var(--paper-cream); }
.event-row h3 { font-size: 1.4rem; margin-bottom: 0.25rem; }
.event-row-meta { font-family: var(--f-manrope); font-weight: 500; font-size: 0.9rem; color: var(--charcoal-ink); opacity: 0.8; } /* ≥0.8 keeps charcoal-on-white at WCAG AA 4.5:1 */
@media (max-width: 420px) { .event-row-meta .nowrap:last-child { display: block; white-space: normal; text-wrap: balance; } }
.event-row .pathway-link { margin-top: 0; white-space: nowrap; }
.event-row-main { display: flex; align-items: center; gap: 1.5rem; min-width: 0; }
/* Calendar-leaf date: month over day */
.event-date { flex: 0 0 auto; width: 4.4rem; padding: 0.7rem 0 0.72rem; text-align: center; background: var(--paper-cream); border: 1px solid var(--rule-strong); border-radius: 12px; box-shadow: inset 0 0 0 3px var(--paper-cream), inset 0 0 0 4px rgba(var(--brass-rgb), 0.55); font-family: var(--f-manrope); line-height: 1; font-variant-numeric: lining-nums; transition: background 0.2s, border-color 0.2s, box-shadow 0.2s; }
.event-date-month { display: block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ham-blue); }
.event-date-day { display: block; margin-top: 0.3rem; font-family: var(--f-cormorant); font-size: 1.9rem; font-weight: 600; color: var(--slate-navy); }
.event-row:hover .event-date { background: var(--card-white); border-color: rgba(var(--ham-blue-rgb), 0.35); box-shadow: inset 0 0 0 3px var(--card-white), inset 0 0 0 4px rgba(var(--brass-rgb), 0.8); }
.event-row:hover h3 { color: var(--ham-blue); }
.event-row h3 { transition: color 0.2s; }
.event-row.is-past .event-date-month { color: var(--charcoal-ink); }
.event-row.is-past h3 { color: var(--charcoal-ink); }

/* ----- Newsletter ----- */
.newsletter-panel { position: relative; border-radius: var(--br-image); padding: 4.5rem 5rem; display: flex; justify-content: space-between; align-items: center; gap: 3rem; flex-wrap: wrap; box-shadow: var(--shadow-3); }
.newsletter-copy { flex: 1; min-width: 300px; }
.newsletter-copy h2 { color: #fff; font-size: clamp(2rem, 3vw, 2.8rem); margin-bottom: 1rem; }
.newsletter-copy p { color: rgba(255, 255, 255, 0.92); font-family: var(--f-manrope); font-size: 1.05rem; }
.newsletter-form { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.newsletter-form input { padding: 0.9rem 1.5rem; border-radius: var(--br-pill); border: 2px solid rgba(255, 255, 255, 0.65); background: rgba(255, 255, 255, 0.08); color: #fff; font-family: var(--f-manrope); font-size: 0.95rem; min-width: 280px; }
.newsletter-form input::placeholder { color: rgba(255, 255, 255, 0.9); }
.newsletter-form input:focus { outline: 2px solid transparent; border-color: #fff; background: rgba(255, 255, 255, 0.14); box-shadow: 0 0 0 2px var(--ham-blue-deep), 0 0 0 4px #fff; }
.newsletter-form .btn { background: #fff; color: var(--ham-blue); font-weight: 800; padding: 1rem 2rem; border-color: #fff; box-shadow: inset 0 -1px 0 rgba(var(--ham-blue-rgb), 0.12), 0 8px 18px -10px rgba(0, 0, 0, 0.45); }
.newsletter-form .btn:hover { background: var(--paper-cream); border-color: var(--paper-cream); transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .newsletter-form .btn:hover { transform: none; } }

/* ----- Footer: the back board. Deep navy under a thick-thin gilt rule, the seal in quiet gold.
   Champagne gold here rather than brass: brass reads mustard against the deep blue ----- */
.footer-pad {
  position: relative; padding: 5.5rem 0 3rem; font-family: var(--f-manrope); color: rgba(255, 255, 255, 0.82);
  background-color: var(--navy-deep);
  background-image: url("../images/engraved-field.svg"), radial-gradient(ellipse 60% 100% at 18% 0%, rgba(255, 255, 255, 0.05), transparent 70%);
}
.footer-pad::before { content: ""; pointer-events: none; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(to bottom, var(--gold-pale) 0 3px, transparent 3px 5px, rgba(226, 201, 148, 0.6) 5px 6px); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr) auto; gap: 3rem 4.5rem; align-items: start; }
.footer-org { max-width: 380px; }
.footer-org p { color: rgba(255, 255, 255, 0.8); font-size: 1.12rem; line-height: 1.6; margin: 0; font-family: var(--f-spectral); max-width: 34ch; }
.footer-address { font-style: normal; font-weight: 500; font-size: 0.95rem; color: rgba(255, 255, 255, 0.85); line-height: 1.7; font-variant-numeric: lining-nums; }
.footer-address a { border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.footer-address a:hover { color: var(--gold-pale); border-bottom-color: rgba(226, 201, 148, 0.6); }
.footer-cols { display: flex; gap: 5rem; }
.footer-col h2, .footer-col h4 { font-family: var(--f-manrope); line-height: 1.3; font-weight: 800; font-size: 0.78rem; text-transform: uppercase; font-feature-settings: 'case'; color: var(--gold-pale); letter-spacing: 0.14em; margin-bottom: 1.6rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.95rem; }
.footer-links a { color: rgba(255, 255, 255, 0.82); font-size: 1rem; font-weight: 500; transition: color 0.2s; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--gold-pale); text-underline-offset: 0.25em; }
.sub-footer { border-top: 1px solid var(--rule-light); margin-top: 4.5rem; padding-top: 1.75rem; font-size: 0.85rem; color: rgba(255, 255, 255, 0.68); }
.sub-footer a { color: rgba(255, 255, 255, 0.82); }
.sub-footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--gold-pale); text-underline-offset: 0.25em; }

/* ============================================================
   Interior pages — page hero, prose/blocks, tables, sections
   ============================================================ */
/* Navy banner, like the cover of an Academy certificate: lit navy, the seal in gold foil on its
   guilloche rosette (snippets/page-hero.php), and a thick-thin gilt rule along the bottom edge */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: 4.25rem 0 4.9rem;
  background-color: var(--navy-surface);
  background-image:
    radial-gradient(ellipse 70% 140% at 88% -20%, rgba(255, 255, 255, 0.09), transparent 62%),
    linear-gradient(180deg, var(--navy-lit) 0%, var(--navy-surface) 100%);
}
.page-hero::after { content: ""; pointer-events: none; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: linear-gradient(to bottom, rgba(var(--brass-rgb), 0.7) 0 1px, transparent 1px 3px, var(--gold-brass) 3px 6px); }
.page-hero .container { position: relative; }
.page-hero .eyebrow { color: var(--gold-brass); margin-bottom: 1rem; }
.page-hero h1 { color: #fff; font-size: clamp(2.5rem, 5vw, 4rem); margin: 0; max-width: 24ch; }
.page-hero .page-tagline { font-family: var(--f-manrope); color: rgba(255, 255, 255, 0.86); font-size: 1.15rem; max-width: 640px; margin-top: 1rem; line-height: 1.5; }

/* The seal: the Academy's crest in gold foil, optionally on a guilloche rosette. Decorative only */
.seal { position: absolute; pointer-events: none; aspect-ratio: 1; }
.seal-rosette, .seal-crest { position: absolute; display: block; }
.seal-rosette {
  inset: 0; background: var(--gold-brass); opacity: 0.1;
  -webkit-mask: url("../images/guilloche-rosette.svg") center / contain no-repeat;
  mask: url("../images/guilloche-rosette.svg") center / contain no-repeat;
}
.seal-crest {
  inset: 21.5%; background: var(--foil); opacity: 0.14;
  -webkit-mask: url("../images/ham-emblem.svg") center / contain no-repeat;
  mask: url("../images/ham-emblem.svg") center / contain no-repeat;
}
.seal--hero { z-index: -1; top: 50%; right: max(0%, calc((100% - var(--container-max)) / 2 - 1%)); width: clamp(320px, 36vw, 520px); transform: translateY(-50%); }

/* Document frame: an artifact set like an Academy document (fee schedule, confirmations).
   A hairline border, a gilt keyline 8px inside it, optionally the seal in a corner */
.doc-frame { position: relative; background: var(--card-white); border: 1px solid var(--rule-strong); border-radius: var(--br-card); box-shadow: var(--shadow-2); padding: 2.75rem 3rem 2.25rem; }
.doc-frame::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--rule-gilt); border-radius: calc(var(--br-card) - 8px); pointer-events: none; }
.doc-frame > .seal--corner { top: 1.9rem; right: 2.1rem; width: 68px; }
.seal--corner .seal-crest { inset: 0; opacity: 0.78; }
@media (max-width: 640px) {
  .doc-frame { padding: 2rem 1.35rem 1.6rem; }
  .doc-frame > .seal--corner { top: 1.5rem; right: 1.35rem; width: 52px; }
}

/* Callout: a note that needs attention (not-listed records, accepting patients, dues dates) */
.callout { font-family: var(--f-manrope); font-size: 0.97rem; line-height: 1.6; color: var(--slate-navy); background: var(--card-white); border: 1px solid var(--rule); border-left: 3px solid var(--gold-brass); border-radius: 12px; padding: 1.1rem 1.35rem; box-shadow: var(--shadow-1); }
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout a:not(.btn) { color: var(--ham-blue); text-decoration: underline; text-decoration-color: rgba(var(--ham-blue-rgb), 0.45); text-underline-offset: 0.2em; }
.editorial-card .callout, .editorial-card p.callout { opacity: 1; font-family: var(--f-manrope); font-size: 0.97rem; line-height: 1.55; align-self: stretch; } /* cards set serif, faded paragraphs */

/* Fleuron: the three lozenges from the foot of the seal, as a section divider or end mark */
.fleuron { display: block; height: 10px; margin: 3rem auto; border: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 10'%3E%3Cpath fill='%23D4B066' d='M7 1l6 4-6 4-6-4zM26 1l6 4-6 4-6-4zM45 1l6 4-6 4-6-4z'/%3E%3C/svg%3E") center / 52px 10px no-repeat; }

/* Prose / blocks content */
.prose { max-width: 760px; margin: 0 auto; padding: 4rem 0; font-family: var(--f-spectral); font-size: 1.15rem; line-height: 1.7; color: var(--charcoal-ink); }
.prose-wide { max-width: 1040px; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.75rem, 2.6vw, 2.3rem); line-height: 1.1; margin: 2.75rem 0 1rem; }
.prose h3 { font-size: 1.6rem; margin: 2rem 0 0.75rem; }
.prose p { margin-bottom: 1.25rem; }
.prose ul, .prose ol { margin: 0 0 1.25rem 1.5rem; }
.prose li { margin-bottom: 0.5rem; }
.prose ol li::marker { font-family: var(--f-manrope); font-weight: 700; color: var(--gold-deep); }
/* Content lists (Panel list blocks) get small brass bullets; nested lists hollow ones */
.prose ul:not([class]) { list-style: none; margin-left: 0.25rem; }
.prose ul:not([class]) > li { position: relative; padding-left: 1.35rem; }
.prose ul:not([class]) > li::before { content: ""; position: absolute; left: 0.15rem; top: 0.72em; width: 6px; height: 6px; border-radius: 1px; transform: rotate(45deg); background: var(--gold-brass); }
.prose ul:not([class]) ul:not([class]) { margin: 0.6rem 0 0.25rem; }
.prose ul:not([class]) ul:not([class]) > li::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--gold-brass); }
.prose a:not(.btn):not(.pathway-link) { color: var(--ham-blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: rgba(var(--ham-blue-rgb), 0.45); transition: text-decoration-color 0.2s; }
.prose a:not(.btn):not(.pathway-link):hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
.prose img { border-radius: var(--br-card); margin: 2rem 0; max-width: 100%; }
.prose blockquote { border-left: 3px solid var(--gold-brass); padding: 0.2rem 0 0.2rem 1.6rem; margin: 2.25rem 0; font-family: var(--f-cormorant); font-style: italic; font-weight: 500; font-size: 1.45rem; line-height: 1.45; color: var(--slate-navy); }
.prose blockquote strong { font-weight: 600; }
.prose blockquote footer { margin-top: 0.75rem; font-family: var(--f-manrope); font-style: normal; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-deep); }
.prose hr { border: none; height: 10px; margin: 3rem 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 10'%3E%3Cpath fill='%23D4B066' d='M7 1l6 4-6 4-6-4zM26 1l6 4-6 4-6-4zM45 1l6 4-6 4-6-4z'/%3E%3C/svg%3E") center / 52px 10px no-repeat; }

/* Person block (board, staff) — portrait left, name/role/bio right; stacks on phones */
.person-block { display: grid; grid-template-columns: 200px 1fr; gap: 2.5rem; align-items: start; margin: 0; padding: 2.75rem 0; border-top: 1px solid rgba(var(--navy-rgb), 0.12); }
.prose > .person-block:first-child, .prose h2 + .person-block { border-top: none; padding-top: 0.5rem; }
.person-photo { border-radius: var(--br-card); box-shadow: var(--shadow-2); }
.prose .person-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; margin: 0; border-radius: var(--br-card); }
.person-photo-placeholder { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; background: var(--paper-cream); border: 1px solid rgba(var(--navy-rgb), 0.1); border-radius: var(--br-card); }
.prose .person-photo-placeholder img { width: 45%; aspect-ratio: auto; border-radius: 0; opacity: 0.35; }
.prose .person-name { margin: 0 0 0.35rem; }
.prose .person-role { font-family: var(--f-manrope); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ham-blue); margin-bottom: 1rem; }
.person-text > :last-child { margin-bottom: 0; }

/* Generic content section wrapper */
.content-section { padding: 4rem 0; }
.content-section + .content-section { padding-top: 0; }

/* Simple data table (fees, custodians, etc.) */
.ham-table { width: 100%; border-collapse: separate; border-spacing: 0; font-family: var(--f-manrope); font-size: 1rem; margin: 1.5rem 0; background: var(--card-white); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-1); font-variant-numeric: lining-nums tabular-nums; }
.ham-table th, .ham-table td { text-align: left; padding: 0.95rem 1.2rem; border-bottom: 1px solid var(--rule); }
.ham-table th { background: var(--card-white); color: var(--gold-deep); font-weight: 800; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; font-feature-settings: 'case'; border-bottom-color: var(--rule-strong); }
.ham-table tr:last-child td { border-bottom: none; }
.ham-table tbody tr:hover td { background: rgba(var(--navy-rgb), 0.02); }

@media (max-width: 768px) {
  .page-hero { padding: 2.5rem 0 3rem; }
  .prose { padding: 2.5rem 0; }
  .person-block { grid-template-columns: 1fr; gap: 1.25rem; padding: 2rem 0; }
  .person-photo { max-width: 180px; }
  .ham-table { font-size: 0.9rem; }
  .ham-table th, .ham-table td { padding: 0.7rem 0.75rem; }
}

/* ============================================================
   Mobile nav toggle + menu (toggle hidden on desktop)
   ============================================================ */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 13px 9px; margin: 0 -9px 0 auto; } /* 44px tap target */
.nav-toggle-bars { display: block; width: 26px; height: 18px; position: relative; }
.nav-toggle-bars span { position: absolute; left: 0; width: 100%; height: 2px; background: var(--slate-navy); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease; }
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 8px; }
.nav-toggle-bars span:nth-child(3) { top: 16px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { top: 8px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { top: 8px; transform: rotate(-45deg); }

.mobile-menu { display: none; }
.mobile-menu .mm-list { list-style: none; }
.mobile-menu .mm-list > li { border-bottom: 1px solid rgba(var(--navy-rgb), 0.08); }
.mobile-menu .mm-top { display: block; padding: 1rem 0; font-family: var(--f-manrope); font-weight: 700; font-size: 1.05rem; color: var(--slate-navy); }
.mobile-menu .mm-heading { display: block; padding: 1rem 0 0.4rem; font-family: var(--f-manrope); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ham-blue); }
.mobile-menu .mm-group ul { list-style: none; padding-bottom: 0.75rem; }
.mobile-menu .mm-group ul a { display: block; padding: 0.55rem 0 0.55rem 1rem; font-family: var(--f-manrope); font-weight: 500; font-size: 1rem; color: var(--charcoal-ink); }
.mobile-menu .mm-group ul a:hover, .mobile-menu .mm-top:hover { color: var(--ham-blue); }
.mobile-menu .mm-actions { display: flex; gap: 0.75rem; padding: 1.25rem 0; }
.mobile-menu .mm-actions .btn { flex: 1; }
.mobile-menu .mm-utility { list-style: none; padding-top: 0.75rem; border-top: 1px solid rgba(var(--navy-rgb), 0.08); }
.mobile-menu .mm-utility a { display: block; padding: 0.55rem 0; font-family: var(--f-manrope); font-size: 0.9rem; color: var(--charcoal-ink); opacity: 0.8; }
.mobile-menu .mm-utility a:hover { opacity: 1; color: var(--ham-blue); }
.mobile-menu a[aria-current="page"], .mobile-menu .mm-group ul a[aria-current="page"] { color: var(--ham-blue); font-weight: 700; opacity: 1; }

/* Article featured image */
.article-hero-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--br-card); margin-bottom: 2rem; }

/* Single event details + CTA */
.event-details { display: grid; grid-template-columns: max-content 1fr; gap: 0.7rem 1.5rem; margin: 0 0 2rem; padding: 1.5rem 1.75rem; background: var(--card-white); border: 1px solid var(--rule); border-radius: 20px; box-shadow: var(--shadow-1); font-family: var(--f-manrope); font-size: 1rem; line-height: 1.5; font-variant-numeric: lining-nums; }
.event-details dt { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; font-feature-settings: 'case'; color: var(--gold-deep); padding-top: 0.2rem; }
.event-details dd { margin: 0; color: var(--slate-navy); font-weight: 500; }

/* Footer seal: the crest in quiet gold on the navy back board (the logo link). A solid tone, not
   brass at reduced opacity, which mixes with the blue into olive */
.footer-logo { display: inline-block; margin-bottom: 1.75rem; border-radius: 50%; }
.footer-seal {
  display: block; width: 128px; aspect-ratio: 1; background: var(--gold-seal); transition: background-color 0.25s ease;
  -webkit-mask: url("../images/ham-emblem.svg") center / contain no-repeat;
  mask: url("../images/ham-emblem.svg") center / contain no-repeat;
}
.footer-logo:hover .footer-seal { background: var(--gold-pale); }


/* Event location map (OpenStreetMap embed) */
.event-map { margin: 1.5rem 0 2rem; }
.event-map iframe { width: 100%; height: 340px; border: 1px solid var(--rule); border-radius: var(--br-card); box-shadow: var(--shadow-2); display: block; }
.event-map .pathway-link { margin-top: 0.75rem; }

/* ============================================================
   Forms — shared by Contact, the Membership Application and
   newsletter sign-up. Page templates only add layout.
   ============================================================ */
.form-field { margin: 0 0 1.35rem; min-width: 0; border: 0; padding: 0; }
.form-label, .form-legend { display: block; font-family: var(--f-manrope); font-weight: 700; font-size: 0.9rem; line-height: 1.4; color: var(--slate-navy); margin-bottom: 0.5rem; padding: 0; }
.form-label .req, .form-legend .req, .choice .req { color: var(--ham-blue); margin-left: 0.15rem; }
.form-optional { font-weight: 500; color: var(--charcoal-ink); }
.form-hint { font-family: var(--f-manrope); font-size: 0.86rem; line-height: 1.5; color: var(--charcoal-ink); margin: -0.15rem 0 0.7rem; }

.form-control {
  display: block; width: 100%; min-height: 3.05rem;
  font-family: var(--f-manrope); font-size: 1rem; line-height: 1.4; color: var(--slate-navy);
  background: var(--paper-cream); border: 1.5px solid rgba(var(--navy-rgb), 0.55);
  border-radius: var(--br-dropdown); padding: 0.75rem 1rem;
  box-shadow: inset 0 1px 2px rgba(var(--navy-rgb), 0.06);
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control::placeholder { color: rgba(59, 75, 87, 0.8); }
.form-control:hover { border-color: rgba(var(--navy-rgb), 0.75); }
/* transparent outline: invisible normally, drawn by Windows High Contrast (which drops box-shadows) */
.form-control:focus { outline: 2px solid transparent; outline-offset: 1px; background: var(--card-white); border-color: var(--ham-blue); box-shadow: 0 0 0 3px rgba(var(--ham-blue-rgb), 0.25); }
.form-control[aria-invalid="true"], .form-control:user-invalid { border-color: #B42318; }
.form-control[aria-invalid="true"]:focus, .form-control:user-invalid:focus { box-shadow: 0 0 0 2px #fff, 0 0 0 5px #B42318; }
textarea.form-control { min-height: 7.5rem; resize: vertical; line-height: 1.6; }
select.form-control {
  appearance: none; -webkit-appearance: none; padding-right: 2.6rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E4462' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9rem center; background-size: 1.1rem;
}
.form-file { padding: 0.6rem; cursor: pointer; }
.form-file::file-selector-button {
  font-family: var(--f-manrope); font-weight: 700; font-size: 0.88rem; color: var(--slate-navy);
  background: var(--card-white); border: 1.5px solid rgba(var(--navy-rgb), 0.55); border-radius: var(--br-pill);
  padding: 0.5rem 1.1rem; margin-right: 0.9rem; cursor: pointer; transition: border-color 0.2s;
}
.form-file:hover::file-selector-button { border-color: var(--ham-blue); }
.form-error { font-family: var(--f-manrope); font-size: 0.86rem; font-weight: 600; line-height: 1.45; color: #B42318; margin: 0.45rem 0 0; }

/* Error summary at the top of a form */
.form-alert {
  font-family: var(--f-manrope); color: var(--slate-navy);
  background: #FDF3F2; border: 1px solid rgba(180, 35, 24, 0.22); border-left: 4px solid #B42318;
  border-radius: var(--br-dropdown); padding: 1.1rem 1.35rem; margin-bottom: 1.75rem;
}
.form-alert:focus { outline: 2px solid transparent; box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.18); }
.form-alert p { margin: 0 0 0.4rem; font-weight: 700; }
.form-alert ul { margin: 0; padding-left: 1.2rem; }
.form-alert li { margin: 0.2rem 0; line-height: 1.5; }
.form-alert a { color: #8A1C12; text-decoration: underline; text-underline-offset: 0.15em; }

/* Checkbox rows */
.choice { display: flex; gap: 0.8rem; align-items: flex-start; font-family: var(--f-manrope); font-size: 0.97rem; line-height: 1.55; color: var(--charcoal-ink); cursor: pointer; }
.choice input { flex-shrink: 0; width: 1.2rem; height: 1.2rem; margin-top: 0.15rem; accent-color: var(--ham-blue); cursor: pointer; }
.choice-stack { display: grid; gap: 1rem; }
.form-declaration { padding: 1.1rem 1.25rem; background: var(--paper-cream); border: 1px solid rgba(var(--navy-rgb), 0.08); border-radius: 14px; }
.form-declaration .choice { color: var(--slate-navy); font-weight: 600; }

/* Pill radios (Yes / No and other short choices): the real input stays
   focusable and clickable over the pill, so keyboards and screen readers work */
.pill-group { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.pill { position: relative; display: inline-flex; }
.pill input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pill span {
  display: inline-flex; align-items: center; min-height: 2.6rem; padding: 0.55rem 1.15rem;
  font-family: var(--f-manrope); font-size: 0.92rem; font-weight: 600; color: var(--slate-navy);
  background: var(--paper-cream); border: 1.5px solid rgba(var(--navy-rgb), 0.55); border-radius: var(--br-pill);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.pill:hover span { border-color: var(--ham-blue); }
.pill input:checked + span { background: var(--ham-blue); border-color: var(--ham-blue); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--ham-blue); outline-offset: 2px; }

/* Choice cards (membership category) */
.choice-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.choice-card { position: relative; display: block; cursor: pointer; }
.choice-card input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice-card-body {
  display: flex; flex-direction: column; gap: 0.2rem; height: 100%;
  padding: 1.05rem 1.2rem 1.1rem 3rem; position: relative;
  background: var(--paper-cream); border: 1.5px solid rgba(var(--navy-rgb), 0.55); border-radius: 16px;
  font-family: var(--f-manrope); transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.choice-card-body::before {
  content: ""; position: absolute; left: 1.1rem; top: 1.2rem; width: 1.1rem; height: 1.1rem;
  border-radius: 50%; border: 1.5px solid rgba(var(--navy-rgb), 0.55); background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.choice-card-title { font-weight: 700; font-size: 1rem; color: var(--slate-navy); }
.choice-card-hint { font-size: 0.88rem; line-height: 1.45; color: var(--charcoal-ink); }
.choice-card-fee { margin-top: 0.35rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em; color: var(--gold-deep); }
.choice-card:hover .choice-card-body { border-color: var(--ham-blue); }
.choice-card input:checked + .choice-card-body { background: rgba(var(--ham-blue-rgb), 0.05); border-color: var(--ham-blue); box-shadow: 0 6px 18px rgba(var(--ham-blue-rgb), 0.08); }
.choice-card input:checked + .choice-card-body::before { border-color: var(--ham-blue); box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 10px var(--ham-blue); }
.choice-card input:focus-visible + .choice-card-body { outline: 3px solid var(--ham-blue); outline-offset: 2px; }

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

/* Button block (Panel "Button" in any Body) */
.prose .block-button { margin: 1.75rem 0; }

@media (max-width: 640px) {
  .choice-cards { grid-template-columns: 1fr; }
}


/* Wide tables scroll sideways on small screens instead of being cut off */
@media (max-width: 768px) {
  .prose table { display: block; max-width: 100%; overflow-x: auto; }
  .event-details { grid-template-columns: 1fr; gap: 0.15rem; padding: 1.25rem 1.35rem; }
  .event-details dd { margin-bottom: 0.6rem; }
  .event-row-main { gap: 1rem; }
}

/* Print: patients print the records directory and physician list */
@media print {
  .utility-bar, .site-header, .announce, .footer-cols, .mobile-menu, .nav-toggle, .hp-field, .app-aside,
  .newsletter-form, .hero-visual, .sf-image, .footer-logo { display: none !important; }
  .reveal-pending { opacity: 1 !important; transform: none !important; } /* homepage blocks not yet scrolled into view */
  .doc-frame { break-inside: avoid; box-shadow: none; }
  .footer-pad { break-inside: avoid; }
  .footer-col h2 { color: #000; }
  body { background: #fff; font-size: 11pt; }
  .page-hero { background: none; color: #000; border-bottom: 1px solid #999; padding: 0 0 1rem; }
  .page-hero::after, .seal, .footer-pad::before { display: none; }
  .footer-pad { background: none; color: #000; padding: 1.5rem 0 0; border-top: 1px solid #999; }
  /* Browsers drop backgrounds when printing: dark panels and filled buttons would print white on white */
  .surface-navy, .surface-blue, .split-feature, .newsletter-panel, .editorial-card--dark { background: none !important; color: #000 !important; box-shadow: none !important; border: 1px solid #999; }
  .surface-navy *, .surface-blue *, .split-feature *, .newsletter-panel *, .editorial-card--dark * { color: #000 !important; }
  .gilt-fillet::after, .split-feature::after, .newsletter-panel::after, .editorial-card--dark::after { display: none; }
  .btn { color: #000 !important; background: none !important; border: 1px solid #000 !important; box-shadow: none !important; }
  .footer-org p, .footer-address, .sub-footer { color: #000; }
  .page-hero h1, .page-hero .eyebrow, .page-hero .page-tagline { color: #000; }
  .editorial-card, .ham-table { box-shadow: none; break-inside: avoid; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}

/* Dark surfaces: a brass focus ring on the deep blues (4.9:1 or more) instead of blue-on-blue. Brass is only
   2.8:1 on HAM blue, so HAM blue surfaces take a white ring (5.1:1 or more); the footer uses its champagne */
.utility-bar, .page-hero, .surface-navy, .split-feature, .editorial-card--dark, .announce--success { --focus: var(--gold-brass); }
.surface-blue, .newsletter-panel, .announce--info { --focus: #fff; }
.footer-pad { --focus: var(--gold-pale); }
.gilt-fillet { position: relative; }

/* Escape closes an open dropdown until the pointer or focus moves away (main.js) */
.main-nav > li.dd-dismissed .dropdown-menu { opacity: 0; visibility: hidden; }

/* Keep each "date • time • place" item whole when event details wrap */
.nowrap { white-space: nowrap; }

/* Windows High Contrast: selections must still show */
@media (forced-colors: active) {
  .pill input:checked + span, .choice-card input:checked + .choice-card-body { outline: 3px solid Highlight; outline-offset: 2px; }
  .choice-card-body::before { forced-color-adjust: none; }
  .fee-list li.is-match { outline: 2px solid Highlight; }
  /* the texture is an image layer, which would keep the navy gradients behind forced text colours */
  .surface-navy, .split-feature, .editorial-card--dark, .footer-pad { background-image: none; }
  .nav-toggle-bars span { forced-color-adjust: none; background: ButtonText; }
}

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