/* ALLHIR v1.4 / L02a — frontend foundation, 2026-11-04.
 * Load after allhir-round71-23949. The body class isolates this layer.
 * Important declarations reconcile the existing important legacy cascade.
 * Latest visual direction: Hanna's ALLHIR dashboard, forest green / warm gold.
 * Palette proposal only; the full dashboard layout is not implemented by this layer.
 * No routes, content, feature flags, pricing, or permissions change here.
 */
body.allhir-v14:not(.wp-admin) {
  color-scheme: dark;
  --ah-v14-bg: #01160e;
  --ah-v14-surface: #0b2b1b;
  --ah-v14-raised: #112e1f;
  --ah-v14-glass: rgba(11, 43, 27, .94);
  --ah-v14-text: #f8f6de;
  --ah-v14-muted: #d1d8c1;
  --ah-v14-gold: #f5db85;
  --ah-v14-action: #89daa0;
  --ah-v14-primary-top: #f9cc64;
  --ah-v14-primary-bottom: #d09231;
  --ah-v14-card-glow: rgba(245, 219, 133, .07);
  --ah-v14-ink: #0c1412;
  --ah-v14-control-line: #9d955b;
  --ah-v14-line: #566c3f;
  --ah-v14-error: #ffb4ab;
  --ah-v14-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Keep existing components on the same palette without editing old files. */
  --ah-gold: var(--ah-v14-gold);
  --ah-gold-strong: #f9cc64;
  --ah-gold-muted: var(--ah-v14-muted);
  --ah-gold-line: var(--ah-v14-control-line);
  --ah-gold-line-soft: var(--ah-v14-line);
  --ah-gold-glow: var(--ah-v14-card-glow);
  --ah-glass: var(--ah-v14-glass);
  --ah-glass-strong: var(--ah-v14-surface);
  --ah-glass-hover: var(--ah-v14-raised);
  --ah-glass-soft: var(--ah-v14-surface);
  --ah-input: var(--ah-v14-surface);
  --ah-copy: var(--ah-v14-muted);
  background: var(--ah-v14-bg) !important;
  color: var(--ah-v14-text) !important;
  font-family: var(--ah-v14-font) !important;
  font-size: clamp(1.0625rem, 1.02rem + .2vw, 1.125rem) !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  -webkit-text-fill-color: currentColor;
  text-shadow: none !important;
}
body.allhir-v14:not(.wp-admin) :is(main, header, footer, nav, aside, section, article, form, dialog, input, textarea, select, button):not(:where(#wpadminbar, #wpadminbar *)) {
  font-family: var(--ah-v14-font) !important;
}
body.allhir-v14:not(.wp-admin) :is(main, header, footer) {
  min-inline-size: 0;
}
body.allhir-v14:not(.wp-admin) main :is(h1, h2, h3, h4, h5, h6, p, li, dd, dt, legend, label > span, [class*="__title"], [class*="__heading"]) {
  color: var(--ah-v14-text) !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
  overflow-wrap: anywhere;
}
body.allhir-v14:not(.wp-admin) :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--ah-v14-font) !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  letter-spacing: -.025em;
  text-wrap: pretty;
}
body.allhir-v14:not(.wp-admin) main h1 { font-size: 2.75rem !important; font-size: clamp(1.875rem, 1.4rem + 2.4vw, 2.75rem) !important; }
body.allhir-v14:not(.wp-admin) main h2 { font-size: 1.875rem !important; font-size: clamp(1.5rem, 1.3rem + .8vw, 1.875rem) !important; }
body.allhir-v14:not(.wp-admin) main h3 { font-size: 1.375rem !important; font-size: clamp(1.2rem, 1.1rem + .4vw, 1.375rem) !important; }
body.allhir-v14:not(.wp-admin) main :is(p, .allhir-feed-card__text-body, .allhir-hero2__text) {
  font-size: inherit !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  color: var(--ah-v14-text) !important;
}
body.allhir-v14:not(.wp-admin) main :is(small, time, .allhir-feed-card__meta, .allhir-feed-card__username, .allhir-feed-card__location) {
  color: var(--ah-v14-muted) !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: .875rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}
body.allhir-v14:not(.wp-admin) main :is(a, summary) {
  color: var(--ah-v14-gold) !important;
  -webkit-text-fill-color: currentColor !important;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}
body.allhir-v14:not(.wp-admin) :is(.site-title, .mobile-site-title, .sidebar-brand, .allhir-v14-pro) {
  color: var(--ah-v14-gold) !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
}
body.allhir-v14:not(.wp-admin) :is(.desktop-menu a, .mobile-menu-list a, .allhir-account-dropdown a) {
  color: var(--ah-v14-text) !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  min-block-size: 2.75rem;
}
body.allhir-v14:not(.wp-admin) :is(.allhir-header-desktop, .allhir-header-mobile, .sidebar-menu, .allhir-account-dropdown) {
  background: var(--ah-v14-surface) !important;
  border-color: var(--ah-v14-line) !important;
  box-shadow: none !important;
}
body.allhir-v14:not(.wp-admin) main :is(.allhir-feed-card, .allhir-hero2__card, .allhir-home65__community, .allhir-home65__desktop-aside, .allhir-home65-listing, .allhir-home65-empty, .allhir-empty-card, .allhir-community-block, .allhir-profile-card, .allhir-profile-editor, .allhir-r71-cloud-gate, .allhir-r71-forum-content, .allhir-search-start, .allhir-v14-panel) {
  background: linear-gradient(135deg, var(--ah-v14-card-glow), transparent 65%), var(--ah-v14-surface) !important;
  color: var(--ah-v14-text) !important;
  border: 1px solid var(--ah-v14-line) !important;
  border-radius: 1.25rem !important;
  box-shadow: inset 0 1px 0 var(--ah-v14-card-glow), 0 12px 32px rgba(0, 0, 0, .18) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.allhir-v14:not(.wp-admin) :is(.allhir-cookie-panel, .allhir-cookie-dialog, dialog, .allhir-v14-glass) {
  background: var(--ah-v14-surface) !important;
  color: var(--ah-v14-text) !important;
  border-color: var(--ah-v14-line) !important;
}
@supports (backdrop-filter: blur(6px)) {
  body.allhir-v14:not(.wp-admin) .allhir-v14-glass {
    background: var(--ah-v14-glass) !important;
    backdrop-filter: blur(6px) !important;
  }
}
body.allhir-v14:not(.wp-admin) main :is(label, legend) {
  font-size: 1rem !important;
  font-weight: 500 !important;
  color: var(--ah-v14-text) !important;
}
body.allhir-v14:not(.wp-admin) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]), textarea, select):not(:where(#wpadminbar, #wpadminbar *)) {
  box-sizing: border-box;
  max-inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 3rem;
  padding: .7rem .875rem !important;
  border: 1px solid var(--ah-v14-control-line) !important;
  border-radius: .75rem !important;
  background: var(--ah-v14-surface) !important;
  color: var(--ah-v14-text) !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: 1.125rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  box-shadow: none !important;
}
body.allhir-v14:not(.wp-admin) textarea { resize: vertical; }
body.allhir-v14:not(.wp-admin) :is(input, textarea):not(:where(#wpadminbar, #wpadminbar *))::placeholder { color: var(--ah-v14-muted) !important; opacity: 1; }
body.allhir-v14:not(.wp-admin) :is(input[type="checkbox"], input[type="radio"]):not(:where(#wpadminbar, #wpadminbar *)) {
  inline-size: 1.25rem;
  block-size: 1.25rem;
  accent-color: var(--ah-v14-action);
}
body.allhir-v14:not(.wp-admin) :is(button, input[type="submit"], input[type="button"], .allhir-hero2__btn, .allhir-section-action, .allhir-v14-button):not(:where(#wpadminbar, #wpadminbar *)) {
  box-sizing: border-box;
  min-block-size: 2.75rem;
  min-inline-size: 2.75rem;
  max-inline-size: 100%;
  padding: .65rem 1rem;
  border: 1px solid var(--ah-v14-control-line) !important;
  border-radius: .75rem !important;
  background: var(--ah-v14-surface) !important;
  color: var(--ah-v14-text) !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  white-space: normal;
  overflow-wrap: anywhere;
  text-shadow: none !important;
  box-shadow: none !important;
  cursor: pointer;
}
body.allhir-v14:not(.wp-admin) main :is(button[type="submit"], input[type="submit"], .allhir-section-action, .allhir-hero2__btn--primary, .allhir-v14-button--primary) {
  background: linear-gradient(180deg, var(--ah-v14-primary-top), var(--ah-v14-primary-bottom)) !important;
  border-color: var(--ah-v14-gold) !important;
  color: var(--ah-v14-ink) !important;
  -webkit-text-fill-color: currentColor !important;
}
body.allhir-v14:not(.wp-admin) main :is(.allhir-hero2__btn--ghost, .allhir-v14-button--secondary) {
  border-color: var(--ah-v14-gold) !important;
  color: var(--ah-v14-gold) !important;
  background: var(--ah-v14-surface) !important;
  -webkit-text-fill-color: currentColor !important;
}
body.allhir-v14:not(.wp-admin) main :is(.allhir-publication-action.is-active, .allhir-r71-follow.is-active) {
  background: var(--ah-v14-raised) !important;
  border-color: var(--ah-v14-action) !important;
  color: var(--ah-v14-action) !important;
  -webkit-text-fill-color: currentColor !important;
}
body.allhir-v14:not(.wp-admin) :is(button, input, textarea, select, a, summary, [tabindex]):not(:where(#wpadminbar, #wpadminbar *)):focus-visible {
  outline: 3px solid var(--ah-v14-action) !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}
body.allhir-v14:not(.wp-admin) :is(input, textarea, select)[aria-invalid="true"] {
  border-color: var(--ah-v14-error) !important;
}
body.allhir-v14:not(.wp-admin) main :is(.allhir-profile-notice--error, .allhir-v14-error, [role="alert"]) {
  color: var(--ah-v14-error) !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: 1rem !important;
}
body.allhir-v14:not(.wp-admin) main :is(.allhir-profile-notice--success, .allhir-v14-success) {
  color: var(--ah-v14-action) !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: 1rem !important;
}
body.allhir-v14:not(.wp-admin) :is(button, input, textarea, select):not(:where(#wpadminbar, #wpadminbar *)):disabled {
  cursor: not-allowed;
  opacity: .65;
}
body.allhir-v14:not(.wp-admin) ::selection { background: var(--ah-v14-action); color: var(--ah-v14-ink); }
@media (prefers-reduced-motion: reduce) {
  body.allhir-v14:not(.wp-admin) *, body.allhir-v14:not(.wp-admin) *::before, body.allhir-v14:not(.wp-admin) *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  body.allhir-v14:not(.wp-admin) {
    color-scheme: light;
    --ah-v14-bg: #fff; --ah-v14-surface: #fff; --ah-v14-raised: #fff;
    --ah-v14-text: #111; --ah-v14-muted: #333; --ah-v14-action: #153f30;
    --ah-v14-gold: #604a17; --ah-v14-control-line: #666; --ah-v14-line: #bbb;
    --ah-v14-primary-top: #fff; --ah-v14-primary-bottom: #fff;
    --ah-v14-card-glow: transparent;
    --ah-v14-error: #8b1b16;
  }
}
