/* 1.8.1: final cascade for readable forms, stable cards and mobile navigation. */
:root { --aa-readable: #334155; --aa-secondary: #475569; }
:is(.aa-form,.aa-auth-form,.aa-p5-edit-form,.aa-p61-dashboard,.aa-master-single,.aa-search-results) {
  --n400: #475569; --n500: #475569; --text-muted: #475569;
}
:is(.aa-form,.aa-auth-form,.aa-p5-edit-form) label,
:is(.aa-form__label,.aa-form-label) { color:#1e293b; opacity:1; }
:is(.aa-form,.aa-auth-form,.aa-p5-edit-form,.aa-p61-controls) :is(input,textarea,select),
:is(.search-bar,.av-search,.aa-advanced-search) :is(input,select) { color:#172b3a; background:#fff; font-size:16px; opacity:1; }
:is(input,textarea)::placeholder { color:#596575; opacity:1; }
:is(.aa-form__help,.aa-form-help,.aa-form__desc,.aa-form-description,.aa-muted),
.aa-p61-dashboard :is(p,small,.aa-p5-stats span,.aa-p61-status-summary span),
.aa-search-results :is(p,small), .card :is(.card__excerpt,.card__meta) { color:#475569; opacity:1; }
.aa-master-single :is(.aa-ms-subtitle,.aa-ms-meta-line,.aa-ms-info-list,.aa-ms-desc) { color:#334155; }
.aa-card .badge, .aa-p61-dashboard :is(.badge,.aa-p5-status,.aa-p61-trust-badge) { opacity:1; }
.aa-card .badge--outline,.aa-card .badge--meta { color:#334155; background:#f8fafc; }
.aa-card .badge--verified,.aa-p5-status--publish { color:#166534; background:#ecfdf3; }
.aa-p5-status--pending,.aa-card .badge--featured { color:#713f12; background:#fef3c7; }
.av-search button, body .av-header-cta { color:#061e2d!important; }
:is(.aa-form,.aa-p61-dashboard,.aa-master-single,.aa-search-results,.card) .btn--primary { color:#fff!important; background:#a93e16!important; border-color:#a93e16!important; }
:is(.aa-form,.aa-p61-dashboard,.aa-master-single,.aa-search-results,.card) :is(.btn--outline,.btn--ghost) { color:#16324a; }
:is(.aa-form,.aa-p61-dashboard,.card) :focus-visible { outline:3px solid #07828c; outline-offset:3px; }

/* A fixed media ratio and flexible body keep every action inside the card. */
.card.card--dir.aa-card { display:flex; flex-direction:column; min-width:0; height:100%; }
.card.card--dir .card__media { flex:0 0 auto; width:100%; height:auto; min-height:0; aspect-ratio:4/3; }
.card.card--dir .card__media > a { position:absolute; inset:0; display:block; height:100%; }
.card.card--dir .card__media img { display:block; width:100%; height:100%; object-fit:cover; }
.card.card--dir .card__body { flex:1 0 auto; min-width:0; padding:18px; gap:10px; }
.card.card--dir :is(.card__title,.card__excerpt,.badge) { overflow-wrap:anywhere; white-space:normal; max-width:100%; }
.card.card--dir .card__title { display:block; margin:0; line-height:1.25; -webkit-line-clamp:unset; overflow:visible; }
.card.card--dir .card__excerpt { display:block; margin:0; line-height:1.5; -webkit-line-clamp:unset; }
.card.card--dir .card__badge-row { display:flex; flex-wrap:wrap; gap:6px; margin:0; }
.card.card--dir .card__actions { display:flex!important; flex-wrap:wrap; align-items:stretch; gap:8px; padding:14px 18px 18px; margin-top:auto; }
.card.card--dir .card__actions .btn { flex:1 1 72px; min-width:0; min-height:44px!important; margin:0; padding:10px; white-space:normal; line-height:1.3; justify-content:center; }
.card.card--dir .card__actions .btn--view { flex-basis:100%; }
.aa-search-card .card__title { overflow-wrap:anywhere; }

.aa-dashboard-nav { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:18px; }
.aa-dashboard-nav a { display:inline-flex; align-items:center; min-height:44px; padding:10px 14px; border:1px solid #cbd5e1; border-radius:10px; color:#16324a; background:#fff; }
.aa-dashboard-nav a[aria-current] { background:#16324a; color:#fff; }
.aa-p61-card__body,.aa-p61-edit-panel,.aa-p61-title-row h3 { min-width:0; overflow-wrap:anywhere; }
.aa-p61-title-row { flex-wrap:wrap; }
.aa-p61-card__actions { flex-wrap:wrap; }
.aa-p61-dashboard [hidden] { display:none!important; }
.aa-p61-edit-panel { grid-column:1/-1; width:100%; }
.aa-p5-edit-form :is(input,textarea,select) { max-width:100%; min-width:0; }
.aa-p61-more-menu { max-width:calc(100vw - 40px); }
.aa-auth-gate { min-width:0; height:auto; }
.aa-auth-gate__actions { min-width:0; }
.aa-auth-gate a:focus-visible { outline:3px solid #07828c; outline-offset:3px; }
body.admin-bar .site-header { top:32px; transform:translateY(-32px); margin-bottom:-32px; }

/* One header toggle; the three bars are children of this single button. */
@media (max-width:1024px) {
  body .site-header__inner { display:flex; flex-wrap:nowrap; width:100%; padding:12px 16px; gap:12px; }
  body .site-header .site-nav, body .site-header__actions { display:none; }
  body .site-header .site-logo { margin-right:auto; min-width:0; }
  body .site-header .site-logo__img { clip-path:inset(0 22% 0 0); }
  body .site-header .nav-toggle { display:flex; position:relative; margin:0 0 0 auto; flex:0 0 44px; width:44px; height:44px; padding:10px; align-items:center; justify-content:center; gap:5px; flex-direction:column; }
  body .site-header .nav-toggle::before, body .site-header .nav-toggle::after { content:none; }
  body .site-header .nav-toggle span { width:24px; height:2px; margin:0; flex:0 0 2px; }
  .mobile-nav[aria-hidden="true"] { visibility:hidden; pointer-events:none; }
  .mobile-nav[aria-hidden="false"] { visibility:visible; pointer-events:auto; }
}
@media (max-width:760px) {
  .aa-submit-hub .aa-auth-gate { display:flex; flex-direction:column; align-items:stretch; gap:12px; height:auto; min-height:0; padding:20px; }
  .aa-submit-hub .aa-auth-gate > :is(h3,p) { width:100%; min-width:0; max-width:none; flex:none; margin:0; overflow-wrap:normal; }
  .aa-submit-hub .aa-auth-gate__actions { display:flex; flex-wrap:wrap; gap:10px; }
  .aa-submit-hub .aa-auth-gate__actions .btn { flex:1 1 130px; min-width:0; min-height:44px; justify-content:center; text-align:center; }
  body.home #main.site-content { padding-inline:0; }
  body .site-main.aa-home-v3 { width:100%; max-width:none; margin:0; padding-inline:0; }
  body .aa-home-v3 .av-hero { width:100%; max-width:none; margin:0; padding:0; border-radius:0; min-height:0; }
  body .aa-home-v3 .container { width:calc(100% - 32px); padding-inline:0; }
  body .aa-home-v3 .av-hero-inner { display:grid; grid-template-columns:minmax(0,1fr); gap:28px; padding-block:36px 40px; }
  body .aa-home-v3 .av-hero h1 { font-size:clamp(42px,12vw,64px); line-height:1.02; margin-bottom:18px; }
  .av-hero-copy,.av-search { min-width:0; }
  .av-hero-copy > p { font-size:16px; line-height:1.6; }
  .av-desktop-break { display:none; }
  .av-search { display:flex; flex-wrap:wrap; gap:8px; padding:6px; border-radius:14px; }
  .av-search input { width:100%; flex:1 1 180px; padding:12px; min-height:48px; font-size:16px; }
  .av-search button { flex:1 0 84px; min-height:48px; padding:12px 16px; }
  .av-actions { grid-template-columns:minmax(0,1fr); }
  .av-actions a { padding:16px; gap:12px; align-items:center; }
  .av-actions a>span { display:block; }
  .av-actions strong { font-size:15px; }
  .av-actions small { font-size:13px; margin-top:4px; }
  .av-explore-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .av-explore-grid .av-photo-card { height:190px; padding:14px; min-width:0; }
  .av-explore-grid .av-photo-card strong { font-size:17px; overflow-wrap:anywhere; }
  .av-live { padding:18px; background:#06202be6; }
  .av-live-top { flex-wrap:wrap; font-size:13px; }
  .av-live-grid { gap:8px; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .av-live-grid small { font-size:12px; line-height:1.5; color:#fff; }
  .av-live-grid strong { font-size:26px; }
  .aa-p61-controls,.aa-p5-edit-grid { grid-template-columns:minmax(0,1fr); }
  .aa-p61-card { grid-template-columns:minmax(0,1fr); }
  .aa-p61-more-menu { left:0; right:auto; }
  body { padding-bottom:calc(82px + env(safe-area-inset-bottom,0px))!important; }
  body .aa-mobile-dock { padding:6px!important; min-height:60px!important; bottom:max(8px,env(safe-area-inset-bottom,0px))!important; right:70px!important; }
  body .aa-bm-toggle { width:44px!important; height:44px!important; right:14px!important; bottom:calc(16px + env(safe-area-inset-bottom,0px))!important; }
  body.mobile-menu-open :is(.aa-mobile-dock,.aa-bm-toggle) { visibility:hidden; pointer-events:none; }
}
@media (max-width:360px) { .av-explore-grid { grid-template-columns:minmax(0,1fr); } .aa-submit-hub .aa-auth-gate__actions .btn { flex-basis:100%; } }
@media (max-width:782px) { body.admin-bar .site-header { top:46px; transform:translateY(-46px); margin-bottom:-46px; } }
