/* Loom & Fiber — accessibility fixes (2026-11-21). Loaded last on every page (inc/a11y.php).
   Kept separate so it can't clash with work in style.css / site-chrome.css. Audit: tooling/a11y_run_all.sh (axe-core). */

/* Dark mode: global dark link colours were overriding these buttons. */
html[data-theme="dark"] .lfch-project__start,html[data-theme="dark"] .lfch-project__start:visited{color:#211f1c}
html[data-theme="dark"] #submit,html[data-theme="dark"] .form-submit input[type=submit]{color:#121411}

/* Dark mode: gold labels on dark panels need a lighter gold. */
html[data-theme="dark"] .lf-about-step-number,html[data-theme="dark"] .lf-contact-bottom__ornament{color:#c4a679}

/* Search boxes whose input removes the outline: show focus on the box instead (WCAG 2.4.7). */
.lf-category-search:focus-within,.lf-sitemap-search:focus-within{border-color:#a63f1e;box-shadow:0 0 0 3px rgba(166,63,30,.22)}
html[data-theme="dark"] .lf-category-search:focus-within,html[data-theme="dark"] .lf-sitemap-search:focus-within{border-color:#e0a175;box-shadow:0 0 0 3px rgba(224,161,117,.3)}

/* Language menu items: visible keyboard focus, not just a background tint. */
.lf-lang__item:focus-visible{outline:2px solid #a63f1e!important;outline-offset:-2px}

/* Scrollable tables in articles become keyboard-focusable (a11y.js adds tabindex); show focus. */
.wp-block-table[tabindex]:focus-visible{outline:2px solid #a63f1e;outline-offset:2px}

/* GENERATED by tooling/a11y_contrast_overrides.py — do not edit by hand; re-run the script. */
html:not([data-theme="dark"]) .lf-kicker{color:#6e5839}
html:not([data-theme="dark"]) .lf-header-brand__wordmark small{color:#59635c}
html:not([data-theme="dark"]) .lf-home-button--light span{color:#6e5839}
html:not([data-theme="dark"]) .lf-about-eyebrow{color:#6e5839}
html:not([data-theme="dark"]) .lf-about-hero h1 em{color:#6e5839}
html:not([data-theme="dark"]) .lf-about-label{color:#6e5839}
html:not([data-theme="dark"]) .lf-about-card-number{color:#6e5839}
html:not([data-theme="dark"]) .lf-about-step-number{color:#6e5839}
html:not([data-theme="dark"]) .lf-write-eyebrow{color:#6e5839}
html:not([data-theme="dark"]) .lf-write-nav span{color:#6e5839}
html:not([data-theme="dark"]) .lf-write-topic-grid article>span,html:not([data-theme="dark"]) .lf-write-standard-grid article>span{color:#6e5839}
html:not([data-theme="dark"]) .lf-write-checklist li:before{color:#6e5839}
html:not([data-theme="dark"]) .lf-write-steps li>span{color:#6e5839}
html:not([data-theme="dark"]) .lf-write-faq-items summary:after{color:#6e5839}
html:not([data-theme="dark"]) .lf-contact-eyebrow{color:#6e5839}
html:not([data-theme="dark"]) .lf-contact-aside__items>div>span{color:#6e5839}
html:not([data-theme="dark"]) .lf-contact-bottom__ornament{color:#6e5839}
html:not([data-theme="dark"]) .lf-blog-page{--lb-muted:#665e53;--lb-accent:#a63f1e}
html:not([data-theme="dark"]) .lf-single-page{--la-muted:#665e53;--la-accent:#a63f1e}
html:not([data-theme="dark"]) .lf-category-page{--lc-muted:#665e53;--lc-accent:#a63f1e}
html:not([data-theme="dark"]) .lf-journal-card__date{color:#665e53}
html:not([data-theme="dark"]) .lf-journal-card__footer{color:#665e53}
html:not([data-theme="dark"]) .lf-announcement a{color:#a63f1e}
html:not([data-theme="dark"]) .lf-sitemap{--sm-soft:#665e53}
html:not([data-theme="dark"]) .lf-sitemap-section-heading>span{color:#665e53}
html:not([data-theme="dark"]) .lf-sitemap-topic small{color:#665e53}
html:not([data-theme="dark"]) .lf-sitemap-link-list time{color:#665e53}
html:not([data-theme="dark"]) .lf-sitemap-bottom{color:#665e53}
html:not([data-theme="dark"]) .lf-blog-menu-item>.lf-blog-mega-toggle{color:#665e53}
html:not([data-theme="dark"]) .lf-blog-mega__topics h3,html:not([data-theme="dark"]) .lf-blog-mega__stories h3{color:#665e53}
html:not([data-theme="dark"]) .lf-blog-mega__story-text small{color:#665e53}
html:not([data-theme="dark"]) .lf-resources{--lr-muted:#665e53}
html:not([data-theme="dark"]) .lf-resource-glossary__copy small{color:#665e53}
html:not([data-theme="dark"]) .lf-resource-menu-item>.lf-resource-mega-toggle{color:#665e53}
html:not([data-theme="dark"]) .lf-resource-mega__guides h3,html:not([data-theme="dark"]) .lf-resource-mega__tools h3{color:#665e53}
html:not([data-theme="dark"]) .lf-resource-mega__guides small{color:#665e53}
html:not([data-theme="dark"]) .lf-search-disclosure .search-form input[type=search]::placeholder{color:#665e53}
html:not([data-theme="dark"]) .lf-search-results__summary{color:#665e53}
html:not([data-theme="dark"]) .lf-search-results .lf-post-meta{color:#665e53}
html:not([data-theme="dark"]) .lf-search-discover__head>div>span,html:not([data-theme="dark"]) .lf-search-prompts>span{color:#a63f1e}
html:not([data-theme="dark"]) .lf-search-discover__head>p{color:#665e53}
html:not([data-theme="dark"]) .lf-search-prompts>span{color:#665e53}
html:not([data-theme="dark"]) .lf-not-found__eyebrow>span{color:#665e53}
html:not([data-theme="dark"]) .lf-not-found__caption{color:#665e53}
@media(max-width:1000px){html:not([data-theme="dark"]) .lf-mobile-nav__heading small{color:#665e53}}
html:not([data-theme="dark"]) #lf-primary-navigation .lfm .lfm__eyebrow{color:#6e5839}
html:not([data-theme="dark"]) .lf-lang__title{color:#6e5839}
/* END GENERATED */

/* Labels on dark panels that stay dark in light mode: lighter gold/terracotta (overrides the generated light-mode shades above). */
html:not([data-theme="dark"]) .lf-about-evidence__panel .lf-about-eyebrow,
html:not([data-theme="dark"]) #standards .lf-write-eyebrow,
html:not([data-theme="dark"]) .lf-write-standard-grid article>span{color:#e6cfa8}
html:not([data-theme="dark"]) .lf-category-end .lf-category-eyebrow{color:#ec9a78}
.lf-journal-close__ornament{color:#a39684}
html:not([data-theme="dark"]) .lf-journal-close h2 em{color:#ec9a78}

/* Calculator workspace: the per-tool H2 was display:none (H1 already shows the title), which broke the heading outline (H1 → H3).
   Keep it hidden visually but available to screen readers, so the outline is H1 → H2 → H3 on all 7 calculators. */
.lftcw .lftc-tool-header>h2{display:block!important;position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
