:root[data-portal-theme="aefm"] {
  --theme-accent:#991b25;
  --theme-accent-dark:#77131c;
  --theme-bright:#f1c323;
  --theme-secondary:#5e6265;
  --theme-secondary-soft:#f0efeb;
  --theme-soft:#f7edbd;
  --theme-on-dark:#f6d64f;
  --theme-hero:#971b24;
  --theme-hero-ink:#fff;
  --theme-hero-muted:#f3dfe0;
  --theme-contrast-band:#f2c629;
  --theme-footer:#292b2d;
  --theme-footer-muted:#d0d0ce;
  --theme-paper:#f5f4f1;
  --theme-ink:#28292a;
  --theme-muted:#626365;
  --theme-line:#dddad4;
  --theme-charcoal:#292b2d;
  --theme-header:rgba(255,255,255,.96);
  --theme-logo-filter:none;
  --theme-title-font:Georgia,"Times New Roman",serif;
  --paper:var(--theme-paper);
  --ink:var(--theme-ink);
  --muted:var(--theme-muted);
  --line:var(--theme-line);
  --green:var(--theme-accent);
  --green-dark:var(--theme-accent-dark);
  --blue:var(--theme-secondary);
  --yellow:var(--theme-bright);
}

.aefm-site { min-height:100vh; }
.aefm-site .portal-main { margin-top:0; }
.aefm-site .portal-brand img { width:40px; height:40px; object-fit:contain; }
.aefm-site .portal-brand strong { letter-spacing:.06em; }
.aefm-site .portal-header:has(.portal-nav a:first-child[aria-current="page"]) { background:var(--theme-charcoal); border-bottom-color:#484a4b; }
.aefm-site .portal-header:has(.portal-nav a:first-child[aria-current="page"]) .portal-brand img { filter:none; }
.aefm-site .portal-header:has(.portal-nav a:first-child[aria-current="page"]) .portal-brand span,
.aefm-site .portal-header:has(.portal-nav a:first-child[aria-current="page"]) .portal-nav a { color:#e0ded8; }
.aefm-site .portal-header:has(.portal-nav a:first-child[aria-current="page"]) .portal-nav a[aria-current="page"] { color:var(--theme-on-dark); }
.aefm-site .portal-nav a[aria-current="page"] { color:var(--theme-accent-dark); }

.aefm-hero { position:relative; overflow:hidden; background:var(--theme-hero); color:var(--theme-hero-ink); }
.aefm-hero::after { position:absolute; right:-130px; bottom:-220px; width:540px; height:540px; border:1px solid #ffffff24; border-radius:50%; content:""; }
.aefm-hero-grid { position:relative; z-index:1; display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:64px; align-items:center; min-height:470px; padding-top:60px; padding-bottom:64px; }
.aefm-hero-copy { max-width:790px; }
.aefm-eyebrow { margin:0 0 13px; color:var(--theme-bright); font-size:.7rem; font-weight:900; letter-spacing:.13em; text-transform:uppercase; }
.aefm-eyebrow-red { color:var(--theme-accent); }
.aefm-hero h1,.aefm-page-hero h1 { max-width:850px; margin:0; font-family:var(--theme-title-font); font-size:clamp(2.7rem,6vw,5rem); font-weight:500; line-height:.98; letter-spacing:-.035em; }
.aefm-lead { max-width:650px; margin:21px 0 0; color:var(--theme-hero-muted); font-size:1.06rem; line-height:1.7; }
.aefm-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:29px; }
.aefm-button { display:inline-flex; min-height:46px; align-items:center; justify-content:center; padding:11px 18px; border:1px solid transparent; border-radius:4px; font-size:.83rem; font-weight:850; text-decoration:none; transition:transform .16s ease,background .16s ease; }
.aefm-button:hover { transform:translateY(-2px); }
.aefm-button-primary { background:var(--theme-bright); color:#29251a; }
.aefm-button-secondary { border-color:#ffffff8a; color:#fff; }
.aefm-button-secondary:hover { background:#ffffff15; }
.aefm-button-yellow { background:var(--theme-bright); color:#29251a; }
.aefm-hero-mark { display:grid; width:240px; height:240px; place-items:center; border:1px solid #ffffff40; border-radius:50%; background:#fff; box-shadow:0 15px 45px #4d0d1245; }
.aefm-hero-mark img { display:block; width:88%; height:88%; object-fit:contain; }
.aefm-intro-section { padding:70px 0 74px; background:#fff; }
.aefm-intro-grid { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:80px; align-items:start; }
.aefm-intro-grid h2,.aefm-section-heading h2,.aefm-members-callout h2 { margin:0; font-family:var(--theme-title-font); font-size:clamp(1.9rem,3.2vw,3rem); font-weight:500; line-height:1.06; }
.aefm-intro-copy { max-width:660px; }
.aefm-intro-copy p,.aefm-members-callout p { margin:0; color:var(--muted); line-height:1.75; }
.aefm-text-link { display:inline-flex; align-items:center; gap:9px; margin-top:17px; color:var(--theme-accent-dark); font-size:.84rem; font-weight:850; text-decoration:none; }
.aefm-text-link::after { content:"→"; font-size:1.1rem; transition:transform .16s ease; }
.aefm-text-link:hover::after { transform:translateX(3px); }
.aefm-home-events { padding:72px 0 78px; }
.aefm-section-heading { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:25px; }
.aefm-section-heading .aefm-text-link { margin-bottom:5px; }
.aefm-event-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.aefm-event-card { display:flex; min-width:0; min-height:205px; flex-direction:column; padding:21px; border:1px solid var(--line); border-top:4px solid var(--theme-accent); border-radius:5px; background:#fff; box-shadow:0 7px 20px #26221b0a; }
.aefm-event-date { color:var(--theme-accent-dark); font-size:.7rem; font-weight:900; letter-spacing:.07em; text-transform:uppercase; }
.aefm-event-card h3 { margin:11px 0 8px; font-family:var(--theme-title-font); font-size:1.35rem; font-weight:600; line-height:1.2; }
.aefm-event-meta { display:flex; flex-wrap:wrap; gap:7px; margin-top:auto; padding-top:13px; color:var(--muted); font-size:.76rem; }
.aefm-event-card .aefm-text-link { margin-top:14px; }
.aefm-home-members { padding:58px 0; background:var(--theme-accent-dark); color:#fff; }
.aefm-members-callout { display:flex; align-items:center; justify-content:space-between; gap:38px; }
.aefm-members-callout > div { max-width:730px; }
.aefm-members-callout p { margin-top:11px; color:#f2dfe0; }
.aefm-page-hero { padding:76px 0 68px; border-bottom:1px solid var(--line); background:linear-gradient(110deg,#fff 0%,#f3f0e8 100%); }
.aefm-page-hero h1 { color:var(--ink); font-size:clamp(2.6rem,5.4vw,4.5rem); }
.aefm-page-hero .aefm-lead { margin-top:15px; color:var(--muted); }
.aefm-list-section { min-height:480px; padding:38px 0 78px; }
.aefm-filters { display:grid; grid-template-columns:minmax(230px,1.4fr) minmax(160px,.7fr) minmax(160px,.7fr) auto; gap:13px; align-items:end; padding:20px; border:1px solid var(--line); border-radius:5px; background:#fff; }
.aefm-filters label,.aefm-member-toolbar label { display:grid; gap:7px; color:var(--muted); font-size:.74rem; font-weight:800; }
.aefm-site input,.aefm-site select { width:100%; min-height:43px; padding:9px 11px; border:1px solid #cbc8c1; border-radius:4px; background:#fff; color:var(--ink); font:inherit; }
.aefm-filter-button,.aefm-pagination button { min-height:43px; padding:10px 17px; border:0; border-radius:4px; background:var(--theme-accent); color:#fff; font:inherit; font-size:.8rem; font-weight:850; cursor:pointer; }
.aefm-filter-button:hover,.aefm-pagination button:not(:disabled):hover { background:var(--theme-accent-dark); }
.aefm-result-count { min-height:1.2em; margin:19px 0 13px; color:var(--muted); font-size:.78rem; }
.aefm-event-grid .aefm-empty-state { grid-column:1/-1; padding:32px 20px; border:1px dashed #c7c2b8; border-radius:5px; color:var(--muted); text-align:center; }
.aefm-pagination { display:flex; align-items:center; justify-content:center; gap:16px; margin-top:27px; color:var(--muted); font-size:.8rem; }
.aefm-pagination button { min-width:105px; }
.aefm-pagination button:disabled { opacity:.45; cursor:not-allowed; }
.aefm-member-toolbar { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:18px; }
.aefm-member-toolbar label { width:min(100%,460px); }
.aefm-member-toolbar .aefm-result-count { min-height:0; margin:0 0 9px; }
.aefm-table-scroll { overflow:auto; border:1px solid var(--line); border-radius:5px; background:#fff; }
.aefm-member-table { width:100%; border-collapse:collapse; text-align:left; }
.aefm-member-table th { padding:13px 15px; background:#ecebea; color:#4b4b4c; font-size:.68rem; letter-spacing:.06em; text-transform:uppercase; white-space:nowrap; }
.aefm-member-table td { padding:13px 15px; border-top:1px solid #e8e6e1; color:var(--ink); font-size:.84rem; }
.aefm-member-table tbody tr:nth-child(even) { background:#faf9f7; }
.aefm-member-name { font-weight:800; }
.aefm-license { display:inline-flex; align-items:center; gap:7px; font-size:.75rem; font-weight:800; white-space:nowrap; }
.aefm-license::before { width:7px; height:7px; border-radius:50%; background:#a4a4a0; content:""; }
.aefm-license.is-active { color:#28613c; }
.aefm-license.is-active::before { background:#418250; }
.aefm-license.is-pending { color:#76716b; }
.aefm-privacy-note { margin:14px 0 0; color:var(--muted); font-size:.75rem; line-height:1.6; }
.aefm-site :where(a,button,input,select):focus-visible { outline:3px solid #d9ad12; outline-offset:3px; }

@media (max-width:800px) {
  .aefm-hero-grid { grid-template-columns:minmax(0,1fr) 180px; gap:25px; min-height:400px; }
  .aefm-hero-mark { width:170px; height:170px; }
  .aefm-intro-grid { grid-template-columns:1fr; gap:22px; }
  .aefm-event-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .aefm-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:560px) {
  .aefm-hero-grid { grid-template-columns:minmax(0,1fr); gap:28px; padding-top:53px; padding-bottom:50px; }
  .aefm-hero-mark { grid-row:1; width:114px; height:114px; }
  .aefm-hero-mark img { width:90%; height:90%; }
  .aefm-hero h1 { font-size:clamp(2.55rem,12vw,3.7rem); }
  .aefm-intro-section,.aefm-home-events { padding:52px 0; }
  .aefm-section-heading { align-items:start; flex-direction:column; gap:4px; }
  .aefm-event-grid { grid-template-columns:minmax(0,1fr); }
  .aefm-members-callout { align-items:start; flex-direction:column; gap:23px; }
  .aefm-page-hero { padding:53px 0 45px; }
  .aefm-filters { grid-template-columns:minmax(0,1fr); padding:15px; }
  .aefm-member-toolbar { align-items:stretch; flex-direction:column; gap:0; }
  .aefm-member-toolbar label { width:100%; }
  .aefm-member-toolbar .aefm-result-count { margin:13px 0 8px; }
  .aefm-member-table { min-width:650px; }
}
@media (prefers-reduced-motion:reduce) {
  .aefm-site *, .aefm-site *::before, .aefm-site *::after { scroll-behavior:auto!important; transition:none!important; }
}

/* Keep the countdown in the date row so long titles never sit beneath a badge. */
.aefm-event-heading {display:flex; align-items:center; justify-content:space-between; gap:8px 12px; flex-wrap:wrap;}
.aefm-event-countdown {display:inline-flex; align-items:center; gap:5px; flex-shrink:0; padding:4px 8px; border:1px solid #e8dcc0; border-radius:999px; background:#faf6e9; color:#75602d; font-size:.7rem; font-weight:650; line-height:1.2; white-space:nowrap;}
.aefm-event-countdown svg {width:13px; height:13px; flex:none;}
