/* =========================================================================
   BAPS CME — styled to the site's design tokens. Falls back to the brand
   hex values when the Elementor kit variables are not present.
   ========================================================================= */

.baps-cme {
  --c-crimson: var(--e-global-color-primary, #AF0516);
  --c-navy:    var(--e-global-color-secondary, #0B1B2F);
  --c-orange:  var(--e-global-color-accent, #F16724);
  --c-text:    var(--e-global-color-text, #475569);
  --c-ink:     #0F172A;
  --c-sub:     #64748B;
  --c-line:    #E2E8F0;
  --c-surface: #F7F8FA;
  --c-white:   #FFFFFF;
  --c-sig:     #1B3C8C;  /* signature ink: blue, on request */
  color: var(--c-text);
  line-height: 1.7;
}
[dir="rtl"] .baps-cme { line-height: 1.95; }

.baps-cme *, .baps-cme *::before, .baps-cme *::after { box-sizing: border-box; }
.baps-cme .baps-cme-h { color: var(--c-ink); font-weight: 800; margin: 0 0 12px; font-size: 1.35rem; line-height: 1.3; }
[dir="rtl"] .baps-cme .baps-cme-h { font-weight: 700; line-height: 1.5; }
.baps-cme .baps-cme-p { margin: 0 0 18px; font-size: .98rem; }
.baps-cme .baps-cme-small { font-size: .88rem; margin: 14px 0 0; }
.baps-cme .baps-cme-label { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--c-sub); margin: 0 0 10px; }
[dir="rtl"] .baps-cme .baps-cme-label { letter-spacing: 0; text-transform: none; font-size: .88rem; }

/* ---- Buttons ---- */
.baps-cme .baps-cme-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 28px; border: 2px solid transparent; border-radius: 4px;
  font-size: .95rem; font-weight: 800; line-height: 1.2; cursor: pointer;
  text-decoration: none; font-family: inherit;
  transition: transform .16s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.baps-cme .baps-cme-btn:hover { transform: translateY(-2px); }
.baps-cme .baps-cme-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.baps-cme .baps-cme-btn-primary { background: var(--c-crimson); color: #fff; }
.baps-cme .baps-cme-btn-primary:hover { background: #CC1F20; color: #fff; }
.baps-cme .baps-cme-btn-outline { background: transparent; color: var(--c-navy); border-color: var(--c-line); }
.baps-cme .baps-cme-btn-outline:hover { border-color: var(--c-crimson); color: var(--c-crimson); }
.baps-cme .baps-cme-btn-ghost { background: transparent; color: var(--c-sub); border-color: var(--c-line); }
.baps-cme .baps-cme-btn-ghost:hover { color: var(--c-crimson); border-color: var(--c-crimson); }
.baps-cme .baps-cme-btn-sm { padding: 10px 18px; font-size: .85rem; }
.baps-cme .baps-cme-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---- Panels & notes ---- */
.baps-cme-panel { max-width: 520px; padding: 34px; background: #fff; border: 1px solid var(--c-line); border-radius: 8px; }
.baps-cme .baps-cme-note { padding: 18px 22px; background: var(--c-surface); border-inline-start: 3px solid var(--c-navy); border-radius: 0 4px 4px 0; margin-top: 22px; font-size: .92rem; }
[dir="rtl"] .baps-cme .baps-cme-note { border-radius: 4px 0 0 4px; }
.baps-cme .baps-cme-note h4 { margin: 0 0 6px; font-size: 1rem; color: var(--c-ink); font-weight: 800; }
.baps-cme .baps-cme-note p { margin: 0; }
.baps-cme .baps-cme-note-warn { border-inline-start-color: var(--c-orange); background: rgba(241,103,36,.07); }
.baps-cme .baps-cme-error { padding: 13px 17px; margin-bottom: 18px; background: rgba(175,5,22,.07); border: 1px solid rgba(175,5,22,.25); border-radius: 4px; color: var(--c-crimson); font-size: .92rem; font-weight: 600; }

/* ---- WordPress login form ---- */
.baps-cme .login-username, .baps-cme .login-password { margin-bottom: 16px; }
.baps-cme .login-username label, .baps-cme .login-password label { display: block; margin-bottom: 7px; font-size: .85rem; font-weight: 800; color: var(--c-navy); }
.baps-cme input[type="text"], .baps-cme input[type="password"] {
  width: 100%; padding: 13px 16px; font-size: .97rem; color: var(--c-ink);
  background: var(--c-surface); border: 1.5px solid var(--c-line); border-radius: 4px;
  transition: border-color .18s ease, background .18s ease;
}
.baps-cme input[type="text"]:focus, .baps-cme input[type="password"]:focus {
  outline: none; background: #fff; border-color: var(--c-crimson); box-shadow: 0 0 0 3px rgba(204,31,32,.1);
}
.baps-cme .login-remember { margin-bottom: 16px; font-size: .9rem; }
.baps-cme .login-submit input[type="submit"] {
  width: 100%; padding: 15px 28px; border: 0; border-radius: 4px;
  background: var(--c-crimson); color: #fff; font-size: .95rem; font-weight: 800; cursor: pointer;
  transition: background .18s ease, transform .16s ease;
}
.baps-cme .login-submit input[type="submit"]:hover { background: #CC1F20; transform: translateY(-2px); }

/* ---- Category picker ---- */
.baps-cme-catgrid { display: flex; flex-wrap: wrap; margin: 0 -7px 26px; }
.baps-cme .baps-cme-cat {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: calc(50% - 14px); margin: 0 7px 14px; padding: 18px 20px; text-align: start;
  background: #fff; border: 1.5px solid var(--c-line); border-radius: 8px; cursor: pointer;
  font-family: inherit; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.baps-cme .baps-cme-cat:hover { border-color: var(--c-crimson); transform: translateY(-2px); box-shadow: 0 4px 12px -4px rgba(15,23,42,.12); }
.baps-cme .baps-cme-cat.is-selected { border-color: var(--c-crimson); background: rgba(204,31,32,.03); box-shadow: 0 0 0 3px rgba(204,31,32,.08); }
.baps-cme .baps-cme-cat b { display: block; font-size: .98rem; font-weight: 800; color: var(--c-navy); line-height: 1.4; margin-bottom: 3px; }
.baps-cme .baps-cme-cat em { font-style: normal; font-size: .84rem; color: var(--c-sub); }
.baps-cme .baps-cme-cat .tick { width: 22px; height: 22px; flex: none; border: 2px solid var(--c-line); border-radius: 50%; position: relative; transition: background .18s, border-color .18s; }
.baps-cme .baps-cme-cat.is-selected .tick { background: var(--c-crimson); border-color: var(--c-crimson); }
.baps-cme .baps-cme-cat.is-selected .tick::after { content: ""; position: absolute; left: 6px; top: 3px; width: 5px; height: 10px; border-right: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(42deg); }
@media (max-width: 760px) { .baps-cme .baps-cme-cat { width: calc(100% - 14px); } }

.baps-cme-controls { display: flex; flex-wrap: wrap; gap: 32px; margin-bottom: 24px; }
.baps-cme .baps-cme-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; background: #EEF1F5; border-radius: 4px; }
.baps-cme .baps-cme-seg button { padding: 10px 20px; border: 0; border-radius: 3px; background: transparent; font-family: inherit; font-size: .88rem; font-weight: 800; color: var(--c-text); cursor: pointer; transition: background .16s, color .16s; }
.baps-cme .baps-cme-seg button.is-active { background: #fff; color: var(--c-crimson); box-shadow: 0 1px 2px rgba(15,23,42,.08); }
.baps-cme-start { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.baps-cme .baps-cme-selinfo { font-size: .9rem; font-weight: 700; color: var(--c-sub); }

/* ---- Runner ---- */
.baps-cme-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 24px; margin-bottom: 22px; background: var(--c-navy); border-radius: 8px; }
.baps-cme-bar-stats { display: flex; flex-wrap: wrap; gap: 26px; }
.baps-cme-bar-stats span { display: flex; flex-direction: column; gap: 2px; }
.baps-cme-bar-stats em { font-style: normal; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.55); }
[dir="rtl"] .baps-cme-bar-stats em { letter-spacing: 0; text-transform: none; font-size: .8rem; }
.baps-cme-bar-stats b { font-size: 1.22rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.baps-cme-bar-stats b.timer { color: var(--c-orange); }
.baps-cme-progress { width: 100%; height: 6px; background: var(--c-line); border-radius: 3px; overflow: hidden; margin-bottom: 26px; }
.baps-cme-progress > div { height: 100%; width: 0; background: linear-gradient(90deg,#AF0516,#F16724); border-radius: 3px; transition: width .35s ease; }
[dir="rtl"] .baps-cme-progress > div { background: linear-gradient(270deg,#AF0516,#F16724); }

.baps-cme-qcard { padding: 36px; background: #fff; border: 1px solid var(--c-line); border-radius: 8px; }
@media (max-width: 760px) { .baps-cme-qcard { padding: 24px; } }
.baps-cme-qmeta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.baps-cme .tag { padding: 5px 11px; border-radius: 100px; background: var(--c-surface); border: 1px solid var(--c-line); font-size: .76rem; font-weight: 700; }
.baps-cme .pill { padding: 4px 11px; border-radius: 100px; font-size: .76rem; font-weight: 800; }
.baps-cme .pill.easy { background: rgba(71,85,105,.1); color: var(--c-text); }
.baps-cme .pill.med { background: rgba(241,103,36,.14); color: #B8531A; }
.baps-cme .pill.hard { background: rgba(175,5,22,.1); color: var(--c-crimson); }
.baps-cme-stem { font-size: 1.06rem; line-height: 1.7; color: var(--c-ink); font-weight: 500; margin-bottom: 26px; }
[dir="rtl"] .baps-cme-stem { line-height: 1.95; }

.baps-cme-opts { list-style: none; margin: 0 0 24px; padding: 0; }
.baps-cme-opts li { margin-bottom: 11px; }
.baps-cme .baps-cme-opt {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 16px 20px;
  text-align: start; cursor: pointer; background: var(--c-surface);
  border: 1.5px solid var(--c-line); border-radius: 4px;
  font-family: inherit; font-size: .99rem; line-height: 1.6; color: var(--c-ink);
  transition: border-color .16s, background .16s, transform .16s;
}
.baps-cme .baps-cme-opt:hover:not(:disabled) { border-color: #CBD5E1; background: #fff; transform: translateX(3px); }
[dir="rtl"] .baps-cme .baps-cme-opt:hover:not(:disabled) { transform: translateX(-3px); }
.baps-cme .baps-cme-opt:disabled { cursor: default; }
.baps-cme .baps-cme-opt .key { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none; border-radius: 4px; background: #fff; border: 1.5px solid #CBD5E1; font-size: .84rem; font-weight: 800; color: var(--c-navy); }
.baps-cme .baps-cme-opt.is-correct { border-color: #15803D; background: rgba(21,128,61,.07); }
.baps-cme .baps-cme-opt.is-correct .key { background: #15803D; border-color: #15803D; color: #fff; }
.baps-cme .baps-cme-opt.is-wrong { border-color: var(--c-crimson); background: rgba(175,5,22,.06); }
.baps-cme .baps-cme-opt.is-wrong .key { background: var(--c-crimson); border-color: var(--c-crimson); color: #fff; }

.baps-cme-explain { padding: 24px; margin-bottom: 22px; background: var(--c-surface); border-inline-start: 4px solid var(--c-navy); border-radius: 0 4px 4px 0; }
[dir="rtl"] .baps-cme-explain { border-radius: 4px 0 0 4px; }
.baps-cme-explain.ok { border-inline-start-color: #15803D; background: rgba(21,128,61,.05); }
.baps-cme-explain.no { border-inline-start-color: var(--c-crimson); background: rgba(175,5,22,.04); }
.baps-cme-explain h4 { margin: 0 0 10px; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--c-ink); }
[dir="rtl"] .baps-cme-explain h4 { letter-spacing: 0; text-transform: none; font-size: .92rem; }
.baps-cme-explain p { margin: 0 0 10px; font-size: .95rem; }
.baps-cme-explain .refs { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--c-line); }
.baps-cme-explain .refs h5 { margin: 0 0 8px; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--c-sub); }
.baps-cme-explain .refs p { font-size: .85rem; color: var(--c-sub); line-height: 1.6; }

/* The hidden attribute must beat any display rule below it. */
.baps-cme [hidden] { display: none !important; }

/* Flag a question: one small link, then three choices */
.baps-cme-flag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -10px 0 22px; }
.baps-cme-flag-open { padding: 0; font: inherit; font-size: .8rem; color: var(--c-sub); background: none; border: 0; border-bottom: 1px dotted var(--c-sub); cursor: pointer; }
.baps-cme-flag-open:hover { color: var(--c-crimson); border-bottom-color: var(--c-crimson); }
.baps-cme-flag-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.baps-cme-flag-pick .lbl { font-size: .78rem; font-weight: 700; color: var(--c-sub); }
.baps-cme .baps-cme-flag-reason { padding: 6px 13px; font: inherit; font-size: .8rem; font-weight: 700; color: var(--c-navy); background: #fff; border: 1.5px solid var(--c-line); border-radius: 100px; cursor: pointer; transition: border-color .15s, background .15s; }
.baps-cme .baps-cme-flag-reason:hover:not(:disabled) { border-color: var(--c-crimson); background: rgba(175,5,22,.04); color: var(--c-crimson); }
.baps-cme .baps-cme-flag-reason:disabled { opacity: .5; cursor: default; }
.baps-cme .baps-cme-flag-cancel { padding: 0 4px; font: inherit; font-size: .78rem; color: var(--c-sub); background: none; border: 0; cursor: pointer; text-decoration: underline; }
.baps-cme-flag-msg { font-size: .8rem; }
.baps-cme-flag-msg.is-ok { color: #15803D; font-weight: 700; }
.baps-cme-flag-msg.is-bad { color: var(--c-crimson); }

.baps-cme-qactions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- Metrics, bars, summary ---- */
.baps-cme-metrics { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.baps-cme .baps-cme-metric { flex: 1 1 170px; padding: 24px; background: #fff; border: 1px solid var(--c-line); border-radius: 8px; }
.baps-cme .baps-cme-metric .k { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--c-sub); margin-bottom: 10px; }
[dir="rtl"] .baps-cme .baps-cme-metric .k { letter-spacing: 0; text-transform: none; font-size: .86rem; }
.baps-cme .baps-cme-metric .v { display: block; font-size: 2.3rem; font-weight: 800; line-height: 1; color: var(--c-navy); font-variant-numeric: tabular-nums; }
.baps-cme .baps-cme-metric .v.accent { background: linear-gradient(90deg,#AF0516,#CC1F20 45%,#F16724); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.baps-cme-bar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 13px; }
.baps-cme-bar-row .lbl { flex: 0 0 230px; font-size: .88rem; font-weight: 700; color: var(--c-navy); line-height: 1.4; }
.baps-cme-bar-row .track { flex: 1; height: 20px; background: #EEF1F5; border-radius: 3px; overflow: hidden; min-width: 60px; }
.baps-cme-bar-row .fill { display: block; height: 100%; background: linear-gradient(90deg,#AF0516,#F16724); border-radius: 3px; }
.baps-cme-bar-row .val { flex: 0 0 96px; text-align: end; font-size: .85rem; font-weight: 800; color: var(--c-text); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .baps-cme-bar-row { flex-wrap: wrap; } .baps-cme-bar-row .lbl { flex: 1 1 100%; } }

.baps-cme-done { padding: 44px; background: #fff; border: 1px solid var(--c-line); border-radius: 8px; text-align: center; }
.baps-cme-done h2 { margin: 0 0 10px; font-size: 1.7rem; font-weight: 800; color: var(--c-ink); }
.baps-cme-done > p { margin: 0 0 28px; font-size: 1.05rem; }
.baps-cme-done .baps-cme-actions { justify-content: center; }

/* ---- Certificate ---- */
.baps-cme-cert { position: relative; max-width: 940px; margin: 34px auto 0; padding: 60px; background: #fff; border: 1px solid #CBD5E1; border-radius: 8px; text-align: center; overflow: hidden; }
@media (max-width: 760px) { .baps-cme-cert { padding: 32px; } }
.baps-cme-cert::before, .baps-cme-cert::after { content: ""; position: absolute; left: 0; width: 100%; height: 9px; background: linear-gradient(90deg,#AF0516,#F16724); }
.baps-cme-cert::before { top: 0; } .baps-cme-cert::after { bottom: 0; }
/* Elementor ships `.elementor img { height: auto }`, which outranks a single
   class, so the logo needs the extra specificity or it prints full size. */
.baps-cme .baps-cme-cert-logo,
.elementor .baps-cme-cert-logo { height: 110px; width: auto; max-width: 320px; margin: 0 auto 26px; display: block; object-fit: contain; }
.baps-cme-cert-kicker { font-size: .78rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--c-crimson); margin: 0 0 16px; }
[dir="rtl"] .baps-cme-cert-kicker { letter-spacing: 0; text-transform: none; font-size: .95rem; }
.baps-cme-cert-title { margin: 0 0 24px; font-size: 2.1rem; font-weight: 800; color: var(--c-ink); line-height: 1.2; }
[dir="rtl"] .baps-cme-cert-title { line-height: 1.5; font-weight: 700; }
.baps-cme-cert-awarded { margin: 0 0 8px; font-size: .95rem; color: var(--c-sub); }
.baps-cme-cert-name { display: inline-block; min-width: min(420px,100%); margin: 0 auto 22px; padding-bottom: 16px; border-bottom: 2px solid var(--c-line); font-size: 2rem; font-weight: 800; color: var(--c-navy); }
.baps-cme-cert-body { max-width: 640px; margin: 0 auto 30px; font-size: 1rem; line-height: 1.8; }
.baps-cme-cert-body .hours { font-size: 1.35em; font-weight: 800; color: var(--c-crimson); margin: 0 5px; }
.baps-cme-cert-breakdown { max-width: 640px; margin: 0 auto 32px; text-align: start; }
.baps-cme-cert-breakdown h4 { margin: 0 0 12px; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--c-sub); text-align: center; }
[dir="rtl"] .baps-cme-cert-breakdown h4 { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.baps-cme-cert-breakdown .row { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; border-bottom: 1px dotted #CBD5E1; font-size: .9rem; }
.baps-cme-cert-breakdown .row:last-child { border-bottom: 0; }
.baps-cme-cert-breakdown .row span:last-child { font-weight: 800; color: var(--c-navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.baps-cme-cert-sign { display: flex; flex-wrap: wrap; justify-content: center; gap: 56px; margin-top: 40px; }
.baps-cme-cert-sign > div { flex: 0 1 230px; }
.baps-cme-cert-sign .line { margin: 0; font-size: .84rem; font-weight: 800; color: var(--c-navy); }
/* The signature: a plain, quick pen hand in blue ink, kept modest in size. */
.baps-cme-cert-sign .sig {
  margin: 4px 0 6px; font-family: "Cedarville Cursive", "Segoe Script", "Bradley Hand", cursive;
  font-size: 1.28rem; line-height: 1.35; font-weight: 400; color: var(--c-sig); white-space: nowrap;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
[dir="rtl"] .baps-cme-cert-sign .sig { font-family: "Aref Ruqaa", "Noto Naskh Arabic", serif; font-size: 1.25rem; line-height: 1.6; }
/* The second signatory writes in a different hand: a flowing script in English,
   a rounded Naskh in Arabic, each sized to sit optically beside the first. */
.baps-cme-cert-sign .sig-hand-b { font-family: "Sacramento", "Segoe Script", "Bradley Hand", cursive; font-size: 1.72rem; line-height: 1.1; }
[dir="rtl"] .baps-cme-cert-sign .sig-hand-b { font-family: "Mirza", "Noto Naskh Arabic", serif; font-weight: 500; font-size: 1.5rem; line-height: 1.5; }
.baps-cme-cert-sign .role { margin: 0; padding-top: 8px; border-top: 1px solid var(--c-line); font-size: .78rem; color: var(--c-sub); }
.baps-cme-cert-meta { margin: 34px 0 0; padding-top: 20px; border-top: 1px solid var(--c-line); font-size: .77rem; color: var(--c-sub); line-height: 1.7; }
.baps-cme-cert-meta p { margin: 0 0 6px; }
.baps-cme-cert-issued { color: var(--c-ink); font-weight: 600; }
.baps-cme-cert-reg { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; }
.baps-cme .baps-cme-cert-nhra, .elementor .baps-cme-cert-nhra { height: 34px; width: auto; max-width: 120px; object-fit: contain; display: block; }
.baps-cme-cert-reg-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: start; }
.baps-cme-cert-reg-text:only-child { align-items: center; }
.baps-cme-cert-ref { font-weight: 700; color: var(--c-navy); }
.baps-cme-cert-id { font-size: .76rem; }
.baps-cme-cert-id b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; letter-spacing: .04em; color: var(--c-navy); }

/* ---- Print ---- */
/* On screen the print copy does not exist; JS adds it just before printing. */
#baps-print-root { display: none; }

@media print {
  @page { size: A4 portrait; margin: 0; }
  /* Height is left to the content: a page box of exactly 297mm plus any
     rounding is what used to spill an empty second sheet out of the printer. */
  html, body { width: 210mm !important; height: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; background: #fff !important; }
  /* Everything except the certificate copy leaves the layout, so nothing can
     push it onto a second page. */
  body > *:not(#baps-print-root) { display: none !important; }
  #baps-print-root { display: block !important; width: 210mm; height: auto; overflow: hidden; }

  #baps-print-root .baps-cme-cert {
    position: relative; box-sizing: border-box; width: 210mm; height: 296mm; max-height: 296mm; max-width: none;
    break-inside: avoid; break-after: avoid; page-break-after: avoid;
    margin: 0; padding: 26mm 22mm 20mm; border: 0; border-radius: 0; box-shadow: none;
    display: flex; flex-direction: column; align-items: stretch; text-align: center; overflow: hidden;
    outline: .45mm solid #0B1B2F; outline-offset: -9mm;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  /* Brand rules sit inside the frame, clear of the printer's dead margin. */
  #baps-print-root .baps-cme-cert::before, #baps-print-root .baps-cme-cert::after {
    left: 9mm; right: 9mm; width: auto; height: 2.2mm;
    background: linear-gradient(90deg,#AF0516,#F16724) !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  #baps-print-root .baps-cme-cert::before { top: 9mm; }
  #baps-print-root .baps-cme-cert::after { bottom: 9mm; top: auto; }

  #baps-print-root .baps-cme-noprint,
  #baps-print-root .baps-cme-cert-breakdown { display: none !important; }

  #baps-print-root .baps-cme-cert-logo { height: 30mm !important; width: auto !important; max-width: 80mm !important; margin: 0 auto 9mm !important; }
  #baps-print-root .baps-cme-cert-kicker { font-size: 9pt; margin-bottom: 4mm; }
  #baps-print-root .baps-cme-cert-title { font-size: 25pt; margin: 0 0 9mm; }
  /* Two auto margins share the free space: the award sits in the middle of the page. */
  #baps-print-root .baps-cme-cert-awarded { font-size: 11pt; margin-top: auto; margin-bottom: 3mm; }
  #baps-print-root .baps-cme-cert-name { font-size: 22pt; min-width: 110mm; max-width: 170mm; margin: 0 auto 8mm; padding-bottom: 5mm; overflow-wrap: anywhere; }
  /* Longer names step down a size rather than wrapping across three lines. */
  #baps-print-root .is-name-l .baps-cme-cert-name { font-size: 18pt; }
  #baps-print-root .is-name-xl .baps-cme-cert-name { font-size: 15pt; margin-bottom: 6mm; }
  #baps-print-root .baps-cme-cert-body { font-size: 11.5pt; line-height: 1.75; max-width: 150mm; margin: 0 auto; }
  /* Signatures and the small print settle at the foot of the page. */
  #baps-print-root .baps-cme-cert-sign { margin-top: auto; gap: 22mm; }
  #baps-print-root .baps-cme-cert-sign > div { flex: 0 1 60mm; }
  #baps-print-root .baps-cme-cert-sign .line { font-size: 9.5pt; }
  #baps-print-root .baps-cme-cert-sign .sig { font-size: 15pt; color: #1B3C8C !important; }
  #baps-print-root .baps-cme-cert-sign .sig-hand-b { font-size: 20pt; line-height: 1.1; }
  [dir="rtl"] #baps-print-root .baps-cme-cert-sign .sig-hand-b { font-size: 17pt; line-height: 1.4; }
  #baps-print-root .baps-cme-cert-sign .role { font-size: 8.5pt; }
  #baps-print-root .baps-cme-cert-meta { margin-top: 10mm; padding-top: 5mm; font-size: 7.5pt; }
  #baps-print-root .baps-cme-cert-nhra { height: 11mm !important; }
}

@media (prefers-reduced-motion: reduce) {
  .baps-cme * { transition: none !important; transform: none !important; }
}

/* ---------------------------------------------------------------
   Membership application form + committee review
   --------------------------------------------------------------- */
.baps-cme .baps-join-form { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.baps-cme .baps-join-group {
  flex: 0 0 100%; margin: 26px 0 6px; padding: 0 10px 10px;
  font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-crimson); border-bottom: 1px solid var(--c-line);
}
[dir="rtl"] .baps-cme .baps-join-group { letter-spacing: 0; }
.baps-cme .baps-join-form > .baps-join-group:first-of-type { margin-top: 4px; }
.baps-cme .baps-join-field { flex: 0 0 50%; max-width: 50%; padding: 0 10px; margin-bottom: 16px; box-sizing: border-box; }
.baps-cme .baps-join-field.is-wide { flex: 0 0 100%; max-width: 100%; }
.baps-cme .baps-join-field label { display: block; margin-bottom: 6px; font-size: .86rem; font-weight: 700; color: var(--c-ink); }
.baps-cme .baps-join-field .req { color: var(--c-crimson); }
.baps-cme .baps-join-field input,
.baps-cme .baps-join-field select,
.baps-cme .baps-join-field textarea {
  width: 100%; box-sizing: border-box; padding: 12px 14px; font: inherit; font-size: .95rem;
  color: var(--c-ink); background: #fff; border: 1px solid var(--c-line); border-radius: 4px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.baps-cme .baps-join-field input:focus,
.baps-cme .baps-join-field select:focus,
.baps-cme .baps-join-field textarea:focus {
  outline: none; border-color: var(--c-crimson); box-shadow: 0 0 0 3px rgba(175,5,22,.12);
}
.baps-cme .baps-join-field textarea { resize: vertical; min-height: 84px; }
.baps-cme .baps-join-check { flex: 0 0 100%; display: flex; gap: 10px; align-items: flex-start; padding: 0 10px; margin-bottom: 12px; }
.baps-cme .baps-join-check input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--c-crimson); flex: 0 0 auto; }
.baps-cme .baps-join-check label { font-size: .9rem; line-height: 1.6; color: var(--c-text); }
.baps-cme .baps-join-submit { flex: 0 0 100%; padding: 14px 10px 0; }

.baps-cme .baps-review-table { width: 100%; border-collapse: collapse; margin-bottom: 26px; }
.baps-cme .baps-review-table th,
.baps-cme .baps-review-table td { padding: 9px 12px 9px 0; text-align: start; vertical-align: top; border-bottom: 1px solid var(--c-line); font-size: .93rem; }
.baps-cme .baps-review-table th { width: 38%; color: var(--c-sub); font-weight: 600; }
.baps-cme .baps-review-table td { color: var(--c-ink); }
.baps-cme .baps-review-table tr.grp th { padding-top: 22px; color: var(--c-crimson); font-weight: 800; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }
.baps-cme .baps-review-decline { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--c-line); max-width: 520px; }
.baps-cme .baps-review-decline label { display: block; margin-bottom: 6px; font-size: .86rem; font-weight: 700; color: var(--c-ink); }
.baps-cme .baps-review-decline textarea {
  width: 100%; box-sizing: border-box; padding: 12px 14px; margin-bottom: 14px; font: inherit; font-size: .95rem;
  border: 1px solid var(--c-line); border-radius: 4px; resize: vertical;
}

@media (max-width: 767px) {
  .baps-cme .baps-join-field { flex: 0 0 100%; max-width: 100%; }
  .baps-cme .baps-review-table th, .baps-cme .baps-review-table td { display: block; width: auto; padding-bottom: 4px; border: 0; }
  .baps-cme .baps-review-table td { padding-bottom: 12px; border-bottom: 1px solid var(--c-line); }
}

/* ---------------------------------------------------------------
   Shared: success notice, initials avatar, link button
   --------------------------------------------------------------- */
.baps-cme .baps-cme-success { padding: 13px 17px; margin-bottom: 18px; background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: 4px; color: #065F46; font-size: .92rem; font-weight: 600; }
.baps-initials {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  background: linear-gradient(135deg, #0B1B2F, #12263F); color: #fff;
  font-weight: 800; font-size: 1.6rem; letter-spacing: .04em;
}
.baps-cme .baps-linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: var(--c-sub); text-decoration: underline; cursor: pointer; }
.baps-cme .baps-linkbtn:hover { color: var(--c-crimson); }

/* ---------------------------------------------------------------
   Member profile
   --------------------------------------------------------------- */
.baps-profile-head { display: flex; align-items: center; gap: 28px; padding: 28px; margin-bottom: 28px; background: #fff; border: 1px solid var(--c-line); border-radius: 10px; }
.baps-profile-photo { flex: 0 0 132px; width: 132px; height: 132px; border-radius: 50%; overflow: hidden; background: var(--c-surface); box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--c-line); }
.baps-profile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.baps-profile-photo .baps-initials { font-size: 2.4rem; }
.baps-profile-id { flex: 1 1 auto; min-width: 0; }
.baps-profile-id .baps-cme-h { margin-bottom: 4px; font-size: 1.6rem; }
.baps-profile-sub { margin: 0 0 12px; color: var(--c-sub); }
.baps-profile-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 14px; padding: 0; list-style: none; font-size: .88rem; color: var(--c-ink); font-weight: 600; }
.baps-profile-facts span { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-sub); }
[dir="rtl"] .baps-profile-facts span { letter-spacing: 0; text-transform: none; font-size: .8rem; }
.baps-profile-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; font-size: .88rem; font-weight: 700; }
.baps-profile-links a { color: var(--c-crimson); text-decoration: none; }
.baps-profile-links a:hover { text-decoration: underline; }

.baps-profile-grid { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.baps-profile-col { box-sizing: border-box; padding: 0 12px; }
.baps-profile-main { flex: 0 0 62%; max-width: 62%; }
.baps-profile-side { flex: 0 0 38%; max-width: 38%; }
.baps-profile-card { margin: 0 0 24px; padding: 26px; background: #fff; border: 1px solid var(--c-line); border-radius: 10px; }
.baps-profile-card h3 { margin: 0 0 6px; font-size: 1.1rem; font-weight: 800; color: var(--c-ink); }
.baps-profile-hint { margin: 0 0 16px; font-size: .84rem; color: var(--c-sub); line-height: 1.6; }
.baps-join-field .baps-profile-hint { margin: 6px 0 0; }
.baps-profile-card .baps-join-form { margin: 0 -8px; }
.baps-profile-card .baps-join-field { padding: 0 8px; }
.baps-profile-card .baps-join-check, .baps-profile-card .baps-join-submit { padding-left: 8px; padding-right: 8px; }
.baps-cme .baps-join-field input:disabled { background: var(--c-surface); color: var(--c-sub); }
.baps-cme .baps-file { display: block; width: 100%; margin: 0 0 14px; padding: 10px; font-size: .85rem; border: 1px dashed #CBD5E1; border-radius: 6px; background: var(--c-surface); box-sizing: border-box; }
.baps-profile-remove { margin: -12px 0 24px; }
@media (max-width: 900px) {
  .baps-profile-main, .baps-profile-side { flex: 0 0 100%; max-width: 100%; }
}
@media (max-width: 600px) {
  .baps-profile-head { flex-direction: column; text-align: center; }
  .baps-profile-facts, .baps-profile-links { justify-content: center; }
}

/* ---------------------------------------------------------------
   Member directory
   --------------------------------------------------------------- */
.baps-dir-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 0 0 26px; }
.baps-cme .baps-dir-search {
  flex: 1 1 320px; box-sizing: border-box; padding: 14px 16px 14px 44px; font: inherit; font-size: .95rem; color: var(--c-ink);
  background: #fff url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px center;
  border: 1px solid var(--c-line); border-radius: 8px;
}
[dir="rtl"] .baps-cme .baps-dir-search { padding: 14px 44px 14px 16px; background-position: right 16px center; }
.baps-cme .baps-dir-search:focus { outline: none; border-color: var(--c-crimson); box-shadow: 0 0 0 3px rgba(175,5,22,.12); }
.baps-dir-count { font-size: .88rem; font-weight: 700; color: var(--c-sub); }
.baps-dir-grid { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.baps-dir-card {
  box-sizing: border-box; flex: 0 0 calc(33.333% - 24px); max-width: calc(33.333% - 24px); margin: 0 12px 24px;
  background: #fff; border: 1px solid var(--c-line); border-radius: 10px; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.baps-dir-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(11,27,47,.35); }
.baps-dir-card[hidden] { display: none; }
.baps-dir-card { padding: 28px 24px 22px; text-align: center; }
.baps-dir-photo {
  position: relative; width: 108px; height: 108px; margin: 0 auto 18px; border-radius: 50%; overflow: hidden;
  background: var(--c-surface); box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--c-line);
}
.baps-dir-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.baps-dir-photo .baps-initials { font-size: 1.9rem; }
.baps-dir-body { padding: 0; }
.baps-cme .baps-dir-name { margin: 0 0 4px; font-size: 1.08rem; font-weight: 800; line-height: 1.35; color: var(--c-ink); }
.baps-dir-pos { margin: 0 0 12px; font-size: .88rem; color: var(--c-crimson); font-weight: 700; }
.baps-dir-line { margin: 0 0 6px; font-size: .88rem; line-height: 1.55; color: var(--c-text); }
.baps-dir-work .ico { color: var(--c-orange); font-size: .5rem; vertical-align: middle; margin-inline-end: 7px; }
.baps-dir-areas { color: var(--c-sub); }
.baps-dir-mail { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--c-line); }
.baps-dir-email { color: var(--c-navy); font-weight: 700; text-decoration: none; word-break: break-all; }
.baps-dir-email:hover { color: var(--c-crimson); }
.baps-dir-none { padding: 24px; text-align: center; color: var(--c-sub); }
@media (max-width: 1024px) { .baps-dir-card { flex-basis: calc(50% - 24px); max-width: calc(50% - 24px); } }
@media (max-width: 600px)  { .baps-dir-card { flex-basis: calc(100% - 24px); max-width: calc(100% - 24px); } }

/* News posts: cover image and back link (added by site.php) */
.baps-post-cover { margin: 6px 0 30px; }
.baps-post-cover img { display: block; width: 100%; height: auto; border-radius: 10px; }
.baps-post-back { margin-top: 2em; font-weight: 700; }
.baps-post-back a { color: #AF0516; text-decoration: none; }
.baps-post-back a::before { content: "\2190\00a0"; }
[dir="rtl"] .baps-post-back a::before { content: "\2192\00a0"; }

/* ---------------------------------------------------------------
   Events: cards, month calendar, event page panel
   --------------------------------------------------------------- */
.baps-ev-list { display: flex; flex-direction: column; gap: 18px; }
.baps-ev-card { display: flex; gap: 22px; padding: 22px; background: #fff; border: 1px solid var(--c-line); border-radius: 10px; transition: box-shadow .18s ease, transform .18s ease; }
.baps-ev-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(11,27,47,.4); }
.baps-ev-card.is-cancelled { opacity: .6; }
.baps-ev-date { flex: 0 0 86px; height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 8px; color: #fff; background: linear-gradient(160deg, #0B1B2F, #12263F); text-align: center; }
.baps-ev-webinar .baps-ev-date { background: linear-gradient(160deg, #12263F, #1E3A5F); }
.baps-ev-conference .baps-ev-date { background: linear-gradient(160deg, #AF0516, #CC1F20); }
.baps-ev-course .baps-ev-date, .baps-ev-workshop .baps-ev-date { background: linear-gradient(160deg, #0B1B2F, #12263F); box-shadow: inset 0 -4px 0 #F16724; }
.baps-ev-date .d { font-size: 2rem; font-weight: 800; line-height: 1; }
.baps-ev-date .m { margin-top: 4px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
[dir="rtl"] .baps-ev-date .m { letter-spacing: 0; font-size: .85rem; }
.baps-ev-date .y { font-size: .72rem; opacity: .7; }
.baps-ev-body { flex: 1 1 auto; min-width: 0; }
.baps-ev-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.baps-ev-type { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--c-crimson); }
[dir="rtl"] .baps-ev-type { letter-spacing: 0; font-size: .82rem; }
.baps-cme .baps-ev-flag { display: inline-block; margin: 0; padding: 2px 9px; font-size: .74rem; font-weight: 700; color: #92400E; background: #FEF3C7; border-radius: 20px; }
.baps-cme .baps-ev-flag.is-off { color: #991B1B; background: #FEE2E2; }
.baps-cme .baps-ev-title { margin: 0 0 10px; font-size: 1.15rem; font-weight: 800; line-height: 1.35; }
.baps-ev-title a { color: var(--c-ink); text-decoration: none; }
.baps-ev-title a:hover { color: var(--c-crimson); }
.baps-ev-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 10px; padding: 0; list-style: none; font-size: .88rem; color: var(--c-sub); font-weight: 600; }
.baps-ev-meta li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-end: 8px; vertical-align: middle; border-radius: 50%; background: var(--c-orange); }
.baps-ev-summary { margin: 0 0 14px; font-size: .95rem; line-height: 1.65; color: var(--c-text); }
.baps-ev-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
@media (max-width: 600px) {
  .baps-ev-card { flex-direction: column; gap: 14px; }
  .baps-ev-date { flex: none; width: 100%; height: auto; flex-direction: row; gap: 8px; padding: 10px; }
  .baps-ev-date .d { font-size: 1.3rem; }
  .baps-ev-date .m { margin: 0; }
}

.baps-cal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 18px; }
.baps-cme .baps-cal-title { margin: 0; min-width: 190px; text-align: center; font-size: 1.35rem; font-weight: 800; color: var(--c-ink); }
.baps-cal-nav { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--c-line); border-radius: 50%; background: #fff; color: var(--c-navy); text-decoration: none; font-size: 1.1rem; }
.baps-cal-nav:hover { border-color: var(--c-crimson); color: var(--c-crimson); }
.baps-cal-today { margin-inline-start: auto; font-size: .85rem; font-weight: 700; color: var(--c-crimson); text-decoration: none; }
.baps-cal-scroll { overflow-x: auto; border: 1px solid var(--c-line); border-radius: 10px; background: #fff; }
.baps-cal-grid { width: 100%; min-width: 640px; border-collapse: collapse; table-layout: fixed; }
.baps-cal-grid th { padding: 12px 6px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c-sub); background: var(--c-surface); border-bottom: 1px solid var(--c-line); }
[dir="rtl"] .baps-cal-grid th { letter-spacing: 0; font-size: .82rem; }
.baps-cal-grid td { height: 104px; padding: 8px; vertical-align: top; border: 1px solid var(--c-line); border-width: 0 1px 1px 0; }
[dir="rtl"] .baps-cal-grid td { border-width: 0 0 1px 1px; }
.baps-cal-grid td.is-empty { background: #FBFCFD; }
.baps-cal-grid .day { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; font-size: .85rem; font-weight: 700; color: var(--c-ink); border-radius: 50%; }
.baps-cal-grid td.is-today .day { background: var(--c-crimson); color: #fff; }
.baps-cal-ev { display: block; margin-top: 5px; padding: 3px 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .75rem; font-weight: 700; line-height: 1.4; color: #fff; background: var(--c-navy); border-radius: 4px; text-decoration: none; }
.baps-cal-ev.baps-ev-conference { background: var(--c-crimson); }
.baps-cal-ev.baps-ev-course, .baps-cal-ev.baps-ev-workshop { background: #C2410C; }
.baps-cal-ev.baps-ev-webinar { background: #1E3A5F; }
.baps-cal-ev:hover { filter: brightness(1.15); color: #fff; }
.baps-cme .baps-cal-listhead { margin: 30px 0 14px; font-size: 1rem; font-weight: 800; color: var(--c-ink); }
.baps-cal-none { margin: 0; color: var(--c-sub); }

.baps-ev-panel { margin: 0 0 30px; padding: 24px 26px; background: var(--c-surface); border: 1px solid var(--c-line); border-inline-start: 4px solid var(--c-orange); border-radius: 8px; }
.baps-ev-panel .baps-ev-flag { margin-bottom: 14px; }
.baps-ev-panel dl { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 0 0 18px; }
.baps-ev-panel dl > div { min-width: 150px; }
.baps-ev-panel dt { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--c-sub); }
[dir="rtl"] .baps-ev-panel dt { letter-spacing: 0; font-size: .82rem; }
.baps-ev-panel dd { margin: 2px 0 0; font-size: .98rem; font-weight: 700; color: var(--c-ink); }
/* Buttons inside article text keep their button look, not the article's link style. */
.entry-content .baps-cme .baps-cme-btn { text-decoration: none; }
.entry-content .baps-cme .baps-cme-btn-primary { color: #fff; }
.entry-content .baps-cme .baps-cme-btn-outline { color: var(--c-navy); }
.entry-content .baps-cme .baps-cme-btn-outline:hover { color: var(--c-crimson); }

/* ==========================================================================
   Find a Plastic Surgeon
   ========================================================================== */

.baps-sd-search { margin: 0 0 26px; padding: 20px 22px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 10px; }
.baps-sd-search-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 18px; }
.baps-sd-field { display: flex; flex-direction: column; gap: 6px; }
.baps-sd-field-wide { grid-column: span 2; }
.baps-sd-field > span { font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--c-sub); }
[dir="rtl"] .baps-sd-field > span { letter-spacing: 0; font-size: .82rem; }
.baps-sd-field input, .baps-sd-field select { width: 100%; padding: 10px 12px; font: inherit; font-size: .95rem; color: var(--c-ink); background: #fff; border: 1px solid var(--c-line); border-radius: 6px; }
.baps-sd-field input:focus, .baps-sd-field select:focus { outline: 2px solid var(--c-crimson); outline-offset: 1px; }
.baps-sd-count { margin: 14px 0 0; font-size: .88rem; color: var(--c-sub); }
.baps-sd-none { margin: 20px 0; color: var(--c-sub); }

.baps-sd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px; }
.baps-sd-card { display: flex; gap: 16px; padding: 20px; background: #fff; border: 1px solid var(--c-line); border-radius: 10px; }
.baps-sd-card[hidden] { display: none; }
.baps-sd-card-photo { flex: 0 0 74px; width: 74px; height: 74px; overflow: hidden; border-radius: 50%; background: var(--c-surface); display: flex; align-items: center; justify-content: center; }
.baps-sd-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.baps-sd-card-body { min-width: 0; }
.baps-cme .baps-sd-card-body h3 { margin: 0 0 3px; font-size: 1.05rem; font-weight: 800; color: var(--c-ink); }
.baps-sd-card-body h3 a { color: inherit; text-decoration: none; }
.baps-sd-card-body h3 a:hover { color: var(--c-crimson); }
.baps-sd-card-title { margin: 0 0 10px; font-size: .88rem; color: var(--c-sub); }
.baps-sd-card-line { margin: 0 0 5px; font-size: .88rem; color: var(--c-ink); }
.baps-sd-card-line > span { display: inline-block; min-width: 76px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c-sub); }
[dir="rtl"] .baps-sd-card-line > span { letter-spacing: 0; font-size: .8rem; }
.baps-sd-card-go { margin: 14px 0 0; }
.baps-sd-card-go .baps-cme-btn { padding: 9px 18px; font-size: .85rem; }

.baps-sd-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.baps-sd-pill { display: inline-block; padding: 4px 11px; font-size: .74rem; font-weight: 800; color: var(--c-navy); background: #EEF2F7; border-radius: 999px; }
.baps-sd-pill-ok { color: #1C6B2C; background: #E3F4E6; }

.baps-sd-head { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; padding: 0 0 26px; border-bottom: 1px solid var(--c-line); }
.baps-sd-head-photo { flex: 0 0 132px; width: 132px; height: 132px; overflow: hidden; border-radius: 12px; background: var(--c-surface); display: flex; align-items: center; justify-content: center; }
.baps-sd-head-photo img { width: 100%; height: 100%; object-fit: cover; }
.baps-sd-head-id { flex: 1 1 280px; }
.baps-cme .baps-sd-head-id h1 { margin: 0 0 4px; font-size: 1.7rem; font-weight: 800; color: var(--c-ink); }
.baps-sd-head-title { margin: 0 0 12px; font-size: 1rem; color: var(--c-sub); }

.baps-sd-verified { display: inline-block; margin-top: 4px; }
.baps-sd-verified > summary { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: .84rem; font-weight: 800; color: #1C6B2C; background: #E3F4E6; border: 1px solid #BFE3C6; border-radius: 8px; cursor: pointer; list-style: none; }
.baps-sd-verified > summary::-webkit-details-marker { display: none; }
.baps-sd-tick { width: 15px; height: 15px; background: currentColor; -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat; }
.baps-sd-info { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; font-size: .7rem; font-style: italic; font-weight: 700; color: #fff; background: #1C6B2C; border-radius: 50%; }
.baps-sd-verified-body { max-width: 560px; margin-top: 10px; padding: 14px 16px; font-size: .86rem; line-height: 1.65; color: var(--c-ink); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 8px; }
.baps-sd-verified-body p { margin: 0 0 8px; }
.baps-sd-verified-body p:last-child { margin: 0; }
.baps-sd-dates { color: var(--c-sub); }

.baps-sd-cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 34px; margin-top: 30px; }
.baps-sd-sec { margin: 0 0 30px; }
.baps-cme .baps-sd-sec h2 { margin: 0 0 10px; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--c-sub); }
[dir="rtl"] .baps-cme .baps-sd-sec h2 { letter-spacing: 0; font-size: .9rem; }
.baps-cme .baps-sd-subh { margin: 14px 0 8px; font-size: .9rem; font-weight: 800; color: var(--c-ink); }
.baps-sd-specialty { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--c-ink); }
.baps-sd-hint { margin: 6px 0 0; font-size: .84rem; color: var(--c-sub); }
.baps-sd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.baps-sd-chips li { padding: 7px 13px; font-size: .86rem; font-weight: 600; color: var(--c-ink); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 999px; }
.baps-sd-list { margin: 0; padding-inline-start: 20px; }
.baps-sd-list li { margin: 0 0 6px; font-size: .95rem; color: var(--c-ink); }
.baps-sd-box { padding: 20px 22px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 10px; }
.baps-sd-loc-out { padding: 0 0 16px; margin: 0 0 16px; border-bottom: 1px solid var(--c-line); }
.baps-sd-loc-out:last-of-type { padding: 0; margin: 0; border: 0; }
.baps-sd-loc-name { margin: 0 0 3px; font-weight: 800; color: var(--c-ink); }
.baps-sd-loc-where { margin: 0 0 8px; font-size: .86rem; color: var(--c-sub); }
.baps-sd-loc-line { margin: 0 0 4px; font-size: .9rem; }
.baps-sd-loc-line > span { display: inline-block; min-width: 62px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c-sub); }
[dir="rtl"] .baps-sd-loc-line > span { letter-spacing: 0; font-size: .8rem; }
.baps-sd-back { margin: 22px 0 0; font-size: .9rem; }

.baps-sd-about { margin: 34px 0 0; padding: 22px 24px; background: var(--c-surface); border: 1px solid var(--c-line); border-inline-start: 4px solid var(--c-navy); border-radius: 8px; }
.baps-cme .baps-sd-about h2 { margin: 0 0 8px; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--c-sub); }
[dir="rtl"] .baps-cme .baps-sd-about h2 { letter-spacing: 0; font-size: .9rem; }
.baps-sd-about p { margin: 0; font-size: .87rem; line-height: 1.75; color: var(--c-sub); }

/* The member's own listing form */
.baps-sd-state { margin: 0 0 14px; padding: 10px 14px; font-size: .9rem; background: var(--c-surface); border-radius: 6px; }
.baps-sd-state-published { background: #E3F4E6; }
.baps-sd-state-pending, .baps-sd-state-changes_pending { background: #FCF3D7; }
.baps-sd-state-unlisted { background: #FBE5E5; }
.baps-cme .baps-sd-h { margin: 26px 0 6px; font-size: 1rem; font-weight: 800; color: var(--c-ink); }
.baps-sd-group { margin: 14px 0 8px; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--c-sub); }
[dir="rtl"] .baps-sd-group { letter-spacing: 0; font-size: .85rem; }
.baps-sd-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }
.baps-sd-check { display: flex; align-items: flex-start; gap: 9px; font-size: .92rem; color: var(--c-ink); cursor: pointer; }
.baps-sd-check input { margin-top: 3px; }
.baps-sd-loc { margin: 12px 0 18px; padding: 16px 18px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 8px; }

@media (max-width: 860px) {
  .baps-sd-cols { grid-template-columns: 1fr; gap: 0; }
  .baps-sd-field-wide { grid-column: span 1; }
  .baps-sd-head-photo { flex-basis: 96px; width: 96px; height: 96px; }
}
.baps-sd-head-title { font-size: 1.15rem; font-weight: 700; color: var(--c-ink); margin: 0 0 2px; }
.baps-sd-head-spec { margin: 0 0 12px; font-size: .92rem; color: var(--c-sub); }

/* ==========================================================================
   Certificate of membership: the card and its gold button
   ========================================================================== */

.baps-cert-card {
  position: relative; border-top: 3px solid #BA9233;
  background: linear-gradient(180deg, #FFFDF7 0%, #FFFFFF 62%);
}
.baps-cert-actions { margin: 18px 0 14px; }

.baps-cert-btn {
  display: flex; align-items: center; gap: 14px; width: 100%; box-sizing: border-box;
  padding: 15px 18px; text-decoration: none; border-radius: 8px; cursor: pointer;
  color: #3D2B06 !important;
  background: linear-gradient(135deg, #B8912F 0%, #E4CB86 34%, #C9A227 58%, #9E7A1E 100%);
  border: 1px solid #93711A;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), inset 0 0 0 3px rgba(255,255,255,.22), 0 4px 14px rgba(146,112,26,.35);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.baps-cert-btn:hover {
  transform: translateY(-1px); filter: brightness(1.05); color: #3D2B06 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), inset 0 0 0 3px rgba(255,255,255,.3), 0 8px 20px rgba(146,112,26,.42);
}
.baps-cert-btn:active { transform: translateY(0); }
/* A band of light across the gold, the way a struck medal catches it. */
.baps-cert-btn { position: relative; overflow: hidden; }
.baps-cert-btn::after {
  content: ""; position: absolute; top: -60%; bottom: -60%; left: -20%; width: 38%;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.42) 50%, rgba(255,255,255,0) 100%);
  transform: rotate(8deg); pointer-events: none; transition: left .5s ease;
}
.baps-cert-btn:hover::after { left: 84%; }
.baps-cert-btn:focus-visible { outline: 2px solid var(--c-navy); outline-offset: 3px; }

/* A little rosette seal, drawn rather than loaded. */
.baps-cert-btn-seal {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #FFF3CF 0%, #E0C173 42%, #A9831D 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.5), 0 1px 3px rgba(61,43,6,.35);
  position: relative;
}
.baps-cert-btn-seal::before {
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  border: 1px solid rgba(61,43,6,.45);
}
.baps-cert-btn-seal::after {
  content: ""; position: absolute; inset: 9px; background: #3D2B06;
  -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.baps-cert-btn-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: start; }
.baps-cert-btn-words .t {
  font-family: "P052", Palatino, "Palatino Linotype", Georgia, serif;
  font-size: 1.02rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; line-height: 1.2;
  text-shadow: 0 1px 0 rgba(255,255,255,.45);
}
[dir="rtl"] .baps-cert-btn-words .t { letter-spacing: 0; text-transform: none; }
.baps-cert-btn-words .s { font-size: .76rem; font-weight: 600; color: #5B4310; }

/* Inside an article the theme underlines links; this one is a button. */
.entry-content .baps-cert-btn, .entry-content .baps-cert-btn:hover { text-decoration: none; }

/* ---- Session mode, revision source, keyboard hint ---- */
.baps-cme .baps-cme-seg button:disabled { opacity: .45; cursor: not-allowed; }
.baps-cme .baps-cme-seg-sm button { padding: 7px 14px; font-size: .8rem; }
.baps-cme-hint { margin: 8px 0 0; font-size: .8rem; color: var(--c-sub); line-height: 1.5; }
.baps-cme-keyhint { margin-top: 12px; }
@media (hover: none) { .baps-cme-keyhint { display: none; } }
.baps-cme .baps-cme-cat-prog { display: block; margin-top: 3px; font-size: .78rem; font-weight: 700; color: var(--c-navy); }
.baps-cme-catgrid.is-muted { opacity: .4; pointer-events: none; }
.baps-cme .baps-cme-opt.is-picked { border-color: var(--c-navy); background: rgba(27,60,140,.06); }
.baps-cme .baps-cme-opt.is-picked .key { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }
.baps-cme-explain.wait { border-inline-start-color: var(--c-sub); }

/* ---- End-of-session review ---- */
.baps-cme-review { margin-top: 38px; padding-top: 30px; border-top: 1px solid var(--c-line); text-align: start; }
.baps-cme-review-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.baps-cme-review-head h3 { margin: 0; font-size: 1.1rem; font-weight: 800; color: var(--c-navy); }
.baps-cme-review-list.only-wrong .baps-cme-rev-item.is-right { display: none; }
.baps-cme-rev-item { margin-bottom: 10px; background: #fff; border: 1px solid var(--c-line); border-radius: 6px; overflow: hidden; }
.baps-cme-rev-item[open] { border-color: #CBD5E1; box-shadow: 0 2px 10px -6px rgba(15,23,42,.18); }
.baps-cme-rev-item > summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; font-size: .92rem; }
.baps-cme-rev-item > summary::-webkit-details-marker { display: none; }
.baps-cme-rev-item > summary:hover { background: var(--c-surface); }
.baps-cme-rev-item .n { flex: none; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--c-surface); border: 1px solid var(--c-line); font-size: .78rem; font-weight: 800; color: var(--c-navy); }
.baps-cme-rev-item .badge { flex: none; padding: 3px 10px; border-radius: 100px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; }
.baps-cme-rev-item .badge.ok { background: rgba(21,128,61,.12); color: #15803D; }
.baps-cme-rev-item .badge.no { background: rgba(175,5,22,.1); color: var(--c-crimson); }
.baps-cme-rev-item .stem { color: var(--c-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.baps-cme-rev-body { padding: 4px 22px 20px; border-top: 1px solid var(--c-line); }
.baps-cme-rev-stem { margin: 18px 0 16px; font-size: 1rem; line-height: 1.7; color: var(--c-ink); font-weight: 500; }
.baps-cme-rev-opts { list-style: none; margin: 0 0 16px; padding: 0; }
.baps-cme-rev-opt { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; margin-bottom: 7px; border: 1.5px solid var(--c-line); border-radius: 4px; background: var(--c-surface); font-size: .94rem; line-height: 1.55; }
.baps-cme-rev-opt .key { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; flex: none; border-radius: 4px; background: #fff; border: 1.5px solid #CBD5E1; font-size: .8rem; font-weight: 800; color: var(--c-navy); }
.baps-cme-rev-opt.is-correct { border-color: #15803D; background: rgba(21,128,61,.07); }
.baps-cme-rev-opt.is-correct .key { background: #15803D; border-color: #15803D; color: #fff; }
.baps-cme-rev-opt.is-wrong { border-color: var(--c-crimson); background: rgba(175,5,22,.06); }
.baps-cme-rev-opt.is-wrong .key { background: var(--c-crimson); border-color: var(--c-crimson); color: #fff; }
.baps-cme-rev-yours { margin: 0 0 16px; font-size: .9rem; color: var(--c-sub); }
@media (max-width: 760px) {
  .baps-cme-rev-body { padding: 4px 16px 18px; }
  .baps-cme-rev-item > summary { padding: 12px 14px; gap: 10px; }
}
