/**
 * Accessibility overrides (audit CMEW26-01–102)
 */

:root {
  --text-body: #2d3748;
  --text-muted: #3d4a6b;
  --text-muted-accessible: #2a3349;
}

body {
  color: var(--text-body);
  line-height: 1.5;
}

.section-label,
.sub-headline,
.hero-sub,
.body-text,
.footer-col__tagline,
.stat-block__label,
.service-card__desc,
.post-card__excerpt,
.insight-card__excerpt,
.legal-section p,
.legal-section ul li,
.page-hero__sub {
  color: var(--text-muted-accessible);
}

.privacy-policy .legal-section h2,
.legal-layout .legal-section h2 {
  color: var(--ink);
}

/* CMEW26-02, CMEW26-50: skip link visible on focus (including mobile) */
.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  left: 1rem;
  clip: auto;
  width: auto;
  height: auto;
  padding: 0.75rem 1.5rem;
  overflow: visible;
  z-index: 10001;
}

/* CMEW26-06, CMEW26-22: visible focus (override outline:none) */
.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible,
.contact-form .form-group input:focus-visible,
.contact-form .form-group select:focus-visible,
.contact-form .form-group textarea:focus-visible,
.newsletter-strip__input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(200, 150, 62, 0.18);
}

/* CMEW26-25: active nav — not color alone */
.header-nav__link.active,
.header-nav__link[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  font-weight: 600;
}

.reg-anchor-nav__link.active,
.reg-anchor-nav__link[aria-current="true"] {
  text-decoration: underline;
  font-weight: 600;
}

/* CMEW26-24: minimum touch targets */
.hamburger,
.mobile-nav__close,
.footer-social__link,
.cookie-banner button,
.btn--sm,
.whatsapp-float,
.pill,
.insight-card__read-link {
  min-width: 44px;
  min-height: 44px;
}

.footer-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* CMEW26-27: relative units for key UI */
.section-label {
  font-size: 0.75rem;
}

/* CMEW26-39: avoid justified body text */
.body-text,
.legal-section p,
.post-body,
.article-body {
  text-align: left;
}

/* CMEW26-43: legal disclaimers — reduce all-caps shouting */
.footer-disclaimer,
.risk-alert span,
.form-risk-note {
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* CMEW26-33: collapsed / off-screen panels */
.mobile-nav:not(.open),
.cookie-banner:not(.visible) {
  pointer-events: none;
}

/* CMEW26-41: table headers */
table th {
  font-weight: 600;
}

.compare-table .col-attr {
  font-weight: 600;
}

/* CMEW26-44 */
.footer-bottom__copy {
  display: block;
}

/* Breadcrumbs (CMEW26-31) */
.breadcrumbs {
  font-size: 0.875rem;
  margin-bottom: 1rem;
  padding-top: 0.5rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--text-muted-accessible);
}

.breadcrumbs a[aria-current="page"] {
  font-weight: 600;
  text-decoration: underline;
}

/* Back to top (CMEW26-46) */
.back-to-top {
  position: fixed;
  bottom: 5.5rem;
  right: 1.25rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-elevated);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Turnstile region (CMEW26-36) */
.turnstile-wrap {
  position: relative;
}

.turnstile-a11y-note {
  font-size: 0.8125rem;
  color: var(--text-muted-accessible);
  margin-bottom: 0.5rem;
}

/* External link hint (CMEW26-29) — visually in a11y.js sr-only class */
.sr-external-hint {
  font-size: 0.85em;
  font-weight: 400;
}

/* Hero chart text alternative block */
.hero-chart-data {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: rgba(232, 235, 242, 0.85);
  line-height: 1.5;
}

.hero-chart-data caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

/* CMEW26-01: index problem cards */
.problem-card__text {
  font-size: 0.875rem;
  color: var(--text-muted-accessible);
  line-height: 1.65;
}

/* CMEW26-27: insights / cards use rem */
.insight-card__cat {
  font-size: 0.625rem;
}

.insight-card__title {
  font-size: 1.125rem;
}

.insight-card__excerpt {
  font-size: 0.875rem;
}

.insight-card__meta {
  font-size: 0.75rem;
}

.insight-card__read-link {
  font-size: 0.8125rem;
}

.insight-featured__meta {
  font-size: 0.8125rem;
}

/* CMEW26-34: consent error visible when invalid */
.contact-form .consent-row .error-msg {
  flex-basis: 100%;
  margin-top: 0.5rem;
  margin-left: 1.6rem;
}

/* CMEW26-48: form reload note — not a heading */
.form-subtitle__emph {
  font-weight: 600;
}

/* ── CMEW26-51: breadcrumb contrast on dark hero ── */
.page-hero__breadcrumb,
.page-hero__breadcrumb a,
.breadcrumb,
.breadcrumb a {
  color: rgba(232, 235, 242, 0.88);
}

.page-hero__breadcrumb a:hover,
.breadcrumb a:hover {
  color: var(--gold);
}

.page-hero__breadcrumb span[aria-hidden="true"],
.breadcrumb span[aria-hidden="true"] {
  color: rgba(232, 235, 242, 0.65);
}

.page-hero__sub {
  color: rgba(232, 235, 242, 0.82);
}

/* ── CMEW26-52 / 77: semantic service list on home ── */
ul.services-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: 56px;
}

ul.services-grid > li {
  margin: 0;
}

/* ── CMEW26-57 / 58: footer readability ── */
.site-footer .footer-disclaimer {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(232, 235, 242, 0.82);
}

.site-footer .footer-bottom__copy {
  font-size: 0.8125rem;
  color: rgba(247, 244, 238, 0.78);
}

.site-footer .footer-col__tagline {
  color: rgba(232, 235, 242, 0.82);
}

.site-footer .footer-links__link {
  color: rgba(232, 235, 242, 0.88);
}

/* ── CMEW26-60 / 69: links identifiable without hover ── */
.text-link,
.footer-links__link,
.insight-card__read-link,
.curated-card__read,
.blog-article__content a,
.legal-section a:not(.btn),
.page-hero__sub a,
.body-text a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.text-link:hover,
.footer-links__link:hover {
  text-decoration-thickness: 2px;
}

/* ── CMEW26-68: time element styling ── */
time {
  font-size: inherit;
}

/* ── CMEW26-76: responsive data tables ── */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0 1.5rem;
}

.table-scroll:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.table-scroll table {
  min-width: 36rem;
}

/* ── CMEW26-80: letter-spacing for body text ── */
body,
.body-text,
.legal-section p,
.service-card__desc,
.insight-card__excerpt {
  letter-spacing: 0.01em;
}

/* ── CMEW26-87: blockquote citations ── */
blockquote footer,
blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-style: normal;
  color: var(--text-muted-accessible);
}

.pull-quote footer cite,
.founder-content__quote footer cite {
  color: var(--text-muted-accessible);
}

/* ── CMEW26-88: navigation spacing ── */
.header-nav {
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

.header-nav__link {
  padding: 0.35rem 0.15rem;
}

.mobile-nav__link {
  padding: 0.65rem 0;
}

/* ── CMEW26-93: form errors — icon + text (contact) ── */
.contact-form .form-group.has-error .error-msg::before,
.contact-form .consent-row.has-error .error-msg::before {
  content: "⚠ ";
  font-weight: 700;
}

/* ── CMEW26-97: placeholder contrast ── */
.contact-form input::placeholder,
.contact-form textarea::placeholder,
.form-input::placeholder,
.newsletter-strip__input::placeholder,
.newsletter-form input::placeholder {
  color: rgba(45, 55, 72, 0.65);
}

.newsletter-form input[type="email"]::placeholder {
  color: rgba(232, 235, 242, 0.72);
}

/* ── CMEW26-101: floating action outside main — labeled ── */
.whatsapp-float {
  z-index: 800;
}

/* ── CMEW26-94: hero / dark panel text ── */
.hero-sub,
.hero-sebi-label,
.trust-badge__text {
  color: rgba(232, 235, 242, 0.88);
}

.booking-hero p,
.booking-fallback p {
  color: var(--text-muted-accessible);
}

.booking-footnote {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted-accessible);
}

/* ── CMEW26-99: contact form region title (already h2; reinforce) ── */
.contact-form-panel > h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
}

/* ── CMEW26-72: download / PDF link hint in prose ── */
a[href^="mailto:"][href*="PDF"],
.pdf-link-card {
  /* PDF cards already describe format */
}

/* Reduce redundant underline on buttons */
.btn,
.btn-submit,
.pill {
  text-decoration: none;
}

.reg-anchor-nav__link {
  text-decoration: none;
}

.reg-anchor-nav__link.active,
.reg-anchor-nav__link[aria-current="true"] {
  text-decoration: underline;
}

