/* Adams Chimney Sweep — Design System (Ferrari-inspired) */
/* ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --red: #DA291C;
  --red-dark: #B01E0A;
  --red-gradient: linear-gradient(135deg, #b01e0a 0%, #da291c 45%, #e8351f 100%);
  --red-gradient-hover: linear-gradient(135deg, #9a1a08 0%, #c0200f 45%, #d42d1a 100%);
  --black: #000000;
  --surface-dark: #111111;
  --surface-mid: #1a1a1a;
  --surface-footer: #0d0d0d;
  --white: #FFFFFF;
  --near-black: #181818;
  --gray-dark: #666666;
  --gray-mid: #8F8F8F;
  --gray-light: #D2D2D2;
  --border: #2a2a2a;
  --border-light: #CCCCCC;
  --font-display: 'Bebas Neue', Arial, sans-serif;
  --font-body: 'DM Sans', Helvetica, sans-serif;
  --radius: 2px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ============================================================
   NAVIGATION
   ============================================================ */

#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}

.nav-logo { display: flex; align-items: center; }
.logo-img {
  height: 68px !important;
  width: auto;
  filter: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gray-mid);
  padding: 10px 16px;
  border-radius: var(--radius);
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active { color: var(--white); }

.nav-links a.nav-cta {
  background: var(--red);
  color: var(--white) !important;
  padding: 10px 20px;
  letter-spacing: 1px;
}

.nav-links a.nav-cta:hover { background: var(--red-dark); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   FLOATING HELP BUTTON
   ============================================================ */

.help-float {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: var(--white);
  padding: 14px 20px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 24px rgba(218,41,28,0.4);
  transition: all var(--transition);
}

.help-float:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(218,41,28,0.5);
}

/* ============================================================
   FOOTER
   ============================================================ */

#site-footer {
  background: var(--surface-footer);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 40px 48px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-logo {
  height: 72px !important;
  width: auto;
  margin-bottom: 20px;
}
.footer-tagline {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--white);
  margin-bottom: 8px;
}

.footer-cert {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-mid);
}

.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col-title {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-mid);
  font-weight: 700;
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 14px;
  color: var(--gray-light);
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--white); }

.footer-phone {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--white) !important;
}

.footer-hours {
  font-size: 13px;
  color: var(--gray-mid);
  line-height: 1.6;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-mid);
  letter-spacing: 0.5px;
}

/* ============================================================
   SHARED ELEMENTS
   ============================================================ */

.page-wrap { padding-top: 96px; }

.section { padding: 96px 40px; }
.section-narrow { max-width: 1280px; margin: 0 auto; }

.section-label {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 16px;
  font-family: var(--font-body);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: 2px;
  line-height: 1.0;
  color: var(--white);
  margin-bottom: 20px;
}

.section-title--dark { color: var(--near-black); }

.section-body {
  font-size: 17px;
  color: var(--gray-mid);
  line-height: 1.7;
  max-width: 600px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 16px 32px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  min-height: 52px;
}

.btn-primary {
  background: linear-gradient(135deg, #b01e0a 0%, #da291c 45%, #e8351f 100%);
  color: var(--white);
  border: none;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #9a1a08 0%, #c0200f 45%, #d42d1a 100%);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--white);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

.btn-dark {
  background: var(--white);
  color: var(--near-black);
  border: 1px solid var(--near-black);
}
.btn-dark:hover { background: var(--near-black); color: var(--white); }

/* Trust badges */
.trust-bar {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.trust-badge svg { color: var(--red); flex-shrink: 0; }

/* Stars */
.stars { color: #F6C90E; font-size: 18px; letter-spacing: 2px; }

/* Divider */
.divider { height: 1px; background: var(--border); }
.divider-light { height: 1px; background: #e5e5e5; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .nav-inner { padding: 0 20px; }
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: rgba(0,0,0,0.98);
    flex-direction: column;
    padding: 24px 20px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 20px; font-size: 15px; width: 100%; }

  .section { padding: 64px 20px; }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 48px 20px 32px;
  }

  .footer-bottom { padding: 16px 20px; flex-direction: column; gap: 8px; }

  .help-float { bottom: 20px; right: 20px; padding: 12px 16px; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ============================================================
   NEED HELP BUTTON + CHAT WIDGET
   ============================================================ */

.need-help-btn {
  position: fixed;
  bottom: 32px;
  left: 32px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-mid);
  color: var(--white);
  border: 1px solid var(--border);
  padding: 14px 20px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.need-help-btn:hover {
  background: var(--near-black);
  border-color: var(--gray-mid);
  transform: translateY(-2px);
}

.need-help-btn.hidden { display: none; }

.chat-online-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Chat Panel */
.chat-panel {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 950;
  width: 380px;
  max-height: 560px;
  background: var(--surface-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 64px rgba(0,0,0,0.6);
  transform: scale(0.95) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}

.chat-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--near-black);
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
}

.chat-header-info { display: flex; align-items: center; gap: 12px; }

.chat-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.chat-header-name {
  font-size: 14px; font-weight: 700; color: var(--white);
}

.chat-header-status {
  font-size: 11px; color: #22c55e; letter-spacing: 0.5px;
}

.chat-human-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gray-mid);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 50px;
  font-family: var(--font-body);
  transition: all var(--transition);
  white-space: nowrap;
}

.chat-human-btn:hover {
  border-color: #22c55e;
  color: #22c55e;
}

.chat-close-btn {
  background: transparent;
  border: none;
  color: var(--gray-mid);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: var(--radius);
  transition: color var(--transition);
}

.chat-close-btn:hover { color: var(--white); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  max-height: 300px;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.chat-msg { display: flex; }

.chat-msg--bot { justify-content: flex-start; }
.chat-msg--user { justify-content: flex-end; }

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.chat-msg--bot .chat-bubble {
  background: var(--surface-mid);
  color: var(--gray-light);
  border-radius: 2px 8px 8px 8px;
}

.chat-msg--user .chat-bubble {
  background: var(--red);
  color: var(--white);
  border-radius: 8px 2px 8px 8px;
}

/* Typing indicator */
.chat-msg--typing .chat-bubble {
  display: flex; gap: 4px; align-items: center; padding: 12px 16px;
}

.typing-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gray-mid);
  animation: typing-bounce 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* Quick replies */
.chat-quick-replies {
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-quick-replies button {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gray-mid);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 50px;
  font-family: var(--font-body);
  transition: all var(--transition);
  white-space: nowrap;
}

.chat-quick-replies button:hover {
  border-color: var(--red);
  color: var(--white);
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--near-black);
  border-radius: 0 0 8px 8px;
}

.chat-input-row input {
  flex: 1;
  background: var(--surface-mid);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 50px;
  outline: none;
  transition: border-color var(--transition);
}

.chat-input-row input:focus { border-color: var(--gray-mid); }
.chat-input-row input::placeholder { color: var(--gray-dark); }

.chat-send-btn {
  width: 40px; height: 40px;
  background: var(--red);
  border: none;
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}

.chat-send-btn:hover { background: var(--red-dark); }

/* Policy Modal */
.policy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.policy-overlay.open { opacity: 1; pointer-events: all; }

.policy-modal {
  background: var(--surface-mid);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.policy-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--near-black);
  flex-shrink: 0;
}

.policy-title {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 2px;
  color: var(--white);
}

.policy-body {
  padding: 28px;
  overflow-y: auto;
  color: var(--gray-light);
  font-size: 15px;
  line-height: 1.75;
}

.policy-body h3 {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--white);
  margin: 20px 0 8px;
}

.policy-body p { margin-bottom: 12px; }
.policy-body strong { color: var(--white); }

/* Mobile chat */
@media (max-width: 480px) {
  .need-help-btn { bottom: 20px; left: 20px; }
  .chat-panel { left: 12px; right: 12px; width: auto; bottom: 12px; }
}

/* ── LOGO OVERRIDES (no-bg, bigger) ── */
.logo-img {
  height: 68px !important;
  width: auto;
  filter: none;
}

.footer-logo {
  height: 72px !important;
  width: auto;
  margin-bottom: 20px;
}

.footer-areas {
  font-size: 12px;
  color: var(--gray-dark);
  letter-spacing: 0.5px;
  margin-top: 6px;
}

/* Login nav link */
.nav-links a.nav-login {
  color: var(--gray-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.nav-links a.nav-login:hover { color: var(--white); border-color: var(--gray-mid); }

/* Logged-in state — shows user's first name */
.nav-links a.nav-user {
  color: var(--white);
  border-color: var(--red);
}
.nav-links a.nav-user:hover { border-color: var(--white); }

/* ============================================================
   ACCESSIBILITY TOOLBAR — accessibility-toolbar.css
   Drop-in overlay component. No framework required.
   ============================================================ */

/* ── Reset isolation ── */
#a11y-toolbar,
#a11y-toolbar * {
  box-sizing: border-box;
}

/* ── CSS Custom Properties (toolbar-scoped) ── */
#a11y-toolbar {
  --at-bg: #1a1a2e;
  --at-surface: #16213e;
  --at-border: rgba(255,255,255,0.1);
  --at-white: #ffffff;
  --at-gray: #a0aec0;
  --at-radius: 10px;
  --at-btn-size: 52px;
  --at-transition: 0.18s ease;
  --at-focus-ring: 0 0 0 3px rgba(99,179,237,0.8);

  /* Button color palette (Recite Me–inspired) */
  --at-col-text:     #3b82f6;
  --at-col-font:     #8b5cf6;
  --at-col-contrast: #f59e0b;
  --at-col-color:    #10b981;
  --at-col-reading:  #ef4444;
  --at-col-nav:      #06b6d4;
  --at-col-reset:    #6b7280;
  --at-col-tts:      #f97316;
}

/* ── Toolbar wrapper ── */
#a11y-toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1;
  overflow: visible;
}

/* ── Open/close toggle tab ── */
#a11y-toggle-tab {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,0.15);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  color: #ffffff;
  cursor: pointer;
  padding: 8px 20px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: background var(--at-transition);
  min-height: 36px;
  font-family: inherit;
}

#a11y-toggle-tab:hover {
  background: #252545;
}

#a11y-toggle-tab:focus-visible {
  outline: none;
  box-shadow: var(--at-focus-ring);
}

#a11y-toggle-tab .at-tab-icon {
  font-size: 14px;
  line-height: 1;
}

/* ── Main bar panel ── */
#a11y-bar {
  background: var(--at-bg);
  border-top: 1px solid var(--at-border);
  padding: 12px 16px 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
  transform-origin: bottom center;
}

#a11y-bar::-webkit-scrollbar {
  height: 3px;
}
#a11y-bar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

/* Collapsed state */
#a11y-toolbar.at-collapsed #a11y-bar {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  position: absolute;
  bottom: 0;
}

#a11y-toolbar.at-collapsed #a11y-toggle-tab {
  bottom: 0;
}

/* ── Section groups ── */
.at-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.at-group-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--at-gray);
  white-space: nowrap;
  text-align: center;
  width: 100%;
}

.at-group-btns {
  display: flex;
  gap: 5px;
  align-items: center;
}

/* ── Separator ── */
.at-sep {
  width: 1px;
  height: 52px;
  background: var(--at-border);
  flex-shrink: 0;
  align-self: center;
}

/* ── Buttons ── */
.at-btn {
  position: relative;
  width: var(--at-btn-size);
  height: var(--at-btn-size);
  border: none;
  border-radius: var(--at-radius);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  background: var(--at-surface);
  color: var(--at-white);
  transition: transform var(--at-transition),
              box-shadow var(--at-transition),
              background var(--at-transition);
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

/* Color accent stripe at top */
.at-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 6px;
  right: 6px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: currentColor;
  opacity: 0.6;
  transition: opacity var(--at-transition), height var(--at-transition);
}

/* Tooltip on hover — appears ABOVE button as a large pill label */
/* Rendered by JS as a fixed element to avoid overflow clipping   */
.at-btn::after {
  display: none; /* disabled — using #at-fixed-tooltip instead */
}

.at-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.at-btn:hover::before {
  opacity: 1;
  height: 4px;
}

/* ── Fixed tooltip element (JS-driven, body-level) ── */
#at-fixed-tooltip {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
  bottom: 0;
  left: 0;

  /* Pill style matching screenshot */
  background: #1a1a2e;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  padding: 9px 22px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.22);
  box-shadow: 0 6px 24px rgba(0,0,0,0.55);

  /* Hidden by default */
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

#at-fixed-tooltip.at-tip-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.at-btn:focus-visible {
  outline: none;
  box-shadow: var(--at-focus-ring);
}

.at-btn:active {
  transform: translateY(-1px);
}

/* Active / pressed state */
.at-btn[aria-pressed="true"] {
  background: rgba(255,255,255,0.12);
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.at-btn[aria-pressed="true"]::before {
  opacity: 1;
  height: 4px;
}

/* Button icon */
.at-btn-icon {
  font-size: 20px;
  line-height: 1;
  pointer-events: none;
}

/* Button label — hidden, kept for legacy compat */
.at-btn-label {
  display: none;
}

/* ── Color-coded groups ── */
/* Text size group — blue */
.at-group--text .at-btn { color: var(--at-col-text); }

/* Font / readability — purple */
.at-group--font .at-btn { color: var(--at-col-font); }

/* Contrast / color — amber */
.at-group--contrast .at-btn { color: var(--at-col-contrast); }

/* Reading support — red/orange */
.at-group--reading .at-btn { color: var(--at-col-reading); }

/* TTS orange */
.at-group--tts .at-btn { color: var(--at-col-tts); }

/* Nav support — cyan */
.at-group--nav .at-btn { color: var(--at-col-nav); }

/* Reset — gray */
.at-group--util .at-btn { color: var(--at-col-reset); }

/* ── Live region for announcements ── */
#a11y-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Applied CSS modifications to the HOST page ── */

/* Font size */
body.at-fs-lg { font-size: 120% !important; }
body.at-fs-xl { font-size: 140% !important; }

/* Dyslexia font */
body.at-dyslexia-font,
body.at-dyslexia-font p,
body.at-dyslexia-font li,
body.at-dyslexia-font span,
body.at-dyslexia-font div,
body.at-dyslexia-font h1,
body.at-dyslexia-font h2,
body.at-dyslexia-font h3,
body.at-dyslexia-font h4,
body.at-dyslexia-font a {
  font-family: 'Comic Sans MS', 'Comic Sans', 'OpenDyslexic', Arial, sans-serif !important;
  letter-spacing: 0.05em !important;
  word-spacing: 0.1em !important;
}

/* Letter spacing */
body.at-letter-spacing,
body.at-letter-spacing p,
body.at-letter-spacing li,
body.at-letter-spacing span,
body.at-letter-spacing div {
  letter-spacing: 0.12em !important;
  word-spacing: 0.15em !important;
}

/* Line spacing */
body.at-line-spacing,
body.at-line-spacing p,
body.at-line-spacing li,
body.at-line-spacing div {
  line-height: 2.0 !important;
}

/* High contrast */
body.at-high-contrast,
body.at-high-contrast * {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.at-high-contrast a { color: #ffff00 !important; }
body.at-high-contrast img { filter: grayscale(100%) contrast(150%) !important; }

/* Dark mode */
body.at-dark-mode {
  filter: invert(1) hue-rotate(180deg);
}

body.at-dark-mode img,
body.at-dark-mode video,
body.at-dark-mode iframe {
  filter: invert(1) hue-rotate(180deg);
}

/* Light mode */
body.at-light-mode {
  background: #f8f8f8 !important;
  color: #111 !important;
  filter: brightness(1.05);
}

/* Color blindness filters */
body.at-cb-protanopia { filter: url('#at-protanopia-filter'); }
body.at-cb-deuteranopia { filter: url('#at-deuteranopia-filter'); }
body.at-cb-tritanopia { filter: url('#at-tritanopia-filter'); }

/* Highlight links */
body.at-highlight-links a {
  background: #ffff00 !important;
  color: #000 !important;
  outline: 2px solid #e65c00 !important;
  text-decoration: underline !important;
  padding: 1px 3px !important;
  border-radius: 2px !important;
}

/* Highlight headings */
body.at-highlight-headings h1,
body.at-highlight-headings h2,
body.at-highlight-headings h3,
body.at-highlight-headings h4,
body.at-highlight-headings h5,
body.at-highlight-headings h6 {
  background: rgba(59,130,246,0.18) !important;
  outline: 2px solid #3b82f6 !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
}

/* TTS word highlight */
.at-tts-highlight {
  background: #ffeb3b !important;
  color: #000 !important;
  border-radius: 2px;
  padding: 0 1px;
}

/* ── Mobile adjustments ── */
@media (max-width: 600px) {
  #a11y-bar {
    gap: 5px;
    padding: 10px 10px 12px;
  }

  #a11y-toolbar {
    --at-btn-size: 44px;
  }

  .at-group-label { font-size: 8px; }

  /* On mobile, show tooltips above with slightly less spacing */
  .at-btn::after {
    font-size: 10px;
    padding: 4px 8px;
  }
}

.at-tab-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--at-white);
  white-space: nowrap;
  font-decoration: none;
}