/* Targeted account sizing and legibility; existing layout and actions retained. */
.site-header .account-link.account-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-width:44px;padding:0;border-radius:50%;color:#193827;background:#fffdf7}
.site-header .account-link.account-icon::before,.site-header .account-link.account-icon::after{content:none}
.site-header .account-icon svg{display:block;width:22px;height:22px;flex:none}
.site-header .account-icon:focus-visible{outline:3px solid #8f1828;outline-offset:3px}
.account-access-hero{padding-block:18px!important;min-height:0}
.account-access-hero h1{font-size:clamp(1.6rem,2.6vw,2rem);line-height:1.18;margin:0 0 8px;max-width:none}
.account-access-hero p{font-size:.94rem;line-height:1.5;margin:0;max-width:76ch}
.account-access-hero .eyebrow{font-size:.7rem;margin-bottom:8px}
.account-access-section{padding-block:24px!important}
.account-access-section .app-auth-grid{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:clamp(16px,2.2vw,28px);align-items:start}
.app-auth-grid .auth-card{min-width:0;padding:clamp(18px,2vw,26px);border-radius:14px;box-shadow:0 5px 18px #1938270a}
.app-auth-grid .auth-card h2{font-size:clamp(1.45rem,2.3vw,1.9rem);line-height:1.2;margin:0 0 18px}
.app-auth-grid .auth-card>.eyebrow{font-size:.68rem;line-height:1.4;margin:0 0 10px;letter-spacing:.12em}
.app-auth-grid .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;margin:0}
.app-auth-grid .app-form-stack{gap:14px;margin:0}
.app-auth-grid .field{min-width:0;gap:5px;margin:0}
.app-auth-grid .field label{font-size:.875rem;line-height:1.4;margin:0}
.app-auth-grid input:not([type=checkbox]),.app-auth-grid select{width:100%;min-width:0;min-height:44px;padding:10px 12px;font-size:16px;line-height:1.35;box-sizing:border-box}
.app-auth-grid .help{font-size:.82rem;line-height:1.5;margin:8px 0 0;color:#3e5145}
.app-auth-grid .field .help{margin:0}
.app-auth-grid .btn{min-height:44px;padding:10px 16px;line-height:1.4;white-space:normal}
.app-auth-grid .check-field{align-items:start;grid-template-columns:18px minmax(0,1fr);gap:8px}
.app-auth-grid .check-field input{margin-top:3px;flex:none}
.app-auth-grid .check-field label{font-size:.81rem;line-height:1.45}
.app-auth-grid a{color:#244e34;text-underline-offset:3px}
/* Explicit surface pairs prevent inherited white text inside light panels. */
:is(.auth-card,.form-card,.dashboard-card,.legacy-card) :is(label,h2,h3,h4){color:#193827}
:is(.auth-card,.form-card,.dashboard-card,.legacy-card) :is(.help,.field-help){color:#3e5145}
.military-format :is(.section-ink,.section-petrol,.card-dark,.cta-band){color:#fffdf7}
.military-format :is(.section-ink,.section-petrol,.card-dark,.cta-band)>:is(h1,h2,h3,p){color:#fffdf7}
.military-format .site-footer :is(h2,h3,strong,small){color:#fffdf7}
/* The mobile dropdown inherits a dark-theme text-fill from military.css. */
.site-header .site-nav .nav-dropdown-menu a{color:#17291b!important;-webkit-text-fill-color:#17291b!important}
.site-header .nav-mobile-account{display:none}
table thead :is(th,td){color:#fffdf7;background:#193827}
@media(max-width:760px){
  .account-access-section .app-auth-grid{grid-template-columns:minmax(0,1fr);gap:18px}
  .account-access-hero{padding-block:16px!important}
  .account-access-section{padding-block:18px!important}
  .app-auth-grid .auth-card{padding:18px}
}
@media(max-width:420px){
  .app-auth-grid .form-grid{grid-template-columns:minmax(0,1fr)}
  .app-auth-grid .field-full{grid-column:1}
}

/* V8.5.20 — presentation, contrast and responsive containment. */
html,body{max-width:100%;overflow-x:clip}
main p:not(.eyebrow),.site-footer p{text-align:left;text-align-last:auto;hyphens:none}
main :is(h1,h2,h3,h4,p,li,dd,dt,a,span){overflow-wrap:normal;word-break:normal}
main :is(a[href^="http"],a[href^="mailto:"],.pre-line){overflow-wrap:anywhere}
.section:not(.section-ink):not(.section-petrol) :is(p,.lead,.help,.text-small),
.legacy-section :is(p,.lead,.legacy-note),
.card:not(.card-dark) :is(p,.text-small),
.dashboard-card :is(p,.help,.text-small){color:#31483a}
:is(.section-ink,.section-petrol,.card-dark,.cta-band,.military-join,.page-hero,.app-hero) :is(p,.lead,.text-small,small){color:rgba(255,255,255,.92)!important}
:is(.section-ink,.section-petrol,.card-dark,.cta-band,.military-join,.page-hero,.app-hero) :is(h1,h2,h3,h4,strong){color:#fffdf7!important}
.section-pale,.section-muted{background:#f2eee3}
.card,.dashboard-card,.legacy-card,.admin-shortcut{border-color:#cbd4c6;box-shadow:0 8px 24px rgba(25,56,39,.06)}
.notice{color:#263c2e;background:#fffdf7;border-color:#c7d0c2}
.notice :is(p,small){color:#31483a}

/* A quieter, more institutional navigation bar. */
.site-header .site-nav{border-top:1px solid rgba(25,56,39,.12)}
.site-header .nav-list{gap:.2rem;background:transparent}
.site-header .nav-list>li>a,.site-header .nav-group-trigger{padding:.8rem 1rem!important;font-size:.96rem!important;border-radius:0}
.site-header .nav-list a[aria-current=page],.site-header .nav-group-trigger.is-current{color:#193827!important;background:transparent!important;box-shadow:inset 0 -3px #8f1828!important}
.site-header .nav-list>li>a:hover,.site-header .nav-group-trigger:hover{background:#f2eee3!important}
.site-header .brand{min-width:0}
.site-header .brand-copy{min-width:0}

/* The institutional notice remains prominent without covering the whole site. */
.institutional-notice{width:min(720px,calc(100% - 32px));max-height:calc(100dvh - 40px);border-radius:16px;box-shadow:0 24px 70px rgba(4,19,12,.34)}
.institutional-notice::backdrop{background:rgba(8,24,17,.62);backdrop-filter:blur(2px)}
.institutional-notice>img{width:100%;max-height:calc(100dvh - 40px);object-fit:contain;background:#fff}
.institutional-notice-header button{width:40px;height:40px;min-width:40px;font-size:26px}

/* Events without artwork should read as information cards, not empty posters. */
.events-list{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));align-items:start}
.event-card-tile{min-height:0;aspect-ratio:auto;padding:1.25rem;border:1px solid #cbd4c6;background:#fffdf7}
.event-card-tile>p{font-size:.94rem;line-height:1.62}
.event-card-tile .text-link{margin-top:auto;padding-top:.35rem}
.events-list>.notice{grid-column:1/-1}
.legacy-filters{display:flex;flex-wrap:wrap;gap:.55rem;margin-bottom:1.5rem}
.legacy-filters .btn{min-height:42px}

/* Keep long section navigation contained inside the viewport. */
.anchor-nav{max-width:100%;overflow:hidden}
.anchor-nav .container{width:100%;max-width:var(--container);padding-inline:max(16px,calc((100% - var(--container))/2));box-sizing:border-box;overscroll-behavior-inline:contain}
.table-wrap{max-width:100%;overflow-x:auto}

@media(max-width:1080px){
  .site-header .header-inner{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center;gap:.65rem .8rem;flex-wrap:unset!important}
  .site-header .brand{min-width:0;max-width:100%;overflow:hidden}
  .site-header .brand-mark,.site-header .legacy-crest{flex:0 0 auto}
  .site-header .brand-copy{min-width:0;overflow:hidden}
  .site-header .brand-copy strong{display:block;max-width:100%;font-size:clamp(.9rem,3.8vw,1.05rem);line-height:1.08;white-space:normal}
  .site-header .brand-copy small{display:none}
  .site-header .header-actions{margin-left:0;justify-self:end;min-width:0;gap:.4rem}
  .site-header .site-nav{grid-column:1/-1;order:3!important;width:100%!important;margin:0;background:#193827!important;border-top:0}
  .site-header .nav-list{background:#193827!important}
  .site-header .nav-list>li>a,.site-header .nav-group-trigger{color:#fffdf7!important;-webkit-text-fill-color:#fffdf7!important;padding:.82rem 1rem!important}
  .site-header .nav-list>li>a:hover,.site-header .nav-list a[aria-current=page],.site-header .nav-group-trigger:hover,.site-header .nav-group-trigger.is-current{color:#fff!important;background:rgba(255,255,255,.1)!important;box-shadow:inset 3px 0 #e8cd81!important}
  .site-header .site-nav .nav-dropdown>details>summary,
  .site-header .site-nav .nav-dropdown>details>summary:hover,
  .site-header .site-nav .nav-dropdown>details>summary.is-current,
  .site-header .site-nav .nav-dropdown>details[open]>summary,
  .site-header .site-nav .nav-dropdown>details>summary span{
    color:#fffdf7!important;
    -webkit-text-fill-color:#fffdf7!important;
    background:rgba(255,255,255,.07)!important;
    box-shadow:inset 0 0 0 1px rgba(232,205,129,.3)!important;
  }
  .site-header .site-nav .nav-dropdown>details[open]>summary{
    background:#285238!important;
    box-shadow:inset 3px 0 #e8cd81!important;
  }
  .site-header .nav-dropdown-menu{
    margin:.3rem 0 .55rem!important;
    padding:.35rem!important;
    background:#0a321d!important;
    border:1px solid rgba(232,205,129,.24)!important;
    border-radius:.55rem;
  }
  .site-header .site-nav .nav-dropdown-menu a,
  .site-header .site-nav .nav-dropdown-menu a:hover{
    color:#fffdf7!important;
    -webkit-text-fill-color:#fffdf7!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  .site-header .site-nav .nav-dropdown-menu a:hover,
  .site-header .site-nav .nav-dropdown-menu a:focus-visible,
  .site-header .site-nav .nav-dropdown-menu a[aria-current=page]{
    background:rgba(255,255,255,.12)!important;
  }
  .site-header .nav-mobile-account{
    display:block!important;
    position:sticky;
    bottom:0;
    z-index:2;
    margin-top:.45rem;
    padding:.6rem 0 .1rem;
    background:#193827;
    border-top:1px solid rgba(232,205,129,.45);
  }
  .site-header .site-nav .nav-list>li.nav-mobile-account>a,
  .site-header .site-nav .nav-list>li.nav-mobile-account>a:hover,
  .site-header .site-nav .nav-list>li.nav-mobile-account>a:focus-visible{
    justify-content:center;
    color:#193827!important;
    -webkit-text-fill-color:#193827!important;
    background:#fffdf7!important;
    border:1px solid #e8cd81;
    font-weight:800;
    box-shadow:none!important;
  }
}

@media(max-width:760px){
  :root{--header-height:72px}
  .container,.narrow{width:min(100% - 28px,var(--container));max-width:100%;box-sizing:border-box}
  main :is(.split,.split-wide,.grid-2,.grid-3,.grid-4,.leadership-grid,.editorial-team-grid,.new-journal-band,.archive-preview-row,.military-identity-grid,.military-agenda-grid,.journal-launch-grid,.event-detail-grid,.certification-layout){grid-template-columns:minmax(0,1fr)!important}
  main :is(section,article,div,figure,form,aside,nav){min-width:0}
  .page-hero,.app-hero,.military-landing-hero{max-width:100%;overflow:hidden}
  .page-hero{padding-block:2.5rem 2.1rem}
  .page-hero h1,.app-hero h1{max-width:100%;font-size:clamp(2rem,10vw,3rem);line-height:1.04}
  .page-hero p,.app-hero p{max-width:100%;font-size:1rem;line-height:1.62}
  .section,.legacy-section{padding-block:2.75rem}
  .section-head{display:grid;grid-template-columns:minmax(0,1fr);gap:.8rem}
  .section-head h2,.legacy-section h2{font-size:clamp(1.75rem,8vw,2.45rem);line-height:1.08}
  .military-hero-content{grid-template-columns:minmax(0,1fr)!important;min-height:0;padding-block:3.4rem 2.8rem;gap:1.5rem}
  .military-hero-copy{min-width:0;max-width:100%}
  .military-hero-copy h1{max-width:100%;font-size:clamp(2.25rem,11vw,3.5rem);line-height:1.02}
  .military-hero-copy>p:not(.eyebrow){font-size:1rem;line-height:1.62}
  .military-feature{max-width:100%}
  .military-purpose{grid-template-columns:minmax(0,1fr)}
  .military-values ul{display:flex;flex-wrap:wrap;gap:.5rem .8rem}
  .hero-actions{display:flex;flex-wrap:wrap;align-items:stretch;gap:.65rem}
  .hero-actions .btn{max-width:100%;white-space:normal;text-align:center}
  .anchor-nav{position:relative;top:auto}
  .anchor-nav .container{width:100%;padding-inline:14px}
  .anchor-nav a{padding:.78rem .72rem;font-size:.88rem}
  .legacy-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:100%;padding-bottom:0;overflow:visible}
  .legacy-filters .btn{width:100%;min-width:0;padding-inline:.65rem;white-space:normal;text-align:center}
  .events-list{grid-template-columns:minmax(0,1fr)}
  .event-card-tile{width:100%;min-height:0;aspect-ratio:auto}
  .institutional-notice{width:calc(100% - 16px);max-height:calc(100dvh - 16px);border-radius:12px}
  .institutional-notice>img{max-height:calc(100dvh - 16px)}
  .footer-main{grid-template-columns:minmax(0,1fr)}
}

@media(max-width:520px){
  .site-header .header-inner{grid-template-columns:minmax(0,1fr) auto!important;padding-block:.55rem}
  .site-header .brand-mark{width:42px;height:42px;min-width:42px}
  .site-header .legacy-crest{width:46px;height:46px}
  .site-header .header-actions :is(.account-link,.btn){display:none}
  .site-header .header-actions .icon-button{width:42px;height:42px;min-width:42px}
  .hero-actions .btn{width:100%}
  .military-hero-crest{width:72px;height:72px}
  .military-hero-crest .legacy-crest{width:62px;height:62px}
  .card,.dashboard-card,.legacy-card{padding:1.1rem}
  .legacy-filters{grid-template-columns:minmax(0,1fr)}
}

/* V8.5.21: el escudo oficial conserva su silueta completa, sin máscaras. */
.official-college-crest,
.site-footer .official-college-crest,
.military-join .official-college-crest{
  width:52px!important;
  height:64px!important;
  min-width:52px;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  object-fit:contain!important;
}
.site-footer .brand{align-items:center}
.site-footer .brand-copy{min-width:0}
.military-join .official-college-crest{width:62px!important;height:76px!important;min-width:62px}
.military-identity figure>img{object-fit:contain;background:#fffdf7;animation:none}

@media(max-width:520px){
  .site-footer .official-college-crest{width:46px!important;height:57px!important;min-width:46px}
}
