/* Ophthalmology Foundation design system (V5) for WordPress core blocks.
   Loaded on the site and in the block editor. Targets the markup WordPress itself outputs, so authors use
   ordinary blocks and pick styles from the sidebar. Source of truth: oph-foundation-v5 (tokens, rules). */

:root{
  --of-teal:#016f70;--of-teal-dark:#00585a;--of-teal-pressed:#004446;
  --of-plum:#932478;--of-plum-dark:#761c60;--of-plum-pressed:#5e164c;
  --of-ink:#363840;--of-muted:#46545b;--of-tint:#ecf5f4;--of-line:#bfcfce;
  --of-display:Georgia,"Times New Roman",serif;--of-sans:"Avenir Next","Segoe UI",Arial,sans-serif;
}

/* ---- Blocksy palette mapped to the Foundation tokens. On the live site set these once in
   Appearance > Customize > Colors (no code); this block keeps the local test consistent. ---- */
:root{--theme-palette-color-1:#016f70;--theme-palette-color-2:#00585a;--theme-palette-color-3:#46545b;--theme-palette-color-4:#363840;
  --theme-palette-color-5:#bfcfce;--theme-palette-color-6:#ecf5f4;--theme-palette-color-7:#f7fafa;--theme-palette-color-8:#ffffff}

/* ---- Type: headings are regular-weight Georgia and fill their container; body text keeps a reading width. ---- */
:is(.entry-content,.editor-styles-wrapper) :is(h1,h2,h3,h4){font-family:var(--of-display);font-weight:400;color:var(--of-ink);max-width:none;letter-spacing:-.01em}
:is(.entry-content,.editor-styles-wrapper) :is(h1,h2,h3) :is(strong,b){font-weight:inherit}
:is(.entry-content,.editor-styles-wrapper) h2{font-size:clamp(28px,2.6vw,36px);line-height:1.2}
:is(.entry-content,.editor-styles-wrapper) h3{font-size:clamp(21px,1.8vw,25px);line-height:1.25}
:is(.entry-content,.editor-styles-wrapper) h4{font-family:var(--of-sans);font-weight:650;font-size:19px}
:is(.entry-content,.editor-styles-wrapper) p{font-family:var(--of-sans);font-size:18px;line-height:1.7;color:var(--of-ink)}
.entry-content > p,.entry-content > ul:not([class*="is-style-"]){max-width:72ch}

/* ---- Links in text: internal = no marker; external = ↗ (new tab); download = PDF tag. ---- */
:is(.entry-content,.editor-styles-wrapper) :is(p,ul:not([class*="is-style-"]) li,ol li) a:not(.wp-block-button__link){color:var(--of-teal);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
:is(.entry-content,.editor-styles-wrapper) :is(p,ul:not([class*="is-style-"]) li,ol li) a:not(.wp-block-button__link):hover{color:var(--of-plum);text-decoration-thickness:2px}
:is(.entry-content,.editor-styles-wrapper) :is(p,ul:not([class*="is-style-"]) li,ol li) a:not(.wp-block-button__link):active{color:var(--of-plum-dark)}
:is(.entry-content,.editor-styles-wrapper) p a[target="_blank"]:not([href$=".pdf" i])::after{content:"\2197";content:"\2197" / "";margin-left:3px;font-size:.85em;display:inline-block;text-decoration:none}
:is(.entry-content,.editor-styles-wrapper) p a[href$=".pdf" i]::after{content:"PDF";display:inline-block;margin-left:6px;padding:0 5px;border:1px solid var(--of-line);font:600 11px/1.5 var(--of-sans);color:var(--of-muted);letter-spacing:.04em;vertical-align:2px;text-decoration:none}
:is(.entry-content,.editor-styles-wrapper) a:focus-visible{outline:3px solid var(--of-plum);outline-offset:4px}

/* ---- Buttons: Fill = primary (teal), Outline = secondary, Accent = giving (plum). External buttons show ↗. ---- */
.wp-block-button .wp-block-button__link{display:inline-flex;align-items:center;gap:12px;min-height:48px;padding:11px 18px;border:2px solid var(--of-teal);border-radius:0;background:var(--of-teal);color:#fff;font:600 16px/1.4 var(--of-sans);text-decoration:none;transition:background-color .15s ease,border-color .15s ease,color .15s ease}
.wp-block-button .wp-block-button__link::after{content:"\2192";content:"\2192" / "";transition:transform .15s ease}
.wp-block-button .wp-block-button__link[target="_blank"]::after{content:"\2197";content:"\2197" / ""}
.wp-block-button .wp-block-button__link:hover{background:var(--of-teal-dark);border-color:var(--of-teal-dark);color:#fff}
.wp-block-button .wp-block-button__link:hover::after{transform:translateX(4px)}
.wp-block-button .wp-block-button__link:active{background:var(--of-teal-pressed);border-color:var(--of-teal-pressed);transform:translateY(1px)}
body .wp-block-buttons .wp-block-button.is-style-outline .wp-block-button__link{background:#fff;color:var(--of-teal);border-color:var(--of-teal)}
body .wp-block-buttons .wp-block-button.is-style-outline .wp-block-button__link:hover{background:var(--of-teal);color:#fff}
body .wp-block-buttons .wp-block-button.is-style-accent .wp-block-button__link{background:var(--of-plum);border-color:var(--of-plum)}
body .wp-block-buttons .wp-block-button.is-style-accent .wp-block-button__link:hover{background:var(--of-plum-dark);border-color:var(--of-plum-dark)}
.wp-block-button .wp-block-button__link:focus-visible{outline:3px solid var(--of-plum);outline-offset:4px}

/* ---- List block styles. ---- */
ul.is-style-link-list{list-style:none;margin:1em 0 1.4em;padding:0;border-top:1px solid var(--of-line)}
ul.is-style-link-list li{position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;margin:0;min-height:48px;padding:10px 30px 10px 4px;border-bottom:1px solid var(--of-line);font:400 16px/1.4 var(--of-sans);color:var(--of-muted)}
ul.is-style-link-list li::after{content:"\2192";content:"\2192" / "";position:absolute;right:6px;top:0;bottom:0;display:flex;align-items:center;color:var(--of-teal);font-size:18px;transition:transform .15s ease}
ul.is-style-link-list li:hover::after{transform:translateX(4px);color:var(--of-plum)}
ul.is-style-link-list li a{color:var(--of-ink);font:600 17px/1.35 var(--of-sans);text-decoration:none}
ul.is-style-link-list li a::before{content:"";position:absolute;inset:0}
ul.is-style-link-list li a:hover{color:var(--of-plum)}
ul.is-style-link-list li a:focus-visible{outline:none}
ul.is-style-link-list li:focus-within{outline:3px solid var(--of-plum);outline-offset:2px}
ul.is-style-link-list a[href$=".pdf" i]::after{content:"PDF";margin-left:10px;padding:1px 6px;border:1px solid var(--of-line);font:600 12px/1.4 var(--of-sans);color:var(--of-muted)}
ul.is-style-link-list a[target="_blank"]:not([href$=".pdf" i])::after{content:"\2197";content:"\2197" / "";margin-left:8px;padding:0 5px;border:1px solid var(--of-line);font:600 12px/1.4 var(--of-sans);color:var(--of-muted)}
ul.is-style-jump-links{display:flex;flex-wrap:wrap;gap:8px;list-style:none;margin:1.2em 0 1.6em;padding:14px 16px;border:1px solid var(--of-line);border-left:4px solid var(--of-teal)}
ul.is-style-jump-links::before{content:"On this page";flex-basis:100%;font:650 14px/1.4 var(--of-sans);color:var(--of-muted);text-transform:uppercase;letter-spacing:.06em}
ul.is-style-jump-links li{margin:0}
ul.is-style-jump-links a{display:inline-flex;align-items:center;min-height:40px;padding:6px 14px;border:1px solid var(--of-teal);border-radius:20px;background:#fff;color:var(--of-teal);font:600 15px/1.3 var(--of-sans);text-decoration:none}
ul.is-style-jump-links a::before{content:"\2193";content:"\2193" / "";margin-right:6px}
ul.is-style-jump-links a:hover{background:var(--of-teal);color:#fff}
ul.is-style-inline{display:flex;flex-wrap:wrap;list-style:none;margin:0 0 22px;padding:0}
ul.is-style-inline li{margin:0;font:400 18px/1.7 var(--of-sans);color:var(--of-ink)}
ul.is-style-inline li:not(:last-child)::after{content:"\00B7";margin:0 10px;color:var(--of-muted)}
ul.is-style-checklist{list-style:none;margin:0;padding:0;display:grid;gap:10px}
ul.is-style-checklist li{position:relative;margin:0;padding:12px 14px 12px 46px;background:#fff;border:1px solid var(--of-line);font:400 17px/1.5 var(--of-sans)}
ul.is-style-checklist li::before{content:"";position:absolute;left:14px;top:14px;width:20px;height:20px;border-radius:50%;background:var(--of-teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center/14px no-repeat}

/* ---- Group block styles. ---- */
.wp-block-group.is-style-band{background:var(--of-tint);padding:clamp(40px,5vw,72px) clamp(20px,4vw,48px)}
.wp-block-group.is-style-teal-band{background:var(--of-teal);color:#fff;padding:clamp(40px,5vw,72px) clamp(20px,4vw,48px)}
.wp-block-group.is-style-teal-band :is(h2,h3,p){color:#fff}
/* On the teal band: primary turns white, outline turns white-on-transparent, accent (giving) stays plum. */
body .wp-block-group.is-style-teal-band .wp-block-buttons .wp-block-button .wp-block-button__link{background:#fff;color:var(--of-teal);border-color:#fff}
body .wp-block-group.is-style-teal-band .wp-block-buttons .wp-block-button.is-style-outline .wp-block-button__link{background:transparent;color:#fff;border-color:#fff}
body .wp-block-group.is-style-teal-band .wp-block-buttons .wp-block-button.is-style-accent .wp-block-button__link{background:var(--of-plum);color:#fff;border-color:var(--of-plum)}
body .wp-block-group.is-style-teal-band .wp-block-buttons .wp-block-button .wp-block-button__link:focus-visible{outline-color:#fff}
.wp-block-group.is-style-card{background:#fff;border:1px solid var(--of-line);border-top:4px solid var(--of-teal);padding:22px}
.wp-block-group.is-style-rule-above{border-top:3px solid var(--of-teal);padding-top:18px}
/* Numbered steps: each Group inside is numbered automatically (add, remove or reorder freely). */
.wp-block-group.is-style-step-path{counter-reset:of-step}
.wp-block-group.is-style-step-path > *{counter-increment:of-step;position:relative;background:#fff;border-top:4px solid var(--of-teal);padding:56px 22px 22px}
.wp-block-group.is-style-step-path > *::before{content:counter(of-step);position:absolute;top:16px;left:22px;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--of-teal);color:#fff;font:600 15px var(--of-sans)}

/* ---- Details (accordions, subject lists, committees). ---- */
details.wp-block-details{border-top:1px solid var(--of-line);padding:0}
details.wp-block-details summary{cursor:pointer;list-style:none;min-height:44px;padding:12px 30px 12px 0;position:relative;font:650 16px/1.4 var(--of-sans);color:var(--of-teal)}
details.wp-block-details summary::-webkit-details-marker{display:none}
details.wp-block-details summary::after{content:"+";position:absolute;right:4px;top:8px;font-size:22px}
details.wp-block-details[open] summary::after{content:"\2013"}

/* ---- Gallery: Logos style. ---- */
.wp-block-gallery.is-style-logos .wp-block-image{background:var(--of-tint);border:0;padding:24px;display:grid;place-items:center}
.wp-block-gallery.is-style-logos .wp-block-image img{object-fit:contain!important;width:100%!important;height:auto!important;aspect-ratio:1/1;padding:9%;background:#fff;box-sizing:border-box}

@media (prefers-reduced-motion:reduce){.wp-block-button .wp-block-button__link,.wp-block-button .wp-block-button__link::after,ul.is-style-link-list li::after{transition:none}}

:is(.entry-content,.editor-styles-wrapper) :is(h2,h3) a{color:var(--of-ink);text-decoration:none}
:is(.entry-content,.editor-styles-wrapper) :is(h2,h3) a:hover{color:var(--of-plum);text-decoration:underline;text-underline-offset:5px}
